From 8d8cc6acbcacceb69c4c2f32e825b9bb5a6aa43b Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Sep 27 2022 12:55:26 +0000 Subject: import systemtap-4.7-2.el9 --- diff --git a/.gitignore b/.gitignore index 5e535be..d6f13bf 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/systemtap-4.6.tar.gz +SOURCES/systemtap-4.7.tar.gz diff --git a/.systemtap.metadata b/.systemtap.metadata index dad6e4d..496d9fb 100644 --- a/.systemtap.metadata +++ b/.systemtap.metadata @@ -1 +1 @@ -ecc45371b378fc3824a5547b02c030b4123d6769 SOURCES/systemtap-4.6.tar.gz +fc943fc3233b111fd80c9cbd063859dc1b699dcb SOURCES/systemtap-4.7.tar.gz diff --git a/SOURCES/rhbz1972798.patch b/SOURCES/rhbz1972798.patch deleted file mode 100644 index e93607c..0000000 --- a/SOURCES/rhbz1972798.patch +++ /dev/null @@ -1,19 +0,0 @@ -commit 2c11a115bdbe41a7f064ccd32b41c76c5b7c516d -Author: Martin Cermak -Date: Wed Dec 1 14:04:57 2021 +0100 - - tapset/linux/nfs.stp: Fix rhbz1972798 - -diff --git a/tapset/linux/nfs.stp b/tapset/linux/nfs.stp -index 28f0b90ed..232289e3b 100644 ---- a/tapset/linux/nfs.stp -+++ b/tapset/linux/nfs.stp -@@ -979,7 +979,7 @@ probe nfs.aop.readpages = kernel.function ("nfs_readpages") !, - ino = $mapping->host->i_ino - - nr_pages = $nr_pages -- file = $filp -+ file = @choose_defined($filp, $file) - - rpages = __nfs_rpages($mapping->host) - rsize = __nfs_server_rsize($mapping->host) diff --git a/SOURCES/rhbz2025054python3.patch b/SOURCES/rhbz2025054python3.patch deleted file mode 100644 index 7f5f40c..0000000 --- a/SOURCES/rhbz2025054python3.patch +++ /dev/null @@ -1,95 +0,0 @@ -commit 241f53050f441808e673d19b42008779f555f484 (HEAD) -Author: Frank Ch. Eigler -Date: Fri Nov 19 22:22:45 2021 -0500 - - configury: let python3 be python3 - - Our baroque heuristics for identifying python2/3 under their various - historical aliases is showing its age. On some modern distros, - /usr/bin/python is to be positively NOT used. Fixing configure.ac - $PYTHON3 search to only look for python3, and not even consider - $PYTHON_UNKNOWN. At some point we'll want to simplify further, and - get rid of python2 remnants. - -diff --git a/configure b/configure -index 6d0d53992636..962323156181 100755 ---- a/configure -+++ b/configure -@@ -9350,49 +9350,7 @@ fi - as_fn_append ac_configure_args " python='$PYTHON' pyexecdir='$pyexecdir'" - - # Now let's try to find python version 3. --if test "x$PYTHON_UNKNOWN" != "xno" -a "x$ac_cv_python_unknown_version" = "x3"; then -- # Extract the first word of "python", so it can be a program name with args. --set dummy python; ac_word=$2 --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 --$as_echo_n "checking for $ac_word... " >&6; } --if ${ac_cv_path_PYTHON3+:} false; then : -- $as_echo_n "(cached) " >&6 --else -- case $PYTHON3 in -- [\\/]* | ?:[\\/]*) -- ac_cv_path_PYTHON3="$PYTHON3" # Let the user override the test with a path. -- ;; -- *) -- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR --for as_dir in $PATH --do -- IFS=$as_save_IFS -- test -z "$as_dir" && as_dir=. -- for ac_exec_ext in '' $ac_executable_extensions; do -- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then -- ac_cv_path_PYTHON3="$as_dir/$ac_word$ac_exec_ext" -- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -- break 2 -- fi --done -- done --IFS=$as_save_IFS -- -- ;; --esac --fi --PYTHON3=$ac_cv_path_PYTHON3 --if test -n "$PYTHON3"; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON3" >&5 --$as_echo "$PYTHON3" >&6; } --else -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 --$as_echo "no" >&6; } --fi -- -- --else -- for ac_prog in python3 python3.7 python3.6 python3.5 python3.4 python3.3 python3.2 python3.1 python3.0 -+for ac_prog in python3 python3.7 python3.6 python3.5 python3.4 python3.3 python3.2 python3.1 python3.0 - do - # Extract the first word of "$ac_prog", so it can be a program name with args. - set dummy $ac_prog; ac_word=$2 -@@ -9438,7 +9396,6 @@ fi - done - test -n "$PYTHON3" || PYTHON3=":" - --fi - python3_basename=$(basename "$PYTHON3") - - cat >>confdefs.h <<_ACEOF -diff --git a/configure.ac b/configure.ac -index b0a823604ca3..d1b1247637bb 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -88,12 +88,8 @@ fi - AS_VAR_APPEND([ac_configure_args], [" python='$PYTHON' pyexecdir='$pyexecdir'"]) - - # Now let's try to find python version 3. --if test "x$PYTHON_UNKNOWN" != "xno" -a "x$ac_cv_python_unknown_version" = "x3"; then -- AC_PATH_PROG([PYTHON3], [python]) --else -- AC_PATH_PROGS([PYTHON3], -- [python3 python3.7 python3.6 python3.5 python3.4 python3.3 python3.2 python3.1 python3.0], [:]) --fi -+AC_PATH_PROGS([PYTHON3], -+ [python3 python3.7 python3.6 python3.5 python3.4 python3.3 python3.2 python3.1 python3.0], [:]) - python3_basename=$(basename "$PYTHON3") - AC_DEFINE_UNQUOTED([PYTHON3_BASENAME], "${python3_basename}", - [Base name of the python3 interpreter binary.]) diff --git a/SOURCES/rhbz2027683.patch b/SOURCES/rhbz2027683.patch deleted file mode 100644 index 9ca6b52..0000000 --- a/SOURCES/rhbz2027683.patch +++ /dev/null @@ -1,29 +0,0 @@ -commit 39b5233271b997811632871e1b6620a89b384fe8 -Author: Martin Cermak -Date: Thu Jan 20 18:18:00 2022 +0100 - - Fix python probing rhbz2027683 - -diff --git a/tapset/python.stp b/tapset/python.stp -new file mode 100644 -index 000000000..b5d06fcd9 ---- /dev/null -+++ b/tapset/python.stp -@@ -0,0 +1,17 @@ -+/* Systemtap tapset to make it easier to trace Python */ -+ -+/* -+ Define python.function.entry/return: -+*/ -+probe python.function.entry = process("/usr/lib*/libpython*.so*").mark("function__entry") -+{ -+ filename = user_string($arg1); -+ funcname = user_string($arg2); -+ lineno = $arg3; -+} -+probe python.function.return = process("/usr/lib*/libpython*.so*").mark("function__return") -+{ -+ filename = user_string($arg1); -+ funcname = user_string($arg2); -+ lineno = $arg3; -+} diff --git a/SOURCES/rhbz2039207.patch b/SOURCES/rhbz2039207.patch deleted file mode 100644 index a966d16..0000000 --- a/SOURCES/rhbz2039207.patch +++ /dev/null @@ -1,80 +0,0 @@ -commit 5abded54b -Author: Stan Cox -Date: Fri Jan 28 15:28:27 2022 -0500 - - Attempt to access string in userspace if kernel access fails - - Add kernel_or_user_string_quoted(_utf16 _utf32) tapsets to handle - situations where a kernelspace access was assumed but string is in - userspace. - -diff --git a/tapset/linux/conversions.stp b/tapset/linux/conversions.stp -index 82f535f6c..d3d3a0b5a 100644 ---- a/tapset/linux/conversions.stp -+++ b/tapset/linux/conversions.stp -@@ -72,6 +72,17 @@ function kernel_string_quoted:string (addr:long) - (unsigned long)(uintptr_t)STAP_ARG_addr); - %} - -+/** -+ * sfunction kernel_or_user_string_quoted - Retrieves and quotes string from kernel or user memory -+ * -+ * @addr: the kernel or user memory address to retrieve the string from -+ * -+ * Similar to kernel_string_quoted except user memory is a fallback method -+ */ -+function kernel_or_user_string_quoted:string (addr:long) { -+ try { return string_quoted(kernel_string(addr)) } catch { return string_quoted(user_string(addr)) } -+} -+ - /** - * sfunction kernel_string_n - Retrieves string of given length from kernel memory - * @addr: The kernel address to retrieve the string from -@@ -160,6 +171,16 @@ function kernel_string_quoted_utf32:string (addr:long) { - try { return string_quoted(kernel_string_utf32(addr)) } catch { return sprintf("0x%x", addr) } - } - -+/** -+ * sfunction kernel_or_user_string_quoted_utf32 - Retrieves and quotes UTF-32 string from kernel or user memory -+ * -+ * @addr: the kernel or user memory address to retrieve the string from -+ * -+ * Similar to kernel_string_quoted_utf32 except user memory is a fallback method -+ */ -+function kernel_or_user_string_quoted_utf32:string (addr:long) { -+ try { return string_quoted(kernel_string_utf32(addr)) } catch { return string_quoted(user_string_utf32(addr)) } -+} - - /** - * sfunction kernel_string_utf16 - Retrieves UTF-16 string from kernel memory -@@ -242,6 +263,17 @@ function kernel_string_quoted_utf16:string (addr:long) { - try { return string_quoted(kernel_string_utf16(addr)) } catch { return sprintf("0x%x", addr) } - } - -+/** -+ * sfunction kernel_or_user_string_quoted_utf16 - Retrieves and quotes UTF-16 string from kernel or user memory -+ * -+ * @addr: the kernel or user memory address to retrieve the string from -+ * -+ * Similar to kernel_string_quoted_utf16 except uses user memory as a fallback method -+ */ -+function kernel_or_user_string_quoted_utf16:string (addr:long) { -+ try { return string_quoted(kernel_string_utf16(addr)) } catch { return string_quoted(user_string_utf16(addr)) } -+} -+ - - /** - * sfunction kernel_long - Retrieves a long value stored in kernel memory -diff --git a/tapsets.cxx b/tapsets.cxx -index 8fc5146e2..8b8f1cad5 100644 ---- a/tapsets.cxx -+++ b/tapsets.cxx -@@ -3757,7 +3757,7 @@ dwarf_pretty_print::print_chars (Dwarf_Die* start_type, target_symbol* e, - return false; - } - -- string function = userspace_p ? "user_string_quoted" : "kernel_string_quoted"; -+ string function = userspace_p ? "user_string_quoted" : "kernel_or_user_string_quoted"; - Dwarf_Word size = (Dwarf_Word) -1; - dwarf_formudata (dwarf_attr_integrate (&type, DW_AT_byte_size, &attr), &size); - switch (size) diff --git a/SOURCES/rhbz2041526.patch b/SOURCES/rhbz2041526.patch deleted file mode 100644 index c387e01..0000000 --- a/SOURCES/rhbz2041526.patch +++ /dev/null @@ -1,167 +0,0 @@ -diff --git a/tapset/linux/ioscheduler.stp b/tapset/linux/ioscheduler.stp -index abb24dac9..3096a73ea 100644 ---- a/tapset/linux/ioscheduler.stp -+++ b/tapset/linux/ioscheduler.stp -@@ -11,7 +11,9 @@ - // - %{ - #include -+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,14,0) - #include -+#endif - %} - - /** -@@ -76,7 +78,8 @@ probe ioscheduler.elv_completed_request - elevator_name = kernel_string( - @choose_defined($q->elevator->type->elevator_name, - @choose_defined($q->elevator->elevator_type->elevator_name, -- $q->elevator->elevator_name)), "") -+ @choose_defined($q->elevator->elevator_name, -+ 0))), "") - if($rq == 0) { - disk_major = -1 - disk_minor = -1 -@@ -114,7 +117,8 @@ probe ioscheduler.elv_add_request.kp = - elevator_name = kernel_string( - @choose_defined($q->elevator->type->elevator_name, - @choose_defined($q->elevator->elevator_type->elevator_name, -- $q->elevator->elevator_name)), "") -+ @choose_defined($q->elevator->elevator_name, -+ 0))), "") - q = $q - if($rq == 0) { - disk_major = -1 -@@ -152,7 +156,8 @@ probe ioscheduler.elv_add_request.tp = kernel.trace("block_rq_insert") ? - elevator_name = kernel_string( - @choose_defined($rq->q->elevator->type->elevator_name, - @choose_defined($rq->q->elevator->elevator_type->elevator_name, -- $rq->q->elevator->elevator_name)), "") -+ @choose_defined($rq->q->elevator->elevator_name, -+ 0))), "") - rq = $rq - - if ($rq == 0 || $rq->rq_disk ==0) { -@@ -201,7 +206,8 @@ probe ioscheduler_trace.elv_completed_request - elevator_name = kernel_string( - @choose_defined($rq->q->elevator->type->elevator_name, - @choose_defined($rq->q->elevator->elevator_type->elevator_name, -- $rq->q->elevator->elevator_name)), "") -+ @choose_defined($rq->q->elevator->elevator_name, -+ 0))), "") - - rq = $rq - -@@ -237,7 +243,8 @@ probe ioscheduler_trace.elv_issue_request - elevator_name = kernel_string( - @choose_defined($rq->q->elevator->type->elevator_name, - @choose_defined($rq->q->elevator->elevator_type->elevator_name, -- $rq->q->elevator->elevator_name)), "") -+ @choose_defined($rq->q->elevator->elevator_name, -+ 0))), "") - rq = $rq - - if ($rq == 0 || $rq->rq_disk ==0) { -@@ -272,7 +279,8 @@ probe ioscheduler_trace.elv_requeue_request - elevator_name = kernel_string( - @choose_defined($rq->q->elevator->type->elevator_name, - @choose_defined($rq->q->elevator->elevator_type->elevator_name, -- $rq->q->elevator->elevator_name)), "") -+ @choose_defined($rq->q->elevator->elevator_name, -+ 0))), "") - rq = $rq - - if ($rq == 0 || $rq->rq_disk ==0) { -@@ -306,7 +314,8 @@ probe ioscheduler_trace.elv_abort_request - elevator_name = kernel_string( - @choose_defined($rq->q->elevator->type->elevator_name, - @choose_defined($rq->q->elevator->elevator_type->elevator_name, -- $rq->q->elevator->elevator_name)), "") -+ @choose_defined($rq->q->elevator->elevator_name, -+ 0))), "") - rq = $rq - - if ($rq == 0 || $rq->rq_disk ==0) { -@@ -364,6 +373,9 @@ probe ioscheduler_trace.unplug_timer = kernel.trace("block_unplug_timer") ? - - function disk_major_from_request:long(var_q:long) - %{ /* pure */ -+#ifndef _ELEVATOR_H -+ STAP_ERROR ("unsupported (PR28634)"); -+#else - struct request_queue *q = (struct request_queue *)((uintptr_t)STAP_ARG_var_q); - - /* We need to make sure there isn't a deref hazard here when -@@ -382,10 +394,14 @@ function disk_major_from_request:long(var_q:long) - STAP_RETVALUE = kread(&(rq_disk->major)); - } - CATCH_DEREF_FAULT(); -+#endif - %} - - function disk_minor_from_request:long(var_q:long) - %{ /* pure */ -+#ifndef _ELEVATOR_H -+ STAP_ERROR ("unsupported (PR28634)"); -+#else - struct request_queue *q = (struct request_queue *)((uintptr_t)STAP_ARG_var_q); - - /* We need to make sure there isn't a deref hazard here when -@@ -404,4 +420,6 @@ function disk_minor_from_request:long(var_q:long) - STAP_RETVALUE = kread(&(rq_disk->first_minor)); - } - CATCH_DEREF_FAULT(); -+#endif - %} -+ -diff --git a/testsuite/systemtap.examples/io/iostat-scsi.stp b/testsuite/systemtap.examples/io/iostat-scsi.stp -index 6b1bf19ea..3faf32fe9 100755 ---- a/testsuite/systemtap.examples/io/iostat-scsi.stp -+++ b/testsuite/systemtap.examples/io/iostat-scsi.stp -@@ -26,6 +26,7 @@ probe module("sd_mod").function("sd_init_command") !, - %(kernel_v >= "2.6.31" %? - %{ - #include -+#include - %} - - function get_nr_sectors:long(rq:long) -@@ -47,13 +48,24 @@ probe sd_prep_fn = module("sd_mod").function("sd_prep_fn") !, - _cmd_flags = $rq->cmd_flags - } - -+function scsi_cmd_to_rq(scmd) { -+ return scmd - @cast_module_sizeof("kernel", "request") -+} -+ - probe sd_init_command = module("sd_mod").function("sd_init_command") !, - kernel.function("sd_init_command") - { -- device = kernel_string(@choose_defined($cmd, $SCpnt)->request->rq_disk->disk_name) -- sector_size = @choose_defined($cmd, $SCpnt)->device->sector_size -- nr_sectors = get_nr_sectors(@choose_defined($cmd, $SCpnt)->request) -- _cmd_flags = @choose_defined($cmd, $SCpnt)->request->cmd_flags -+ sector_size = @choose_defined($cmd, $SCpnt)->device->sector_size -+ # Kernel commits aa8e25e5006aac52c943c84e9056ab488630ee19 2266a2def97ce11ec979b6c58a1b637a16eca7dd -+ if (@defined(@choose_defined($cmd, $SCpnt)->request)) { -+ device = kernel_string(@choose_defined($cmd, $SCpnt)->request->rq_disk->disk_name) -+ nr_sectors = get_nr_sectors(@choose_defined($cmd, $SCpnt)->request) -+ _cmd_flags = @choose_defined($cmd, $SCpnt)->request->cmd_flags -+ } else { -+ device = kernel_string(@cast(scsi_cmd_to_rq(@choose_defined($cmd, $SCpnt)), "request", "kernel")->rq_disk->disk_name) -+ nr_sectors = get_nr_sectors(scsi_cmd_to_rq(@choose_defined($cmd, $SCpnt))) -+ _cmd_flags = @cast(scsi_cmd_to_rq(@choose_defined($cmd, $SCpnt)), "request", "kernel")->cmd_flags -+ } - } - - probe sd_prep_fn !, sd_init_command -@@ -71,7 +83,8 @@ probe sd_prep_fn !, sd_init_command - probe module("st").function("st_do_scsi").call !, - kernel.function("st_do_scsi").call - { -- device = kernel_string($STp->disk->disk_name) -+ # Kernel commit 45938335d0a9773d65a82a7ca722bb76e4b997a8 -+ device = kernel_string(@choose_defined($STp->disk->disk_name, $STp->name)) - devices[device] = 1 - if ($direction) - writes[device] <<< $bytes diff --git a/SOURCES/rhbz2047256.patch b/SOURCES/rhbz2047256.patch deleted file mode 100644 index 08260cd..0000000 --- a/SOURCES/rhbz2047256.patch +++ /dev/null @@ -1,179 +0,0 @@ -diff --git a/analysis.cxx b/analysis.cxx -index a7a579e..d0d6a4f 100644 ---- a/analysis.cxx -+++ b/analysis.cxx -@@ -7,6 +7,7 @@ - // later version. - - #include "config.h" -+#include "session.h" - - #ifdef HAVE_DYNINST - -@@ -46,6 +47,8 @@ analysis::analysis(string name) - char *name_str = strdup(name.c_str()); - sts = NULL; - co = NULL; -+ SymtabAPI::Symtab *symTab; -+ bool isParsable; - - // Use cached information if available - if (cached_info.find(name) != cached_info.end()) { -@@ -56,6 +59,9 @@ analysis::analysis(string name) - - // Not not seen before - // Create a new binary code object from the filename argument -+ isParsable = SymtabAPI::Symtab::openFile(symTab, name_str); -+ if(!isParsable) goto cleanup; -+ - sts = new SymtabCodeSource(name_str); - if(!sts) goto cleanup; - -@@ -143,39 +149,40 @@ static const MachRegister dyninst_register_64[] = { - static const MachRegister dyninst_register_32[1]; // No 32-bit support - - #elif defined(__powerpc__) -+/* For ppc64 still use the ppc32 register names */ - static const MachRegister dyninst_register_64[] = { -- ppc64::r0, -- ppc64::r1, -- ppc64::r2, -- ppc64::r3, -- ppc64::r4, -- ppc64::r5, -- ppc64::r6, -- ppc64::r7, -- ppc64::r8, -- ppc64::r9, -- ppc64::r10, -- ppc64::r11, -- ppc64::r12, -- ppc64::r13, -- ppc64::r14, -- ppc64::r15, -- ppc64::r16, -- ppc64::r17, -- ppc64::r18, -- ppc64::r19, -- ppc64::r20, -- ppc64::r21, -- ppc64::r22, -- ppc64::r23, -- ppc64::r24, -- ppc64::r25, -- ppc64::r26, -- ppc64::r27, -- ppc64::r28, -- ppc64::r29, -- ppc64::r30, -- ppc64::r31 -+ ppc32::r0, -+ ppc32::r1, -+ ppc32::r2, -+ ppc32::r3, -+ ppc32::r4, -+ ppc32::r5, -+ ppc32::r6, -+ ppc32::r7, -+ ppc32::r8, -+ ppc32::r9, -+ ppc32::r10, -+ ppc32::r11, -+ ppc32::r12, -+ ppc32::r13, -+ ppc32::r14, -+ ppc32::r15, -+ ppc32::r16, -+ ppc32::r17, -+ ppc32::r18, -+ ppc32::r19, -+ ppc32::r20, -+ ppc32::r21, -+ ppc32::r22, -+ ppc32::r23, -+ ppc32::r24, -+ ppc32::r25, -+ ppc32::r26, -+ ppc32::r27, -+ ppc32::r28, -+ ppc32::r29, -+ ppc32::r30, -+ ppc32::r31 - }; - - static const MachRegister dyninst_register_32[] = { -@@ -218,14 +225,26 @@ static const MachRegister dyninst_register_32[] = { - typedef map precomputed_liveness; - static precomputed_liveness cached_liveness; - --int liveness(string executable, -+int liveness(systemtap_session& s, -+ target_symbol *e, -+ string executable, - Dwarf_Addr addr, - location_context ctx) - { -+ try{ -+ // Doing this inside a try/catch because dyninst may require -+ // too much memory to parse the binary. - // should cache the executable names like the other things - analysis func_to_analyze(executable); - MachRegister r; - -+ // Punt if unsuccessful in parsing binary -+ if (!func_to_analyze.co){ -+ s.print_warning(_F("liveness analysis unable to parse binary %s", -+ executable.c_str()), e->tok); -+ return 0; -+ } -+ - // Determine whether 32-bit or 64-bit code as the register names are different in dyninst - int reg_width = func_to_analyze.co->cs()->getAddressWidth(); - -@@ -282,6 +301,11 @@ int liveness(string executable, - bool used; - la->query(iloc, LivenessAnalyzer::Before, r, used); - return (used ? 1 : -1); -+ } catch (std::bad_alloc & ex){ -+ s.print_warning(_F("unable to allocate memory for liveness analysis of %s", -+ executable.c_str()), e->tok); -+ return 0; -+ } - } - - #endif // HAVE_DYNINST -diff --git a/analysis.h b/analysis.h -index 9b6d115..6bea675 100644 ---- a/analysis.h -+++ b/analysis.h -@@ -17,13 +17,15 @@ - - #ifdef HAVE_DYNINST - --extern int liveness(std::string executable, -+extern int liveness(systemtap_session& s, -+ target_symbol *e, -+ std::string executable, - Dwarf_Addr location, - location_context ctx); - - #else - --#define liveness(executable, location, var) (0) -+#define liveness(session, target, executable, location, var) (0) - - #endif // HAVE_DYNINST - #endif // ANALYSIS_H -diff --git a/tapsets.cxx b/tapsets.cxx -index 60794bb..8fc5146 100644 ---- a/tapsets.cxx -+++ b/tapsets.cxx -@@ -4732,7 +4732,7 @@ dwarf_var_expanding_visitor::visit_target_symbol (target_symbol *e) - - // Now that have location information check if change to variable has any effect - if (lvalue) { -- if (liveness(q.dw.mod_info->elf_path, addr, ctx) < 0) { -+ if (liveness(q.sess, e, q.dw.mod_info->elf_path, addr, ctx) < 0) { - q.sess.print_warning(_F("write at %p will have no effect", - (void *)addr), e->tok); - } diff --git a/SOURCES/rhbz2058908.patch b/SOURCES/rhbz2058908.patch deleted file mode 100644 index fcfbc0e..0000000 --- a/SOURCES/rhbz2058908.patch +++ /dev/null @@ -1,27 +0,0 @@ -commit aa27023c941f88da383e8f2eeec2a81312243e6e -Author: Frank Ch. Eigler -Date: Fri Mar 11 10:29:55 2022 -0500 - - sys/sdt.h: set x86-64 STAP_SDT_ASM_CONSTRAINT back to "nor" - - It turns out the kernel and some other sdt consumers haven't learned - how to use %xmm registers in sdt operands. So under this duress, stap - will go back to the old school integer register set "nor" as a - default. We'll revisit this in the future, though this egg might not - turn into a chicken. - - https://bugzilla.redhat.com/show_bug.cgi?id=2058908 - -diff --git a/includes/sys/sdt.h b/includes/sys/sdt.h -index 48cb7263f..ca0162b4d 100644 ---- a/includes/sys/sdt.h -+++ b/includes/sys/sdt.h -@@ -100,8 +100,6 @@ - # ifndef STAP_SDT_ARG_CONSTRAINT - # if defined __powerpc__ - # define STAP_SDT_ARG_CONSTRAINT nZr --# elif defined __x86_64__ --# define STAP_SDT_ARG_CONSTRAINT norx - # else - # define STAP_SDT_ARG_CONSTRAINT nor - # endif diff --git a/SOURCES/rhbz2081102.patch b/SOURCES/rhbz2081102.patch new file mode 100644 index 0000000..74b8287 --- /dev/null +++ b/SOURCES/rhbz2081102.patch @@ -0,0 +1,258 @@ +commit 093b972294256b3ad68712daecdfdc5da1418a13 +Author: Martin Cermak +Date: Mon May 9 20:00:15 2022 +0200 + + refix PR28634 for rhel8+ kernels + + The rhel kernel backports do not always align to upstream, so that + the KERNEL_VERSION() based gate needs to be updated using a version + that does the expected thing for the rhel{7,8,9} kernels. + +diff --git a/tapset/linux/ioscheduler.stp b/tapset/linux/ioscheduler.stp +index 3096a73ea..c7231878d 100644 +--- a/tapset/linux/ioscheduler.stp ++++ b/tapset/linux/ioscheduler.stp +@@ -11,7 +11,7 @@ + // + %{ + #include +-#if LINUX_VERSION_CODE < KERNEL_VERSION(5,16,0) ++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,18,0) + #include + #endif + %} +@@ -41,7 +41,7 @@ probe ioscheduler.elv_next_request = kernel.function("blk_peek_request") !, + */ + probe ioscheduler.elv_next_request.return = + kernel.function("blk_peek_request").return !, +- kernel.function("elv_next_request").return ++ kernel.function("elv_next_request").return ? + { + name = "elv_next_request" + if ($return == 0) { +@@ -80,18 +80,14 @@ probe ioscheduler.elv_completed_request + @choose_defined($q->elevator->elevator_type->elevator_name, + @choose_defined($q->elevator->elevator_name, + 0))), "") +- if($rq == 0) { +- disk_major = -1 +- disk_minor = -1 +- } else { +- if($rq->rq_disk == 0) { +- disk_major = -1 +- disk_minor = -1 +- } else { +- disk_major = $rq->rq_disk->major +- disk_minor = $rq->rq_disk->first_minor +- } +- } ++ disk_major = -1 ++ disk_minor = -1 ++ // kernel f3fa33acca9f0058157214800f68b10d8e71ab7a ++ // block: remove the ->rq_disk field in struct request ++ if(@defined($rq->rq_disk) && ($rq->rq_disk != 0)) { ++ disk_major = $rq->rq_disk->major ++ disk_minor = $rq->rq_disk->first_minor ++ } + + rq = $rq + rq_flags = ($rq == 0) ? 0 +@@ -111,7 +107,7 @@ probe ioscheduler.elv_completed_request + // when a request is added to the request queue + probe ioscheduler.elv_add_request.kp = + kernel.function("elv_insert") !, +- kernel.function("__elv_add_request") ++ kernel.function("__elv_add_request") ? + { + name = "elv_add_request" + elevator_name = kernel_string( +@@ -120,18 +116,15 @@ probe ioscheduler.elv_add_request.kp = + @choose_defined($q->elevator->elevator_name, + 0))), "") + q = $q +- if($rq == 0) { +- disk_major = -1 +- disk_minor = -1 +- } else { +- if($rq->rq_disk == 0) { +- disk_major = -1 +- disk_minor = -1 +- } else { +- disk_major = $rq->rq_disk->major +- disk_minor = $rq->rq_disk->first_minor +- } +- } ++ ++ disk_major = -1 ++ disk_minor = -1 ++ // kernel f3fa33acca9f0058157214800f68b10d8e71ab7a ++ // block: remove the ->rq_disk field in struct request ++ if(@defined($rq->rq_disk) && ($rq->rq_disk != 0)) { ++ disk_major = $rq->rq_disk->major ++ disk_minor = $rq->rq_disk->first_minor ++ } + + rq = $rq + rq_flags = ($rq == 0) ? 0 +@@ -160,11 +153,11 @@ probe ioscheduler.elv_add_request.tp = kernel.trace("block_rq_insert") ? + 0))), "") + rq = $rq + +- if ($rq == 0 || $rq->rq_disk ==0) { +- disk_major = -1 +- disk_minor = -1 +- } +- else { ++ disk_major = -1 ++ disk_minor = -1 ++ // kernel f3fa33acca9f0058157214800f68b10d8e71ab7a ++ // block: remove the ->rq_disk field in struct request ++ if(@defined($rq->rq_disk) && ($rq->rq_disk != 0)) { + disk_major = $rq->rq_disk->major + disk_minor = $rq->rq_disk->first_minor + } +@@ -184,7 +177,7 @@ probe ioscheduler.elv_add_request.tp = kernel.trace("block_rq_insert") ? + * + */ + probe ioscheduler.elv_add_request = +- ioscheduler.elv_add_request.tp !, ioscheduler.elv_add_request.kp ++ ioscheduler.elv_add_request.tp !, ioscheduler.elv_add_request.kp ? + {} + + /** +@@ -211,14 +204,14 @@ probe ioscheduler_trace.elv_completed_request + + rq = $rq + +- if ($rq == 0 || $rq->rq_disk ==0) { +- disk_major = -1 +- disk_minor = -1 +- } +- else { +- disk_major = $rq->rq_disk->major +- disk_minor = $rq->rq_disk->first_minor +- } ++ disk_major = -1 ++ disk_minor = -1 ++ // kernel f3fa33acca9f0058157214800f68b10d8e71ab7a ++ // block: remove the ->rq_disk field in struct request ++ if(@defined($rq->rq_disk) && ($rq->rq_disk != 0)) { ++ disk_major = $rq->rq_disk->major ++ disk_minor = $rq->rq_disk->first_minor ++ } + + rq_flags = ($rq == 0) ? 0 + : @choose_defined($rq->cmd_flags, $rq->flags) +@@ -247,14 +240,14 @@ probe ioscheduler_trace.elv_issue_request + 0))), "") + rq = $rq + +- if ($rq == 0 || $rq->rq_disk ==0) { +- disk_major = -1 +- disk_minor = -1 +- } +- else { ++ disk_major = -1 ++ disk_minor = -1 ++ // kernel f3fa33acca9f0058157214800f68b10d8e71ab7a ++ // block: remove the ->rq_disk field in struct request ++ if(@defined($rq->rq_disk) && ($rq->rq_disk != 0)) { + disk_major = $rq->rq_disk->major + disk_minor = $rq->rq_disk->first_minor +- } ++ } + + rq_flags = ($rq == 0) ? 0 + : @choose_defined($rq->cmd_flags, $rq->flags) +@@ -283,14 +276,14 @@ probe ioscheduler_trace.elv_requeue_request + 0))), "") + rq = $rq + +- if ($rq == 0 || $rq->rq_disk ==0) { +- disk_major = -1 +- disk_minor = -1 +- } +- else { +- disk_major = $rq->rq_disk->major +- disk_minor = $rq->rq_disk->first_minor +- } ++ disk_major = -1 ++ disk_minor = -1 ++ // kernel f3fa33acca9f0058157214800f68b10d8e71ab7a ++ // block: remove the ->rq_disk field in struct request ++ if(@defined($rq->rq_disk) && ($rq->rq_disk != 0)) { ++ disk_major = $rq->rq_disk->major ++ disk_minor = $rq->rq_disk->first_minor ++ } + + rq_flags = ($rq == 0) ? 0 + : @choose_defined($rq->cmd_flags, $rq->flags) +@@ -318,14 +311,14 @@ probe ioscheduler_trace.elv_abort_request + 0))), "") + rq = $rq + +- if ($rq == 0 || $rq->rq_disk ==0) { +- disk_major = -1 +- disk_minor = -1 +- } +- else { +- disk_major = $rq->rq_disk->major +- disk_minor = $rq->rq_disk->first_minor +- } ++ disk_major = -1 ++ disk_minor = -1 ++ // kernel f3fa33acca9f0058157214800f68b10d8e71ab7a ++ // block: remove the ->rq_disk field in struct request ++ if(@defined($rq->rq_disk) && ($rq->rq_disk != 0)) { ++ disk_major = $rq->rq_disk->major ++ disk_minor = $rq->rq_disk->first_minor ++ } + + rq_flags = ($rq == 0) ? 0 + : @choose_defined($rq->cmd_flags, $rq->flags) +diff --git a/testsuite/buildok/ioscheduler-all-probes.stp b/testsuite/buildok/ioscheduler-all-probes.stp +index da182c774..a8d8e08c5 100755 +--- a/testsuite/buildok/ioscheduler-all-probes.stp ++++ b/testsuite/buildok/ioscheduler-all-probes.stp +@@ -2,6 +2,6 @@ + + // Tests if all probes in the ioscheduler tapset are resolvable. + +-probe ioscheduler.*, ioscheduler.*.return {} ++probe ioscheduler.* ?, ioscheduler.*.return ? {} + + probe ioscheduler_trace.* ? {} +diff --git a/testsuite/buildok/ioscheduler-detailed.stp b/testsuite/buildok/ioscheduler-detailed.stp +index 143f20cd6..033e955dc 100755 +--- a/testsuite/buildok/ioscheduler-detailed.stp ++++ b/testsuite/buildok/ioscheduler-detailed.stp +@@ -6,24 +6,24 @@ + # test the kprobes aliases (*.kp). This could cause them to get out + # of sync with the kprobed functions. So, we test them explicitly. + +-probe ioscheduler.elv_next_request ++probe ioscheduler.elv_next_request ? + { + printf("%s: %s\n", name, elevator_name) + } +-probe ioscheduler.elv_next_request.return ++probe ioscheduler.elv_next_request.return ? + { + printf("name: %s, %d, %d, %p, %d", name, disk_major, + disk_minor, rq, rq_flags) + } + +-probe ioscheduler.elv_completed_request ++probe ioscheduler.elv_completed_request ? + { + printf("name: %s, elv_name: %s, %d, %d, %p, %d", name, elevator_name, + disk_major, disk_minor, rq, rq_flags) + } + +-probe ioscheduler.elv_add_request, +- ioscheduler.elv_add_request.kp, ++probe ioscheduler.elv_add_request ?, ++ ioscheduler.elv_add_request.kp ?, + ioscheduler.elv_add_request.tp ? + { + printf("name: %s, elv_name: %s, %d, %d, %p, %d", name, elevator_name, diff --git a/SOURCES/rhbz2085647.patch b/SOURCES/rhbz2085647.patch new file mode 100644 index 0000000..e136240 --- /dev/null +++ b/SOURCES/rhbz2085647.patch @@ -0,0 +1,66 @@ +commit a0fa7bf0b68058d8f41a5fde608362172a2c3d77 +Author: Martin Cermak +Date: Wed May 11 22:22:00 2022 +0200 + + Update examples/io/iostat-scsi.stp for modern rhel9 kernels. + + Update examples/io/iostat-scsi.stp for kernels having following + upstream kernel commit backported: + + commit f3fa33acca9f0058157214800f68b10d8e71ab7a + Author: Christoph Hellwig + Date: Fri Nov 26 13:18:00 2021 +0100 + + block: remove the ->rq_disk field in struct request + + Just use the disk attached to the request_queue instead. + + [ ... stuff deleted ... ] + +diff --git a/testsuite/systemtap.examples/io/iostat-scsi.stp b/testsuite/systemtap.examples/io/iostat-scsi.stp +index 3faf32fe9..aa0238a7b 100755 +--- a/testsuite/systemtap.examples/io/iostat-scsi.stp ++++ b/testsuite/systemtap.examples/io/iostat-scsi.stp +@@ -2,12 +2,18 @@ + + global devices, reads, writes + ++/* kernel commit f3fa33acca9f0058157214800f68b10d8e71ab7a */ ++@define __disk_name(__request) ++%( ++ ( @choose_defined(@__request->rq_disk->disk_name, @__request->q->disk->disk_name ) ) ++%) ++ + /* data collection: SCSI disk */ + %(kernel_v < "2.6.24" %? + probe module("sd_mod").function("sd_init_command") !, + kernel.function("sd_init_command") + { +- device = kernel_string($SCpnt->request->rq_disk->disk_name) ++ device = kernel_string(@__disk_name($SCpnt->request)) + sector_size = $SCpnt->device->sector_size + nr_sectors = $SCpnt->request->nr_sectors + devices[device] = 1 +@@ -38,7 +44,7 @@ function get_nr_sectors:long(rq:long) + probe sd_prep_fn = module("sd_mod").function("sd_prep_fn") !, + kernel.function("sd_prep_fn") + { +- device = kernel_string($rq->rq_disk->disk_name) ++ device = kernel_string(@__disk_name($rq)) + sector_size = @cast($q->queuedata, "scsi_device", "kernel")->sector_size + %(kernel_v>="2.6.31" %? + nr_sectors = get_nr_sectors($rq) +@@ -58,11 +64,11 @@ probe sd_init_command = module("sd_mod").function("sd_init_command") !, + sector_size = @choose_defined($cmd, $SCpnt)->device->sector_size + # Kernel commits aa8e25e5006aac52c943c84e9056ab488630ee19 2266a2def97ce11ec979b6c58a1b637a16eca7dd + if (@defined(@choose_defined($cmd, $SCpnt)->request)) { +- device = kernel_string(@choose_defined($cmd, $SCpnt)->request->rq_disk->disk_name) ++ device = kernel_string(@__disk_name(@choose_defined($cmd, $SCpnt)->request)) + nr_sectors = get_nr_sectors(@choose_defined($cmd, $SCpnt)->request) + _cmd_flags = @choose_defined($cmd, $SCpnt)->request->cmd_flags + } else { +- device = kernel_string(@cast(scsi_cmd_to_rq(@choose_defined($cmd, $SCpnt)), "request", "kernel")->rq_disk->disk_name) ++ device = kernel_string(@__disk_name(@cast(scsi_cmd_to_rq(@choose_defined($cmd, $SCpnt)), "request", "kernel"))) + nr_sectors = get_nr_sectors(scsi_cmd_to_rq(@choose_defined($cmd, $SCpnt))) + _cmd_flags = @cast(scsi_cmd_to_rq(@choose_defined($cmd, $SCpnt)), "request", "kernel")->cmd_flags + } diff --git a/SOURCES/sdt-asm-glibc.patch b/SOURCES/sdt-asm-glibc.patch deleted file mode 100644 index 0aa9261..0000000 --- a/SOURCES/sdt-asm-glibc.patch +++ /dev/null @@ -1,154 +0,0 @@ -commit ecab2afea46099b4e7dfd551462689224afdbe3a -Author: Stan Cox -Date: Wed Dec 1 16:19:22 2021 -0500 - - Handle user supplied sdt probe argument template - - User supplied templates were erroneously removed by commit eaa15b047, - which complicated the template expansion. To do the above the - expansion of STAP_PROBE_ASM(provider, fooprobe, - STAP_PROBE_ASM_TEMPLATE(3)) adds an unused argument: - STAP_PROBE_ASM(provider, fooprobe, /*template expansion*/ "%[SDT..]..", - "use _SDT_ASM_TEMPLATE") A supplied template - STAP_PROBE_ASM(provider, fooprobe, "4@%rdx 8@%rax") is left alone. If - the varargs has 2 args (the fake "use ..") then macro expansion - inserts the expanded string, otherwise "4@.." becomes an ascii op. - -diff --git a/includes/sys/sdt.h b/includes/sys/sdt.h -index 28d236d91..24d5e01c3 100644 ---- a/includes/sys/sdt.h -+++ b/includes/sys/sdt.h -@@ -290,7 +290,7 @@ __extension__ extern unsigned long long __sdt_unsp; - _SDT_ASM_1(.purgem _SDT_TYPE_) \ - _SDT_ASM_1(.purgem _SDT_TYPE) - --#define _SDT_ASM_BODY(provider, name, pack_args, args) \ -+#define _SDT_ASM_BODY(provider, name, pack_args, args, ...) \ - _SDT_DEF_MACROS \ - _SDT_ASM_1(990: _SDT_NOP) \ - _SDT_ASM_3( .pushsection .note.stapsdt,_SDT_ASM_AUTOGROUP,"note") \ -@@ -417,9 +417,9 @@ __extension__ extern unsigned long long __sdt_unsp; - counted, so we don't have to worry about the behavior of macros - called without any arguments. */ - --#ifdef SDT_USE_VARIADIC - #define _SDT_NARG(...) __SDT_NARG(__VA_ARGS__, 12,11,10,9,8,7,6,5,4,3,2,1,0) - #define __SDT_NARG(_0,_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,_11,_12, N, ...) N -+#ifdef SDT_USE_VARIADIC - #define _SDT_PROBE_N(provider, name, N, ...) \ - _SDT_PROBE(provider, name, N, (__VA_ARGS__)) - #define STAP_PROBEV(provider, name, ...) \ -@@ -468,9 +468,15 @@ __extension__ extern unsigned long long __sdt_unsp; - Note that these can use operand templates like %0 or %[name], - and likewise they must write %%reg for a literal operand of %reg. */ - -+#define _SDT_ASM_BODY_1(p,n,...) _SDT_ASM_BODY(p,n,_SDT_ASM_SUBSTR,(__VA_ARGS__)) -+#define _SDT_ASM_BODY_2(p,n,...) _SDT_ASM_BODY(p,n,/*_SDT_ASM_STRING */,__VA_ARGS__) -+#define _SDT_ASM_BODY_N2(p,n,no,...) _SDT_ASM_BODY_ ## no(p,n,__VA_ARGS__) -+#define _SDT_ASM_BODY_N1(p,n,no,...) _SDT_ASM_BODY_N2(p,n,no,__VA_ARGS__) -+#define _SDT_ASM_BODY_N(p,n,...) _SDT_ASM_BODY_N1(p,n,_SDT_NARG(0, __VA_ARGS__),__VA_ARGS__) -+ - #if __STDC_VERSION__ >= 199901L - # define STAP_PROBE_ASM(provider, name, ...) \ -- _SDT_ASM_BODY(provider, name, /*_SDT_ASM_STRING */, __VA_ARGS__) \ -+ _SDT_ASM_BODY_N(provider, name, __VA_ARGS__) \ - _SDT_ASM_BASE - # define STAP_PROBE_ASM_OPERANDS(n, ...) _SDT_ASM_OPERANDS_##n(__VA_ARGS__) - #else -@@ -478,7 +484,7 @@ __extension__ extern unsigned long long __sdt_unsp; - _SDT_ASM_BODY(provider, name, /* _SDT_ASM_STRING */, (args)) \ - _SDT_ASM_BASE - #endif --#define STAP_PROBE_ASM_TEMPLATE(n) _SDT_ASM_TEMPLATE_##n -+#define STAP_PROBE_ASM_TEMPLATE(n) _SDT_ASM_TEMPLATE_##n,"use _SDT_ASM_TEMPLATE_" - - - /* DTrace compatible macro names. */ -diff --git a/testsuite/systemtap.base/sdt_casm.c b/testsuite/systemtap.base/sdt_casm.c -index 1cff23c5f..9b357086c 100644 ---- a/testsuite/systemtap.base/sdt_casm.c -+++ b/testsuite/systemtap.base/sdt_casm.c -@@ -3,6 +3,7 @@ - int main() - { - int x = 42; -+ int y = 43; - __asm__ __volatile__ ( - STAP_PROBE_ASM(testsuite, probe0, STAP_PROBE_ASM_TEMPLATE(0)) - ); -@@ -10,5 +11,9 @@ int main() - STAP_PROBE_ASM(testsuite, probe1, STAP_PROBE_ASM_TEMPLATE(1)) - :: STAP_PROBE_ASM_OPERANDS(1, x) - ); -+ // Create a template to test explicit template support -+ __asm__ __volatile__ ( -+ STAP_PROBE_ASM(testsuite, probe2, -4@%[ARG1] -4@%[ARG2]) -+ :: [ARG1] "rm" (x), [ARG2] "rm" (y)); - return 0; - } -diff --git a/testsuite/systemtap.base/sdt_casm.exp b/testsuite/systemtap.base/sdt_casm.exp -index 5791cb2b9..0cd1cb517 100644 ---- a/testsuite/systemtap.base/sdt_casm.exp -+++ b/testsuite/systemtap.base/sdt_casm.exp -@@ -18,7 +18,8 @@ proc cleanup_handler { verbose } { - - set script $srcdir/$subdir/$test.stp - set ::result_string {PASS: probe0 --PASS: probe1} -+PASS: probe1 -+PASS: probe2} - - set asm_flags [sdt_includes] - set asm_flags "$asm_flags additional_flags=-std=c99" -diff --git a/testsuite/systemtap.base/sdt_casm.stp b/testsuite/systemtap.base/sdt_casm.stp -index 4f2539c93..530a79175 100644 ---- a/testsuite/systemtap.base/sdt_casm.stp -+++ b/testsuite/systemtap.base/sdt_casm.stp -@@ -10,3 +10,11 @@ probe process.mark("probe1") - else - printf("FAIL: %s (%d != 42)\n", $$name, $arg1) - } -+ -+probe process.mark("probe2") -+{ -+ if ($arg1 == 42 && $arg2 == 43) -+ printf("PASS: %s\n", $$name) -+ else -+ printf("FAIL: %s (%d/%d != 42/43)\n", $$name, $arg1, $arg2) -+} -commit 209b5a19c (HEAD -> master, origin/master, origin/HEAD) -Author: Stan Cox -Date: Tue Dec 7 09:55:01 2021 -0500 - - sys/sdt.h fp constraints: aarch64, s390 - - Remove float constraints as per commit 1d3653936 but for aarch64 and s390. - -commit 1d3653936 (HEAD -> master, origin/master, origin/HEAD) -Author: Frank Ch. Eigler -Date: Mon Dec 6 12:06:06 2021 -0500 - - sys/sdt.h fp constraints cont'd, x86-64 edition - - It appears that various versions of gcc continue to show signs of - confusion at our newly offered asm-operand alternatives for floating - point sdt.h marker parameters. - - e.g., https://bugzilla.redhat.com/show_bug.cgi?id=2028798 - - We may need to restore previous constraints broadly, forcing the - compiler to plop floating point parameters into integer storage. - ---- a/includes/sys/sdt.h -+++ b/includes/sys/sdt.h -@@ -102,9 +102,5 @@ - # define STAP_SDT_ARG_CONSTRAINT nZr - # elif defined __x86_64__ --# define STAP_SDT_ARG_CONSTRAINT norfxy --# elif defined __aarch64__ --# define STAP_SDT_ARG_CONSTRAINT norw --# elif defined __s390__ || defined __s390x__ --# define STAP_SDT_ARG_CONSTRAINT norf -+# define STAP_SDT_ARG_CONSTRAINT norx - # else - # define STAP_SDT_ARG_CONSTRAINT nor diff --git a/SPECS/systemtap.spec b/SPECS/systemtap.spec index ac916a1..ca71be9 100644 --- a/SPECS/systemtap.spec +++ b/SPECS/systemtap.spec @@ -117,8 +117,8 @@ m stapdev stapdev Name: systemtap -Version: 4.6 -Release: 12%{?release_override}%{?dist} +Version: 4.7 +Release: 2%{?release_override}%{?dist} # for version, see also configure.ac @@ -154,14 +154,8 @@ License: GPLv2+ URL: http://sourceware.org/systemtap/ Source: ftp://sourceware.org/pub/systemtap/releases/systemtap-%{version}.tar.gz -Patch1: rhbz2025054python3.patch -Patch2: rhbz1972798.patch -Patch3: sdt-asm-glibc.patch -Patch4: rhbz2041526.patch -Patch5: rhbz2027683.patch -Patch6: rhbz2047256.patch -Patch7: rhbz2039207.patch -Patch8: rhbz2058908.patch +Patch1: rhbz2081102.patch +Patch2: rhbz2085647.patch # Build* BuildRequires: make @@ -582,15 +576,8 @@ systemtap-runtime-virthost machine to execute systemtap scripts. %prep %setup -q - %patch1 -p1 %patch2 -p1 -%patch3 -p1 -%patch4 -p1 -%patch5 -p1 -%patch6 -p1 -%patch7 -p1 -%patch8 -p1 %build @@ -758,6 +745,9 @@ install -m 644 initscript/logrotate.stap-server $RPM_BUILD_ROOT%{_sysconfdir}/lo %if %{with_systemd} mkdir -p $RPM_BUILD_ROOT%{_unitdir} touch $RPM_BUILD_ROOT%{_unitdir}/systemtap.service +# RHBZ2070857 +mkdir -p $RPM_BUILD_ROOT%{_presetdir} +echo 'enable systemtap.service' > $RPM_BUILD_ROOT%{_presetdir}/42-systemtap.preset install -m 644 initscript/systemtap.service $RPM_BUILD_ROOT%{_unitdir}/systemtap.service mkdir -p $RPM_BUILD_ROOT%{_sbindir} install -m 755 initscript/systemtap $RPM_BUILD_ROOT%{_sbindir}/systemtap-service @@ -939,7 +929,8 @@ exit 0 %post initscript %if %{with_systemd} - /bin/systemctl enable systemtap.service >/dev/null 2>&1 || : + # RHBZ2070857 - use systemd presets instead + # /bin/systemctl enable systemtap.service >/dev/null 2>&1 || : %else /sbin/chkconfig --add systemtap %endif @@ -1092,6 +1083,7 @@ exit 0 %files devel -f systemtap.lang %{_bindir}/stap %{_bindir}/stap-prep +%{_bindir}/stap-profile-annotate %{_bindir}/stap-report %dir %{_datadir}/systemtap %{_datadir}/systemtap/runtime @@ -1192,6 +1184,7 @@ exit 0 %files initscript %if %{with_systemd} +%{_presetdir}/42-systemtap.preset %{_unitdir}/systemtap.service %{_sbindir}/systemtap-service %else @@ -1287,8 +1280,12 @@ exit 0 # PRERELEASE %changelog -* Fri Mar 11 2022 Frank Ch. Eigler - 4.6-12 -- rhbz2058908: Change sys/sdt.h on x86-64 to stop allowing xmm registers +* Tue May 17 2022 Martin Cermak - 4.1-2 +- Fix rhbz2081102 and rhbz2085647 + +* Mon May 02 2022 Frank Ch. Eigler - 4.7-1 +- Upstream release, see wiki page below for detailed notes. + https://sourceware.org/systemtap/wiki/SystemTapReleases * Wed Feb 2 2022 Stan Cox - 4.6-11 - rhbz2039207: Attempt userspace string access if kernel access fails