diff --git a/systemtap-20070203.tar.bz2 b/systemtap-20070203.tar.bz2 deleted file mode 100644 index 22734c6..0000000 --- a/systemtap-20070203.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:be4060f2c46d3700de609d7c3163b2284a6891e81491acbbe9a7bca7e65e0898 -size 631886 diff --git a/systemtap-20070317.tar.bz2 b/systemtap-20070317.tar.bz2 new file mode 100644 index 0000000..4e7f0b4 --- /dev/null +++ b/systemtap-20070317.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c759fd962427f123aa7c16e139c965d25c69c2ebf440fdb157af17717c55be81 +size 667580 diff --git a/systemtap-probe-at-function-entry.diff b/systemtap-probe-at-function-entry.diff deleted file mode 100644 index 0362016..0000000 --- a/systemtap-probe-at-function-entry.diff +++ /dev/null @@ -1,102 +0,0 @@ -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-mmap-tapset.diff b/systemtap-s390x-mmap-tapset.diff deleted file mode 100644 index 22d2f96..0000000 --- a/systemtap-s390x-mmap-tapset.diff +++ /dev/null @@ -1,193 +0,0 @@ -diff -Naur stap_co_200702222256/src/tapset/s390x/syscalls.stp stap_co_200702222241/src/tapset/s390x/syscalls.stp ---- stap_co_200702222256/src/tapset/s390x/syscalls.stp 1969-12-31 16:00:00.000000000 -0800 -+++ stap_co_200702222241/src/tapset/s390x/syscalls.stp 2007-02-22 14:48:37.527534944 -0800 -@@ -0,0 +1,169 @@ -+%(arch == "s390x" %? -+ -+# mmap - s390x version of the syscall.mmap probes -+# -+# long old_mmap(struct mmap_arg_struct __user *arg) -+# long old32_mmap(struct mmap_arg_struct_emu31 __user *arg) -+# -+ -+probe syscall.mmap = kernel.function("old_mmap"), -+ kernel.function("old32_mmap") -+{ -+ name = "mmap" -+ -+ if ( probefunc() == "old_mmap" ){ -+ argstr = get_mmap_args($arg); -+ }else{ -+ argstr = get_32mmap_args($arg); -+ } -+ -+ argstr = get_mmap_args($arg); -+} -+ -+probe syscall.mmap.return = kernel.function("old_mmap").return, -+ kernel.function("old32_mmap").return -+{ -+ name = "mmap" -+ retstr = returnstr(2) -+} -+ -+ -+# mmap2 - s390x version of the syscall.mmap2 probes -+# -+# long sys_mmap2(struct mmap_arg_struct __user *arg) -+# long sys32_mmap2(struct mmap_arg_struct_emu31 __user *arg) -+# -+probe syscall.mmap2 = kernel.function("sys_mmap2"), -+ kernel.function("sys32_mmap2") -+{ -+ name = "mmap2" -+ -+ if ( probefunc() == "sys_mmap2" ){ -+ argstr = get_mmap_args($arg); -+ }else{ -+ argstr = get_32mmap_args($arg); -+ } -+ -+ argstr = get_mmap_args($arg); -+} -+ -+probe syscall.mmap2.return = kernel.function("sys_mmap2").return, -+ kernel.function("sys32_mmap2").return -+{ -+ name = "mmap2" -+ retstr = returnstr(2) -+} -+ -+function get_mmap_args:string (args:long) -+%{ -+ struct mmap_arg_struct { -+ unsigned long addr; -+ unsigned long len; -+ unsigned long prot; -+ unsigned long flags; -+ unsigned long fd; -+ unsigned long offset; -+ }a; -+ -+ char proto[60]; -+ char flags[256]; -+ -+ if(_stp_copy_from_user((char *)&a, -+ (char *)THIS->args, sizeof(a))== 0){ -+ -+ /* _mprotect_prot_str */ -+ proto[0] = '\0'; -+ if(a.prot){ -+ if(a.prot & 1) strcat (proto, "PROT_READ|"); -+ if(a.prot & 2) strcat (proto, "PROT_WRITE|"); -+ if(a.prot & 4) strcat (proto, "PROT_EXEC|"); -+ } else { -+ strcat (proto, "PROT_NONE"); -+ } -+ if (proto[0] != '\0') proto[strlen(proto)-1] = '\0'; -+ -+ /* _mmap_flags */ -+ flags[0]='\0'; -+ if (a.flags & 1) strcat (flags, "MAP_SHARED|"); -+ if (a.flags & 2) strcat (flags, "MAP_PRIVATE|"); -+ if (a.flags & 0x10) strcat (flags, "MAP_FIXED|"); -+ if (a.flags & 0x20) strcat (flags, "MAP_ANONYMOUS|"); -+ if (a.flags & 0x100) strcat (flags, "MAP_GROWSDOWN|"); -+ if (a.flags & 0x800) strcat (flags, "MAP_DENYWRITE|"); -+ if (a.flags & 0x1000) strcat (flags, "MAP_EXECUTABLE|"); -+ if (a.flags & 0x2000) strcat (flags, "MAP_LOCKED|"); -+ if (a.flags & 0x4000) strcat (flags, "MAP_NORESERVE|"); -+ if (a.flags & 0x8000) strcat (flags, "MAP_POPULATE|"); -+ if (a.flags & 0x10000) strcat (flags, "MAP_NONBLOCK|"); -+ if (flags[0] != '\0') flags[strlen(flags)-1] = '\0'; -+ -+ sprintf(THIS->__retvalue,"0x%lx, %ld, %s, %s, %ld, %ld", -+ a.addr, -+ a.len, -+ proto, -+ flags, -+ a.fd, -+ a.offset); -+ }else{ -+ strlcpy (THIS->__retvalue, "UNKNOWN", MAXSTRINGLEN); -+ } -+%} -+ -+/* compat */ -+function get_32mmap_args:string (args:long) -+%{ -+ struct mmap_arg_struct_emu31 { -+ u32 addr; -+ u32 len; -+ u32 prot; -+ u32 flags; -+ u32 fd; -+ u32 offset; -+ }a; -+ -+ -+ char proto[60]; -+ char flags[256]; -+ -+ if(_stp_copy_from_user((char *)&a, -+ (char *)THIS->args, sizeof(a))== 0){ -+ -+ /* _mprotect_prot_str */ -+ proto[0] = '\0'; -+ if(a.prot){ -+ if(a.prot & 1) strcat (proto, "PROT_READ|"); -+ if(a.prot & 2) strcat (proto, "PROT_WRITE|"); -+ if(a.prot & 4) strcat (proto, "PROT_EXEC|"); -+ } else { -+ strcat (proto, "PROT_NONE"); -+ } -+ if (proto[0] != '\0') proto[strlen(proto)-1] = '\0'; -+ -+ /* _mmap_flags */ -+ flags[0]='\0'; -+ if (a.flags & 1) strcat (flags, "MAP_SHARED|"); -+ if (a.flags & 2) strcat (flags, "MAP_PRIVATE|"); -+ if (a.flags & 0x10) strcat (flags, "MAP_FIXED|"); -+ if (a.flags & 0x20) strcat (flags, "MAP_ANONYMOUS|"); -+ if (a.flags & 0x100) strcat (flags, "MAP_GROWSDOWN|"); -+ if (a.flags & 0x800) strcat (flags, "MAP_DENYWRITE|"); -+ if (a.flags & 0x1000) strcat (flags, "MAP_EXECUTABLE|"); -+ if (a.flags & 0x2000) strcat (flags, "MAP_LOCKED|"); -+ if (a.flags & 0x4000) strcat (flags, "MAP_NORESERVE|"); -+ if (a.flags & 0x8000) strcat (flags, "MAP_POPULATE|"); -+ if (a.flags & 0x10000) strcat (flags, "MAP_NONBLOCK|"); -+ if (flags[0] != '\0') flags[strlen(flags)-1] = '\0'; -+ -+ sprintf(THIS->__retvalue,"0x%x, %d, %s, %s, %d, %d", -+ a.addr, -+ a.len, -+ proto, -+ flags, -+ a.fd, -+ a.offset); -+ }else{ -+ strlcpy (THIS->__retvalue, "UNKNOWN", MAXSTRINGLEN); -+ } -+%} -+ -+%) -diff -Naur stap_co_200702222256/src/tapset/syscalls.stp stap_co_200702222241/src/tapset/syscalls.stp ---- stap_co_200702222256/src/tapset/syscalls.stp 2007-02-06 18:54:31.000000000 -0800 -+++ stap_co_200702222241/src/tapset/syscalls.stp 2007-02-22 14:50:38.292175928 -0800 -@@ -1942,6 +1942,8 @@ - name = "mlockall" - retstr = returnstr(1) - } -+ -+%(arch != "s390x" %? - # mmap - # long sys_mmap(unsigned long addr, unsigned long len, - # unsigned long prot, unsigned long flags, -@@ -1997,6 +1999,7 @@ - name = "mmap2" - retstr = returnstr(2) - } -+%) - - # modify_ldt _________________________________________________ - # int sys_modify_ldt(int func, void __user *ptr, unsigned long bytecount) diff --git a/systemtap-s390x-store_deref-fix.diff b/systemtap-s390x-store_deref-fix.diff deleted file mode 100644 index c1d3e77..0000000 --- a/systemtap-s390x-store_deref-fix.diff +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/runtime/loc2c-runtime.h b/runtime/loc2c-runtime.h -index 7ed9d41..976bf64 100644 ---- a/runtime/loc2c-runtime.h -+++ b/runtime/loc2c-runtime.h -@@ -416,7 +416,7 @@ - _v; \ - }) - --#define deref_store(size, addr, value) \ -+#define store_deref(size, addr, value) \ - ({ \ - int _bad = 0; \ - switch (size) { \ diff --git a/systemtap-s390x-stp_get_asm-alignment.diff b/systemtap-s390x-stp_get_asm-alignment.diff deleted file mode 100644 index 9a85177..0000000 --- a/systemtap-s390x-stp_get_asm-alignment.diff +++ /dev/null @@ -1,101 +0,0 @@ ---- runtime/loc2c-runtime.h.orig 2007-02-27 11:45:26.000000000 -0800 -+++ runtime/loc2c-runtime.h 2007-02-27 11:50:17.000000000 -0800 -@@ -296,52 +296,24 @@ - - #elif defined (__s390__) || defined (__s390x__) - --#if defined __s390__ --#define __stp_get_asm(x, addr, err, size) \ --({ \ -- asm volatile( \ -- "0: mvc 0(%2,%4),0(%3)\n" \ -- "1:\n" \ -- ".section .fixup,\"ax\"\n" \ -- "2: lhi %0,%5\n" \ -- " bras 1,3f\n" \ -- " .long 1b\n" \ -- "3: l 1,0(1)\n" \ -- " br 1\n" \ -- ".previous\n" \ -+#ifndef EX_TABLE -+/* -+ * Helper macro for exception table entries -+ */ -+#ifndef __s390x__ -+#define EX_TABLE(_fault,_target) \ - ".section __ex_table,\"a\"\n" \ -- " .align 4\n" \ -- " .long 0b,2b\n" \ -- ".previous" \ -- : "+&d" (err), "=m" (x) \ -- : "i" (size),"a"(addr), \ -- "a" (&(x)),"K" (-EFAULT) \ -- : "cc", "1" ); \ --}) -- --#define __stp_put_asm(x, addr, err, size) \ --({ \ -- asm volatile( \ -- "0: mvc 0(%1,%2),0(%3)\n" \ -- "1:\n" \ -- ".section .fixup,\"ax\"\n" \ -- "2: lhi %0,%5\n" \ -- " bras 1,3f\n" \ -- " .long 1b\n" \ -- "3: l 1,0(1)\n" \ -- " br 1\n" \ -- ".previous\n" \ -+ " .align 4\n" \ -+ " .long " #_fault "," #_target "\n" \ -+ ".previous\n" -+#else -+#define EX_TABLE(_fault,_target) \ - ".section __ex_table,\"a\"\n" \ -- " .align 4\n" \ -- " .long 0b,2b\n" \ -- ".previous" \ -- : "+&d" (err) \ -- : "i" (size), "a" (addr), \ -- "a" (&(x)),"K" (-EFAULT) \ -- : "cc", "1"); \ --}) -- --#else /* s390x */ -+ " .align 8\n" \ -+ " .quad " #_fault "," #_target "\n" \ -+ ".previous\n" -+#endif -+#endif - - #define __stp_get_asm(x, addr, err, size) \ - ({ \ -@@ -352,10 +324,7 @@ - "2: lghi %0,%5\n" \ - " jg 1b\n" \ - ".previous\n" \ -- ".section __ex_table,\"a\"\n" \ -- " .align 8\n" \ -- " .quad 0b,2b\n" \ -- ".previous" \ -+ EX_TABLE(0b,2b) \ - : "+&d" (err), "=m" (x) \ - : "i" (size),"a"(addr), \ - "a" (&(x)),"K" (-EFAULT) \ -@@ -371,16 +340,12 @@ - "2: lghi %0,%4\n" \ - " jg 1b\n" \ - ".previous\n" \ -- ".section __ex_table,\"a\"\n" \ -- " .align 8\n" \ -- " .quad 0b,2b\n" \ -- ".previous" \ -+ EX_TABLE(0b,2b) \ - : "+&d" (err) \ - : "i" (size),"a"(addr), \ - "a"(&(x)),"K"(-EFAULT) \ - : "cc"); \ - }) --#endif - - #define deref(size, addr) \ - ({ \ diff --git a/systemtap-translate-fix.diff b/systemtap-translate-fix.diff deleted file mode 100644 index 1b5f2d6..0000000 --- a/systemtap-translate-fix.diff +++ /dev/null @@ -1,94 +0,0 @@ -diff -uNar systemtap-0708-ioblockpatch.orig/translate.cxx systemtap-0708-ioblockpatch/translate.cxx ---- systemtap-0708-ioblockpatch.orig/translate.cxx 2007-02-23 15:24:23.000000000 -0800 -+++ systemtap-0708-ioblockpatch/translate.cxx 2007-02-23 15:26:38.000000000 -0800 -@@ -348,29 +348,39 @@ - else - return qname() + " = 0;"; - case pe_stats: -- switch (sd.type) -- { -- case statistic_decl::none: -- return (qname() -- + " = _stp_stat_init (HIST_NONE);"); -- break; -- -- case statistic_decl::linear: -- return (qname() -- + " = _stp_stat_init (HIST_LINEAR" -- + ", " + stringify(sd.linear_low) -- + ", " + stringify(sd.linear_high) -- + ", " + stringify(sd.linear_step) -- + ");"); -- break; -- -- case statistic_decl::logarithmic: -- return (qname() -- + " = _stp_stat_init (HIST_LOG" -- + ", " + stringify(sd.logarithmic_buckets) -- + ");"); -- break; -- } -+ { -+ // See also mapvar::init(). -+ -+ string prefix = qname() + " = _stp_stat_init ("; -+ // Check for errors during allocation. -+ string suffix = "if (" + qname () + " == NULL) rc = -ENOMEM;"; -+ -+ switch (sd.type) -+ { -+ case statistic_decl::none: -+ prefix += "HIST_NONE"; -+ break; -+ -+ case statistic_decl::linear: -+ prefix += string("HIST_LINEAR") -+ + ", " + stringify(sd.linear_low) -+ + ", " + stringify(sd.linear_high) -+ + ", " + stringify(sd.linear_step); -+ break; -+ -+ case statistic_decl::logarithmic: -+ prefix += string("HIST_LOG") -+ + ", " + stringify(sd.logarithmic_buckets); -+ break; -+ -+ default: -+ throw semantic_error("unsupported stats type for " + qname()); -+ } -+ -+ prefix = prefix + "); "; -+ return string (prefix + suffix); -+ } -+ - default: - throw semantic_error("unsupported initializer for " + qname()); - } -@@ -602,6 +612,8 @@ - string prefix = qname() + " = _stp_" + mtype + "_new_" + keysym() + " (" + - (maxsize > 0 ? stringify(maxsize) : "MAXMAPENTRIES") ; - -+ // See also var::init(). -+ - // Check for errors during allocation. - string suffix = "if (" + qname () + " == NULL) rc = -ENOMEM;"; - -@@ -1094,6 +1106,8 @@ - if (basest_names.find(nm) == basest_names.end()) - { - o->newline() << "time_" << nm << " = _stp_stat_init (HIST_NONE);"; -+ // NB: we don't check for null return here, but instead at -+ // passage to probe handlers and at final printing. - basest_names.insert (nm); - } - } -@@ -1207,7 +1221,8 @@ - if (basest_names.find(nm) == basest_names.end()) - { - basest_names.insert (nm); -- o->newline() << "{"; -+ // NB: check for null stat object -+ o->newline() << "if (likely (time_" << p->name << ")) {"; - o->newline(1) << "const char *probe_point = " - << lex_cast_qstring (* p->locations[0]) - << (p->locations.size() > 1 ? "\"+\"" : "") diff --git a/systemtap.changes b/systemtap.changes index b16ab28..5c91960 100644 --- a/systemtap.changes +++ b/systemtap.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Mar 19 17:25:52 CET 2007 - tiwai@suse.de + +- updated to snapshot 20070317: + including all fix patches + ------------------------------------------------------------------- Thu Mar 8 15:24:56 CET 2007 - tiwai@suse.de diff --git a/systemtap.spec b/systemtap.spec index b6cf740..1258001 100644 --- a/systemtap.spec +++ b/systemtap.spec @@ -12,11 +12,11 @@ Name: systemtap BuildRequires: gcc-c++ -%define package_version 20070203 +%define package_version 20070317 %define elfutils_version 0.125 License: GNU General Public License (GPL) Version: 0.5.8 -Release: 36 +Release: 38 Summary: Instrumentation System Group: Development/Tools/Debuggers URL: http://sourceware.org/systemtap/ @@ -27,11 +27,6 @@ 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-probe-at-function-entry.diff -Patch4: systemtap-s390x-store_deref-fix.diff -Patch5: systemtap-s390x-mmap-tapset.diff -Patch6: systemtap-translate-fix.diff -Patch7: systemtap-s390x-stp_get_asm-alignment.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -52,11 +47,6 @@ Authors: # %setup -n %{name}-%{package_version} -q -a1 %setup -n src -q -a1 %patch -%patch3 -p1 -%patch4 -p1 -%patch5 -p2 -%patch6 -p1 -%patch7 autoreconf -fi cd elfutils-%{elfutils_version} %patch1 -p1 @@ -85,6 +75,9 @@ rm -rf ${RPM_BUILD_ROOT} %dir %attr(0755,root,root) /var/cache/systemtap %changelog +* Mon Mar 19 2007 - tiwai@suse.de +- updated to snapshot 20070317: + including all fix patches * Thu Mar 08 2007 - tiwai@suse.de - fix the handling of function arguments in more generic way (#245310, #252311)