From c899d74a39cb58b9194ef15096a57bb3748e953f82c10d4051a3f6ee4fe12475 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Fri, 9 Mar 2007 00:51:26 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemtap?expand=0&rev=9 --- systemtap-probe-at-function-entry.diff | 102 +++++++++++++++++++ systemtap-s390x-probe-at-function-entry.diff | 15 --- systemtap.changes | 7 ++ systemtap.spec | 10 +- 4 files changed, 116 insertions(+), 18 deletions(-) create mode 100644 systemtap-probe-at-function-entry.diff delete mode 100644 systemtap-s390x-probe-at-function-entry.diff diff --git a/systemtap-probe-at-function-entry.diff b/systemtap-probe-at-function-entry.diff new file mode 100644 index 0000000..0362016 --- /dev/null +++ b/systemtap-probe-at-function-entry.diff @@ -0,0 +1,102 @@ +diff -Naur F/hash.cxx P/hash.cxx +--- F/hash.cxx 2007-02-13 16:12:11.000000000 -0800 ++++ P/hash.cxx 2007-02-13 16:11:31.000000000 -0800 +@@ -97,6 +97,7 @@ + h.add(s.bulk_mode); // '-b' + h.add(s.merge); // '-M' + h.add(s.timing); // '-t' ++ h.add(s.prologue_searching); // '-P' + for (unsigned i = 0; i < s.macros.size(); i++) + h.add(s.macros[i]); + +diff -Naur F/main.cxx P/main.cxx +--- F/main.cxx 2007-02-13 16:12:11.000000000 -0800 ++++ P/main.cxx 2007-02-13 16:11:31.000000000 -0800 +@@ -71,6 +71,8 @@ + << " -k keep temporary directory" << endl + << " -u unoptimized translation" << (s.unoptimized ? " [set]" : "") << endl + << " -g guru mode" << (s.guru_mode ? " [set]" : "") << endl ++ << " -P prologue-searching for function probes" ++ << (s.prologue_searching ? " [set]" : "") << endl + << " -b bulk (relayfs) mode" << (s.bulk_mode ? " [set]" : "") << endl + << " -M Don't merge per-cpu files for bulk (relayfs) mode" << (s.merge ? "" : " [set]") << endl + << " -s NUM buffer size in megabytes, instead of " +@@ -197,6 +199,13 @@ + s.guru_mode = false; + s.bulk_mode = false; + s.unoptimized = false; ++ ++#ifdef ENABLE_PROLOGUES ++ s.prologue_searching = true; ++#else ++ s.prologue_searching = false; ++#endif ++ + s.buffer_size = 0; + s.last_pass = 5; + s.module_name = "stap_" + stringify(getpid()); +@@ -256,7 +265,7 @@ + + while (true) + { +- int grc = getopt (argc, argv, "hVMvtp:I:e:o:R:r:m:kgc:x:D:bs:u"); ++ int grc = getopt (argc, argv, "hVMvtp:I:e:o:R:r:m:kgPc:x:D:bs:u"); + if (grc < 0) + break; + switch (grc) +@@ -328,6 +337,10 @@ + s.guru_mode = true; + break; + ++ case 'P': ++ s.prologue_searching = true; ++ break; ++ + case 'b': + s.bulk_mode = true; + break; +diff -Naur F/session.h P/session.h +--- F/session.h 2007-02-13 16:12:41.000000000 -0800 ++++ P/session.h 2007-02-13 16:11:44.000000000 -0800 +@@ -94,6 +94,7 @@ + int buffer_size; + unsigned perfmon; + bool symtab; ++ bool prologue_searching; + + // Cache data + bool use_cache; +diff -Naur F/tapsets.cxx P/tapsets.cxx +--- F/tapsets.cxx 2007-02-13 16:12:11.000000000 -0800 ++++ P/tapsets.cxx 2007-02-13 16:11:31.000000000 -0800 +@@ -2413,19 +2413,19 @@ + } + else + { +-#ifdef __ia64__ +- // In IA64 platform function probe point is set at its +- // entry point rather than prologue end pointer +- query_statement (fi.name, fi.decl_file, fi.decl_line, +- &fi.die, entrypc, q); +- +-#else +- if (fi.prologue_end == 0) +- throw semantic_error("could not find prologue-end " ++ if (q->sess.prologue_searching) ++ { ++ if (fi.prologue_end == 0) ++ throw semantic_error("could not find prologue-end " + "for probed function '" + fi.name + "'"); +- query_statement (fi.name, fi.decl_file, fi.decl_line, ++ query_statement (fi.name, fi.decl_file, fi.decl_line, + &fi.die, fi.prologue_end, q); +-#endif ++ } ++ else ++ { ++ query_statement (fi.name, fi.decl_file, fi.decl_line, ++ &fi.die, entrypc, q); ++ } + } + } + catch (semantic_error &e) diff --git a/systemtap-s390x-probe-at-function-entry.diff b/systemtap-s390x-probe-at-function-entry.diff deleted file mode 100644 index 0fa60a5..0000000 --- a/systemtap-s390x-probe-at-function-entry.diff +++ /dev/null @@ -1,15 +0,0 @@ ---- tapsets.cxx.orig 2007-01-31 13:22:50.000000000 -0800 -+++ tapsets.cxx 2007-01-31 14:12:48.000000000 -0800 -@@ -2413,9 +2413,9 @@ - } - else - { --#ifdef __ia64__ -- // In IA64 platform function probe point is set at its -- // entry point rather than prologue end pointer -+#if defined (__ia64__) || defined (__s390x__) -+ // On IA64 and s390x platforms function probe point is set at its -+ // entry point rather than prologue end pointer. - query_statement (fi.name, fi.decl_file, fi.decl_line, - &fi.die, entrypc, q); - diff --git a/systemtap.changes b/systemtap.changes index 64bf34b..b16ab28 100644 --- a/systemtap.changes +++ b/systemtap.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Mar 8 15:24:56 CET 2007 - tiwai@suse.de + +- fix the handling of function arguments in more generic way + (#245310, #252311) + added a new option -P to switch the prologue-search behavior + ------------------------------------------------------------------- Wed Mar 7 15:47:20 CET 2007 - tiwai@suse.de diff --git a/systemtap.spec b/systemtap.spec index c264c57..b6cf740 100644 --- a/systemtap.spec +++ b/systemtap.spec @@ -16,7 +16,7 @@ BuildRequires: gcc-c++ %define elfutils_version 0.125 License: GNU General Public License (GPL) Version: 0.5.8 -Release: 35 +Release: 36 Summary: Instrumentation System Group: Development/Tools/Debuggers URL: http://sourceware.org/systemtap/ @@ -27,7 +27,7 @@ Source1: elfutils-%{elfutils_version}-no-osl.tar.bz2 Patch: systap-elf-install.patch Patch1: elfutils-portability.patch Patch2: elfutils-0.125-build-fix.diff -Patch3: systemtap-s390x-probe-at-function-entry.diff +Patch3: systemtap-probe-at-function-entry.diff Patch4: systemtap-s390x-store_deref-fix.diff Patch5: systemtap-s390x-mmap-tapset.diff Patch6: systemtap-translate-fix.diff @@ -52,7 +52,7 @@ Authors: # %setup -n %{name}-%{package_version} -q -a1 %setup -n src -q -a1 %patch -%patch3 +%patch3 -p1 %patch4 -p1 %patch5 -p2 %patch6 -p1 @@ -85,6 +85,10 @@ rm -rf ${RPM_BUILD_ROOT} %dir %attr(0755,root,root) /var/cache/systemtap %changelog +* Thu Mar 08 2007 - tiwai@suse.de +- fix the handling of function arguments in more generic way + (#245310, #252311) + added a new option -P to switch the prologue-search behavior * Wed Mar 07 2007 - tiwai@suse.de - fix misalignment of exception table entry on s390x (#249576) * Mon Feb 26 2007 - tiwai@suse.de