public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Keith Seitz <keiths@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/gdb] gdb-17.2-rebase-f44: Remove gdb-linux_perf-bundle.patch
Date: Sun, 28 Jun 2026 00:01:37 GMT	[thread overview]
Message-ID: <178260489748.1.16763051852393492472.rpms-gdb-deb8227d86d0@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/gdb
            Branch : gdb-17.2-rebase-f44
            Commit : deb8227d86d0acf6d732e3901c6cdacca13321be
            Author : Keith Seitz <keiths@redhat.com>
            Date   : 2024-04-22T07:02:07-07:00
            Stats  : +25/-284 in 5 file(s)
            URL    : https://src.fedoraproject.org/rpms/gdb/c/deb8227d86d0acf6d732e3901c6cdacca13321be?branch=gdb-17.2-rebase-f44

            Log:
            Remove gdb-linux_perf-bundle.patch

RHEL7 is EOL AFAICT, so this patch is no longer necessary.

---
diff --git a/_gdb.spec.Patch.include b/_gdb.spec.Patch.include
index 5e90a41..598148c 100644
--- a/_gdb.spec.Patch.include
+++ b/_gdb.spec.Patch.include
@@ -122,10 +122,6 @@ Patch028: gdb-fedora-libncursesw.patch
 #=fedoratest
 Patch029: gdb-rhbz1261564-aarch64-hw-watchpoint-test.patch
 
-# [dts+el7] [x86*] Bundle linux_perf.h for libipt (RH BZ 1256513).
-#=fedora
-Patch030: gdb-linux_perf-bundle.patch
-
 # Update gdb-add-index.sh such that, when the GDB environment
 # variable is not set, the script is smarter than just looking for
 # 'gdb' in the $PATH.
@@ -138,72 +134,72 @@ Patch030: gdb-linux_perf-bundle.patch
 #   https://fedoraproject.org/wiki/Changes/Minimal_GDB_in_buildroot
 #
 #=fedora
-Patch031: gdb-add-index.patch
+Patch030: gdb-add-index.patch
 
 # Back-port upstream commit 1f0fab7ff86 as part of a fix for
 # non-deterministic gdb-index generation (RH BZ 2232086).
-Patch032: gdb-rhbz2232086-refactor-selftest-support.patch
+Patch031: gdb-rhbz2232086-refactor-selftest-support.patch
 
 # Back-port upstream commit aa19bc1d259 as part of a fix for
 # non-deterministic gdb-index generation (RH BZ 2232086).
-Patch033: gdb-rhbz-2232086-reduce-size-of-gdb-index.patch
+Patch032: gdb-rhbz-2232086-reduce-size-of-gdb-index.patch
 
 # Back-port upstream commit acc117b57f7 as part of a fix for
 # non-deterministic gdb-index generation (RH BZ 2232086).
-Patch034: gdb-rhbz-2232086-cpp-ify-mapped-symtab.patch
+Patch033: gdb-rhbz-2232086-cpp-ify-mapped-symtab.patch
 
 # Back-port upstream commit aff250145af as part of a fix for
 # non-deterministic gdb-index generation (RH BZ 2232086).
-Patch035: gdb-rhbz-2232086-generate-gdb-index-consistently.patch
+Patch034: gdb-rhbz-2232086-generate-gdb-index-consistently.patch
 
 # Back-port upstream commit 3644f41dc80 as part of a fix for
 # non-deterministic gdb-index generation (RH BZ 2232086).
-Patch036: gdb-rhbz-2232086-generate-dwarf-5-index-consistently.patch
+Patch035: gdb-rhbz-2232086-generate-dwarf-5-index-consistently.patch
 
 
-Patch037: gdb-rhbz2250652-gdbpy_gil.patch
+Patch036: gdb-rhbz2250652-gdbpy_gil.patch
 
 
-Patch038: gdb-rhbz2250652-avoid-PyOS_ReadlineTState.patch
+Patch037: gdb-rhbz2250652-avoid-PyOS_ReadlineTState.patch
 
 
-Patch039: gdb-ftbs-swapped-calloc-args.patch
+Patch038: gdb-ftbs-swapped-calloc-args.patch
 
 # Backport upstream workaround for GCC 14 problem which cause assertion
 # failures in GDB.
-Patch040: gdb-rhbz2261580-intrusive_list-assertion-fix.patch
+Patch039: gdb-rhbz2261580-intrusive_list-assertion-fix.patch
 
 # Backport upstream commit 7628a997f27.
-Patch041: gdb-sync-coffread-with-elfread.patch
+Patch040: gdb-sync-coffread-with-elfread.patch
 
 # Backport upstream commit 27807da5849.
-Patch042: gdb-merge-debug-symbol-lookup.patch
+Patch041: gdb-merge-debug-symbol-lookup.patch
 
 # Backport upstream commit 6234ba17598.
-Patch043: gdb-refactor-find-and-add-separate-symbol-file.patch
+Patch042: gdb-refactor-find-and-add-separate-symbol-file.patch
 
 # Backport upstream commit 661d98a3331.
-Patch044: gdb-add-missing-debug-ext-lang-hook.patch
+Patch043: gdb-add-missing-debug-ext-lang-hook.patch
 
 # Backport upstream commit 8f6c452b5a4.
-Patch045: gdb-add-missing-debug-info-python-hook.patch
+Patch044: gdb-add-missing-debug-info-python-hook.patch
 
 # Backport upstream commit 7db795bc67a.
-Patch046: gdb-remove-use-of-py-isascii
+Patch045: gdb-remove-use-of-py-isascii
 
 # Backport upstream commit 1146d27749f.
-Patch047: gdb-remove-path-in-test-name.patch
+Patch046: gdb-remove-path-in-test-name.patch
 
 # Backport upstream commit e8c3dafa5f5.
-Patch048: gdb-do-not-import-py-curses-ascii-module.patch
+Patch047: gdb-do-not-import-py-curses-ascii-module.patch
 
 # Backport upstream commit dd5516bf98f.
-Patch049: gdb-reformat-missing-debug-py-file.patch
+Patch048: gdb-reformat-missing-debug-py-file.patch
 
 # Backport upstream commit 7d21600b31fe.
-Patch050: gdb-handle-no-python-gdb-module.patch
+Patch049: gdb-handle-no-python-gdb-module.patch
 
 # Not a backport.  Add a new script which hooks into GDB and suggests
 # RPMs to install when GDB finds an objfile with no debug info.
-Patch051: gdb-add-rpm-suggestion-script.patch
+Patch050: gdb-add-rpm-suggestion-script.patch
 

diff --git a/_gdb.spec.patch.include b/_gdb.spec.patch.include
index 161654d..f84adba 100644
--- a/_gdb.spec.patch.include
+++ b/_gdb.spec.patch.include
@@ -48,4 +48,3 @@
 %patch -p1 -P048
 %patch -p1 -P049
 %patch -p1 -P050
-%patch -p1 -P051

diff --git a/_patch_order b/_patch_order
index ed6b637..de5e00f 100644
--- a/_patch_order
+++ b/_patch_order
@@ -27,7 +27,6 @@ gdb-rhbz1149205-catch-syscall-after-fork-test.patch
 gdb-rhbz1084404-ppc64-s390x-wrong-prologue-skip-O2-g-3of3.patch
 gdb-fedora-libncursesw.patch
 gdb-rhbz1261564-aarch64-hw-watchpoint-test.patch
-gdb-linux_perf-bundle.patch
 gdb-add-index.patch
 gdb-rhbz2232086-refactor-selftest-support.patch
 gdb-rhbz-2232086-reduce-size-of-gdb-index.patch

diff --git a/gdb-linux_perf-bundle.patch b/gdb-linux_perf-bundle.patch
deleted file mode 100644
index bb6fb6a..0000000
--- a/gdb-linux_perf-bundle.patch
+++ /dev/null
@@ -1,226 +0,0 @@
-From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
-From: Fedora GDB patches <invalid@email.com>
-Date: Fri, 27 Oct 2017 21:07:50 +0200
-Subject: gdb-linux_perf-bundle.patch
-
-;; [dts+el7] [x86*] Bundle linux_perf.h for libipt (RH BZ 1256513).
-;;=fedora
-
-diff --git a/gdb/gdb.c b/gdb/gdb.c
---- a/gdb/gdb.c
-+++ b/gdb/gdb.c
-@@ -21,6 +21,10 @@
- #include "interps.h"
- #include "run-on-main-thread.h"
- 
-+#ifdef PERF_ATTR_SIZE_VER5_BUNDLE
-+extern "C" void __libipt_init(void);
-+#endif
-+
- int
- main (int argc, char **argv)
- {
-@@ -32,6 +36,10 @@ main (int argc, char **argv)
- 
-   struct captured_main_args args;
- 
-+#ifdef PERF_ATTR_SIZE_VER5_BUNDLE
-+  __libipt_init();
-+#endif
-+
-   memset (&args, 0, sizeof args);
-   args.argc = argc;
-   args.argv = argv;
-diff --git a/gdb/nat/linux-btrace.h b/gdb/nat/linux-btrace.h
---- a/gdb/nat/linux-btrace.h
-+++ b/gdb/nat/linux-btrace.h
-@@ -28,6 +28,177 @@
- #  include <linux/perf_event.h>
- #endif
- 
-+#ifdef PERF_ATTR_SIZE_VER5_BUNDLE
-+#ifndef HAVE_LINUX_PERF_EVENT_H
-+# error "PERF_ATTR_SIZE_VER5_BUNDLE && !HAVE_LINUX_PERF_EVENT_H"
-+#endif
-+#ifndef PERF_ATTR_SIZE_VER5
-+#define PERF_ATTR_SIZE_VER5
-+#define perf_event_mmap_page perf_event_mmap_page_bundle
-+// kernel-headers-3.10.0-493.el7.x86_64/usr/include/linux/perf_event.h
-+/*
-+ * Structure of the page that can be mapped via mmap
-+ */
-+struct perf_event_mmap_page {
-+	__u32	version;		/* version number of this structure */
-+	__u32	compat_version;		/* lowest version this is compat with */
-+
-+	/*
-+	 * Bits needed to read the hw events in user-space.
-+	 *
-+	 *   u32 seq, time_mult, time_shift, index, width;
-+	 *   u64 count, enabled, running;
-+	 *   u64 cyc, time_offset;
-+	 *   s64 pmc = 0;
-+	 *
-+	 *   do {
-+	 *     seq = pc->lock;
-+	 *     barrier()
-+	 *
-+	 *     enabled = pc->time_enabled;
-+	 *     running = pc->time_running;
-+	 *
-+	 *     if (pc->cap_usr_time && enabled != running) {
-+	 *       cyc = rdtsc();
-+	 *       time_offset = pc->time_offset;
-+	 *       time_mult   = pc->time_mult;
-+	 *       time_shift  = pc->time_shift;
-+	 *     }
-+	 *
-+	 *     index = pc->index;
-+	 *     count = pc->offset;
-+	 *     if (pc->cap_user_rdpmc && index) {
-+	 *       width = pc->pmc_width;
-+	 *       pmc = rdpmc(index - 1);
-+	 *     }
-+	 *
-+	 *     barrier();
-+	 *   } while (pc->lock != seq);
-+	 *
-+	 * NOTE: for obvious reason this only works on self-monitoring
-+	 *       processes.
-+	 */
-+	__u32	lock;			/* seqlock for synchronization */
-+	__u32	index;			/* hardware event identifier */
-+	__s64	offset;			/* add to hardware event value */
-+	__u64	time_enabled;		/* time event active */
-+	__u64	time_running;		/* time event on cpu */
-+	union {
-+		__u64	capabilities;
-+		struct {
-+			__u64	cap_bit0		: 1, /* Always 0, deprecated, see commit 860f085b74e9 */
-+				cap_bit0_is_deprecated	: 1, /* Always 1, signals that bit 0 is zero */
-+
-+				cap_user_rdpmc		: 1, /* The RDPMC instruction can be used to read counts */
-+				cap_user_time		: 1, /* The time_* fields are used */
-+				cap_user_time_zero	: 1, /* The time_zero field is used */
-+				cap_____res		: 59;
-+		};
-+	};
-+
-+	/*
-+	 * If cap_user_rdpmc this field provides the bit-width of the value
-+	 * read using the rdpmc() or equivalent instruction. This can be used
-+	 * to sign extend the result like:
-+	 *
-+	 *   pmc <<= 64 - width;
-+	 *   pmc >>= 64 - width; // signed shift right
-+	 *   count += pmc;
-+	 */
-+	__u16	pmc_width;
-+
-+	/*
-+	 * If cap_usr_time the below fields can be used to compute the time
-+	 * delta since time_enabled (in ns) using rdtsc or similar.
-+	 *
-+	 *   u64 quot, rem;
-+	 *   u64 delta;
-+	 *
-+	 *   quot = (cyc >> time_shift);
-+	 *   rem = cyc & (((u64)1 << time_shift) - 1);
-+	 *   delta = time_offset + quot * time_mult +
-+	 *              ((rem * time_mult) >> time_shift);
-+	 *
-+	 * Where time_offset,time_mult,time_shift and cyc are read in the
-+	 * seqcount loop described above. This delta can then be added to
-+	 * enabled and possible running (if index), improving the scaling:
-+	 *
-+	 *   enabled += delta;
-+	 *   if (index)
-+	 *     running += delta;
-+	 *
-+	 *   quot = count / running;
-+	 *   rem  = count % running;
-+	 *   count = quot * enabled + (rem * enabled) / running;
-+	 */
-+	__u16	time_shift;
-+	__u32	time_mult;
-+	__u64	time_offset;
-+	/*
-+	 * If cap_usr_time_zero, the hardware clock (e.g. TSC) can be calculated
-+	 * from sample timestamps.
-+	 *
-+	 *   time = timestamp - time_zero;
-+	 *   quot = time / time_mult;
-+	 *   rem  = time % time_mult;
-+	 *   cyc = (quot << time_shift) + (rem << time_shift) / time_mult;
-+	 *
-+	 * And vice versa:
-+	 *
-+	 *   quot = cyc >> time_shift;
-+	 *   rem  = cyc & (((u64)1 << time_shift) - 1);
-+	 *   timestamp = time_zero + quot * time_mult +
-+	 *               ((rem * time_mult) >> time_shift);
-+	 */
-+	__u64	time_zero;
-+	__u32	size;			/* Header size up to __reserved[] fields. */
-+
-+		/*
-+		 * Hole for extension of the self monitor capabilities
-+		 */
-+
-+	__u8	__reserved[118*8+4];	/* align to 1k. */
-+
-+	/*
-+	 * Control data for the mmap() data buffer.
-+	 *
-+	 * User-space reading the @data_head value should issue an smp_rmb(),
-+	 * after reading this value.
-+	 *
-+	 * When the mapping is PROT_WRITE the @data_tail value should be
-+	 * written by userspace to reflect the last read data, after issueing
-+	 * an smp_mb() to separate the data read from the ->data_tail store.
-+	 * In this case the kernel will not over-write unread data.
-+	 *
-+	 * See perf_output_put_handle() for the data ordering.
-+	 *
-+	 * data_{offset,size} indicate the location and size of the perf record
-+	 * buffer within the mmapped area.
-+	 */
-+	__u64   data_head;		/* head in the data section */
-+	__u64	data_tail;		/* user-space written tail */
-+	__u64	data_offset;		/* where the buffer starts */
-+	__u64	data_size;		/* data buffer size */
-+
-+	/*
-+	 * AUX area is defined by aux_{offset,size} fields that should be set
-+	 * by the userspace, so that
-+	 *
-+	 *   aux_offset >= data_offset + data_size
-+	 *
-+	 * prior to mmap()ing it. Size of the mmap()ed area should be aux_size.
-+	 *
-+	 * Ring buffer pointers aux_{head,tail} have the same semantics as
-+	 * data_{head,tail} and same ordering rules apply.
-+	 */
-+	__u64	aux_head;
-+	__u64	aux_tail;
-+	__u64	aux_offset;
-+	__u64	aux_size;
-+};
-+#endif // PERF_ATTR_SIZE_VER5
-+#endif // PERF_ATTR_SIZE_VER5_BUNDLE
-+
- struct target_ops;
- 
- #if HAVE_LINUX_PERF_EVENT_H
-diff --git a/gdbsupport/common.m4 b/gdbsupport/common.m4
---- a/gdbsupport/common.m4
-+++ b/gdbsupport/common.m4
-@@ -168,7 +168,7 @@ AC_DEFUN([GDB_AC_COMMON], [
-     AC_PREPROC_IFELSE([AC_LANG_SOURCE([[
-   #include <linux/perf_event.h>
-   #ifndef PERF_ATTR_SIZE_VER5
--  # error
-+  // error // PERF_ATTR_SIZE_VER5_BUNDLE is not available here - Fedora+RHEL
-   #endif
-     ]])], [perf_event=yes], [perf_event=no])
-     if test "$perf_event" != yes; then

diff --git a/gdb.spec b/gdb.spec
index 06f5d59..b6d02e3 100644
--- a/gdb.spec
+++ b/gdb.spec
@@ -217,8 +217,6 @@ Source6: gdbtui
 
 # libipt: Intel Processor Trace Decoder Library
 %global libipt_version 2.0.5
-#=fedora
-Source7: v%{libipt_version}.tar.gz
 
 # Include the auto-generated file containing the "Patch:" directives.
 # See README.local-patches for more details.
@@ -279,16 +277,12 @@ BuildRequires: guile-devel%{buildisa}
 %endif
 
 %global have_libipt 0
-%if 0%{!?rhel:1} || 0%{?rhel} > 7 || (0%{?rhel} == 7 && 0%{?scl:1})
+%if 0%{!?rhel:1} || 0%{?rhel} > 7
 %ifarch %{ix86} x86_64
 %global have_libipt 1
-%if 0%{?el7:1} && 0%{?scl:1}
-BuildRequires: cmake
-%else
 BuildRequires: libipt-devel%{buildisa}
 %endif
 %endif
-%endif
 %if 0%{!?rhel:1} || 0%{?rhel} > 6
 # See https://bugzilla.redhat.com/show_bug.cgi?id=1593280
 # DTS RHEL-6 has mpfr-2 while GDB requires mpfr-3 on RHEL-7, RHEL-8, and
@@ -509,10 +503,6 @@ This package provides INFO, HTML and PDF user manual for GDB.
 tar xJf %{SOURCE5}
 %endif # 0%{?rhel:1} && 0%{?rhel} <= 7
 
-%if 0%{have_libipt} && 0%{?el7:1} && 0%{?scl:1}
-tar xzf %{SOURCE7}
-%endif
-
 # Files have `# <number> <file>' statements breaking VPATH / find-debuginfo.sh .
 (cd gdb;rm -fv $(perl -pe 's/\\\n/ /' <Makefile.in|sed -n 's/^YYFILES = //p'))
 
@@ -729,26 +719,6 @@ export LDFLAGS="%{?__global_ldflags} %{?_with_asan:-fsanitize=address}"
 CFLAGS="$CFLAGS -DDNF_DEBUGINFO_INSTALL"
 %endif
 
-%if 0%{have_libipt} && 0%{?el7:1} && 0%{?scl:1}
-(
- mkdir libipt-%{libipt_version}-root
- mkdir libipt-%{libipt_version}-build
- cd    libipt-%{libipt_version}-build
- # -DPTUNIT:BOOL=ON has no effect on ctest.
- %cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo \
-	-DPTUNIT:BOOL=OFF \
-	-DDEVBUILD:BOOL=ON \
-	-DBUILD_SHARED_LIBS=OFF \
-	../../libipt-%{libipt_version}
- make VERBOSE=1 %{?_smp_mflags}
- ctest -V %{?_smp_mflags}
- make install DESTDIR=../libipt-%{libipt_version}-root
-)
-# There is also: --with-libipt-prefix
-CFLAGS="$CFLAGS -I$PWD/libipt-%{libipt_version}-root%{_includedir}"
-LDFLAGS="$LDFLAGS -L$PWD/libipt-%{libipt_version}-root%{_libdir}"
-%endif
-
 export CXXFLAGS="$CFLAGS"
 
 # For DTS11+, gcc defaults to c++17, causing issues with system-installed
@@ -1251,6 +1221,9 @@ fi
 %endif
 
 %changelog
+* Mon Apr 22 2024 Keith Seitz <keiths@redhat.com>
+- Remove gdb-linux_perf-bundle.patch.
+
 * Thu Mar 28 2024 Kevin Buettner <kevinb@redhat.com>
 - Drop gdb-6.5-bz185337-resolve-tls-without-debuginfo-v2.patch.  I've
   rewritten and expanded the test case and have submitted it for

                 reply	other threads:[~2026-06-28  0:01 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178260489748.1.16763051852393492472.rpms-gdb-deb8227d86d0@fedoraproject.org \
    --to=keiths@redhat.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox