This commit is contained in:
parent
2ed307abde
commit
208b23a622
@ -1,23 +0,0 @@
|
||||
commit 6f8b68010d8a11cbb97f225b16a3ef2f39f11fd8
|
||||
Author: Frank Ch. Eigler <fche@elastic.org>
|
||||
Date: Wed Oct 29 16:31:39 2008 -0400
|
||||
|
||||
fix assertion error in translate.cxx:dump_unwindsyms on some kernels
|
||||
|
||||
diff --git a/translate.cxx b/translate.cxx
|
||||
index ee6b21c..4112855 100644
|
||||
--- a/translate.cxx
|
||||
+++ b/translate.cxx
|
||||
@@ -4481,9 +4481,10 @@ dump_unwindsyms (Dwfl_Module *m,
|
||||
secname = dwfl_module_relocation_info (m, ki, NULL);
|
||||
}
|
||||
|
||||
- if (n == 1 && modname == "kernel" && secname && secname[0] == '\0')
|
||||
+ if (n == 1 && modname == "kernel")
|
||||
{
|
||||
- // This is a symbol within a relocatable kernel image.
|
||||
+ // This is a symbol within a (possibly relocatable)
|
||||
+ // kernel image.
|
||||
secname = "_stext";
|
||||
// NB: don't subtract session.sym_stext, which could be inconveniently NULL.
|
||||
// Instead, sym_addr will get compensated later via extra_offset.
|
@ -1,26 +0,0 @@
|
||||
Index: src/runtime/procfs.c
|
||||
===================================================================
|
||||
--- src.orig/runtime/procfs.c
|
||||
+++ src/runtime/procfs.c
|
||||
@@ -24,13 +24,20 @@ static struct proc_dir_entry *_stp_proc_
|
||||
|
||||
void _stp_close_procfs(void);
|
||||
|
||||
+// 2.6.24 fixed proc_dir_entry refcounting.
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24)
|
||||
+#define LAST_ENTRY_COUNT 0
|
||||
+#else
|
||||
+#define LAST_ENTRY_COUNT 1
|
||||
+#endif
|
||||
+
|
||||
/*
|
||||
* Removes /proc/systemtap/{module_name} and /proc/systemtap (if empty)
|
||||
*/
|
||||
void _stp_rmdir_proc_module(void)
|
||||
{
|
||||
if (_stp_proc_root && _stp_proc_root->subdir == NULL) {
|
||||
- if (atomic_read(&_stp_proc_root->count))
|
||||
+ if (atomic_read(&_stp_proc_root->count) != LAST_ENTRY_COUNT)
|
||||
_stp_warn("Removal of /proc/systemtap/%s\nis deferred until it is no longer in use.\n"
|
||||
"Systemtap module removal will block.\n", THIS_MODULE->name);
|
||||
remove_proc_entry(THIS_MODULE->name, _stp_proc_stap);
|
@ -1,62 +0,0 @@
|
||||
From 2d4a8f7a704619f1df32a24cfb284cf0fe936e5d Mon Sep 17 00:00:00 2001
|
||||
From: wenji huang <wjhuang@localhost.localdomain>
|
||||
Date: Sun, 14 Dec 2008 23:54:05 -0500
|
||||
Subject: [PATCH 1/1] PR6905: Weaken the checking of line number for WILDCARD and make RANGE smart.
|
||||
|
||||
---
|
||||
tapsets.cxx | 24 ++++++++++++++++++++----
|
||||
1 files changed, 20 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/tapsets.cxx b/tapsets.cxx
|
||||
index 4d9a021..391e54e 100644
|
||||
--- a/tapsets.cxx
|
||||
+++ b/tapsets.cxx
|
||||
@@ -1242,18 +1242,33 @@ struct dwflpp
|
||||
}
|
||||
else if (line_type == WILDCARD)
|
||||
function_line (&lineno);
|
||||
+ else if (line_type == RANGE) {
|
||||
+ int start_lineno;
|
||||
+ function_line (&start_lineno);
|
||||
+ lineno = start_lineno > lineno ? start_lineno : lineno;
|
||||
+ if (lineno > lines[1]) { /* invalid line range */
|
||||
+ stringstream advice;
|
||||
+ advice << "Starting line number for " << srcfile << " : " << lineno;
|
||||
+ throw semantic_error (advice.str());
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
|
||||
for (int l = lineno; ; l = l + 1)
|
||||
{
|
||||
set<int> lines_probed;
|
||||
pair<set<int>::iterator,bool> line_probed;
|
||||
- dwarf_assert ("dwarf_getsrc_file",
|
||||
- dwarf_getsrc_file (module_dwarf,
|
||||
- srcfile, l, 0,
|
||||
- &srcsp, &nsrcs));
|
||||
+ int ret = 0;
|
||||
+
|
||||
+ ret = dwarf_getsrc_file (module_dwarf, srcfile, l, 0,
|
||||
+ &srcsp, &nsrcs);
|
||||
if (line_type == WILDCARD || line_type == RANGE)
|
||||
{
|
||||
Dwarf_Addr line_addr;
|
||||
+
|
||||
+ if (ret != 0) /* tolerate invalid line number out of assert */
|
||||
+ break;
|
||||
+
|
||||
dwarf_lineno (srcsp [0], &lineno);
|
||||
line_probed = lines_probed.insert(lineno);
|
||||
if (lineno != l || line_probed.second == false || nsrcs > 1)
|
||||
@@ -1263,6 +1278,7 @@ struct dwflpp
|
||||
break;
|
||||
}
|
||||
|
||||
+ dwarf_assert ("dwarf_getsrc_file", ret);
|
||||
// NB: Formerly, we used to filter, because:
|
||||
|
||||
// dwarf_getsrc_file gets one *near hits* for line numbers, not
|
||||
--
|
||||
1.5.6
|
||||
|
@ -1,60 +0,0 @@
|
||||
--- tapsets.cxx-dist 2008-12-16 12:43:34.000000000 +0100
|
||||
+++ tapsets.cxx 2008-12-16 12:46:33.000000000 +0100
|
||||
@@ -8520,6 +8520,12 @@ hrtimer_derived_probe_group::emit_module
|
||||
s.op->newline(-1) << "};";
|
||||
s.op->newline();
|
||||
|
||||
+ // autoconf: add get/set expires if missing (pre 2.6.28-rc1)
|
||||
+ s.op->newline() << "#ifndef STAPCONF_HRTIMER_GETSET_EXPIRES";
|
||||
+ s.op->newline() << "#define hrtimer_get_expires(timer) ((timer)->expires)";
|
||||
+ s.op->newline() << "#define hrtimer_set_expires(timer, time) (void)((timer)->expires = (time))";
|
||||
+ s.op->newline() << "#endif";
|
||||
+
|
||||
// autoconf: adapt to HRTIMER_REL -> HRTIMER_MODE_REL renaming near 2.6.21
|
||||
s.op->newline() << "#ifdef STAPCONF_HRTIMER_REL";
|
||||
s.op->newline() << "#define HRTIMER_MODE_REL HRTIMER_REL";
|
||||
@@ -8538,9 +8544,9 @@ hrtimer_derived_probe_group::emit_module
|
||||
s.op->newline() << "if ((atomic_read (&session_state) == STAP_SESSION_STARTING) ||";
|
||||
s.op->newline() << " (atomic_read (&session_state) == STAP_SESSION_RUNNING)) {";
|
||||
// Compute next trigger time
|
||||
- s.op->newline(1) << "timer->expires = ktime_add (timer->expires,";
|
||||
+ s.op->newline(1) << "hrtimer_set_expires(timer, ktime_add (hrtimer_get_expires(timer),";
|
||||
emit_interval (s.op);
|
||||
- s.op->line() << ");";
|
||||
+ s.op->line() << "));";
|
||||
s.op->newline() << "rc = HRTIMER_RESTART;";
|
||||
s.op->newline(-1) << "}";
|
||||
s.op->newline() << "{";
|
||||
--- runtime/autoconf-hrtimer-getset-expires.c-dist 2008-12-16 13:33:46.000000000 +0100
|
||||
+++ runtime/autoconf-hrtimer-getset-expires.c 2008-12-16 13:33:59.000000000 +0100
|
||||
@@ -0,0 +1,6 @@
|
||||
+#include <linux/hrtimer.h>
|
||||
+
|
||||
+void ____autoconf_func(struct hrtimer *t)
|
||||
+{
|
||||
+ hrtimer_set_expires(t, hrtimer_get_expires(t));
|
||||
+}
|
||||
--- runtime/runtime.h-dist 2008-12-16 12:44:39.000000000 +0100
|
||||
+++ runtime/runtime.h 2008-12-16 12:44:52.000000000 +0100
|
||||
@@ -39,6 +39,11 @@
|
||||
#define STP_OLD_TRANSPORT
|
||||
#endif
|
||||
|
||||
+/* HACK for 2.6.28 */
|
||||
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,27)
|
||||
+#undef for_each_cpu
|
||||
+#endif
|
||||
+
|
||||
#ifndef for_each_cpu
|
||||
#define for_each_cpu(cpu) for_each_cpu_mask((cpu), cpu_possible_map)
|
||||
#endif
|
||||
--- buildrun.cxx-dist 2008-12-16 13:33:08.000000000 +0100
|
||||
+++ buildrun.cxx 2008-12-16 13:33:24.000000000 +0100
|
||||
@@ -100,6 +100,7 @@ compile_pass (systemtap_session& s)
|
||||
o << module_cflags << " += -Iinclude2/asm/mach-default" << endl;
|
||||
|
||||
o << module_cflags << " += $(call stap_check_build, $(SYSTEMTAP_RUNTIME)/autoconf-hrtimer-rel.c, -DSTAPCONF_HRTIMER_REL,)" << endl;
|
||||
+ o << module_cflags << " += $(call stap_check_build, $(SYSTEMTAP_RUNTIME)/autoconf-hrtimer-getset-expires.c, -DSTAPCONF_HRTIMER_GETSET_EXPIRES,)" << endl;
|
||||
o << module_cflags << " += $(call stap_check_build, $(SYSTEMTAP_RUNTIME)/autoconf-inode-private.c, -DSTAPCONF_INODE_PRIVATE,)" << endl;
|
||||
o << module_cflags << " += $(call stap_check_build, $(SYSTEMTAP_RUNTIME)/autoconf-constant-tsc.c, -DSTAPCONF_CONSTANT_TSC,)" << endl;
|
||||
o << module_cflags << " += $(call stap_check_build, $(SYSTEMTAP_RUNTIME)/autoconf-tsc-khz.c, -DSTAPCONF_TSC_KHZ,)" << endl;
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:b8fd5356001bf6cb802891eb99dc0248029f97d2360d5b386dab535bc0ca1a44
|
||||
size 958869
|
3
systemtap-20090214.tar.bz2
Normal file
3
systemtap-20090214.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:7ccaab67e7ec4f18d19dd7993e1bfa1e5017cf23db7e37b4707ae991e697dced
|
||||
size 1163238
|
@ -1,42 +0,0 @@
|
||||
---
|
||||
testsuite/systemtap.base/debugpath.exp | 28 ++++++++++++++++++++++------
|
||||
1 file changed, 22 insertions(+), 6 deletions(-)
|
||||
|
||||
Index: src/testsuite/systemtap.base/debugpath.exp
|
||||
===================================================================
|
||||
--- src.orig/testsuite/systemtap.base/debugpath.exp
|
||||
+++ src/testsuite/systemtap.base/debugpath.exp
|
||||
@@ -11,11 +11,27 @@ wait
|
||||
|
||||
set test "debugpath-good"
|
||||
set uname [exec /bin/uname -r]
|
||||
-spawn env SYSTEMTAP_DEBUGINFO_PATH=/lib/modules/$uname/build stap -e "probe kernel.function(\"sys_open\") {}" -p2
|
||||
-expect {
|
||||
- -re {kernel.function.*pc=} { pass $test }
|
||||
- timeout { fail "$test (timeout2)" }
|
||||
- eof { fail "$test (eof)" }
|
||||
+
|
||||
+# Guess where debuginfo is installed
|
||||
+if [file isdirectory /usr/lib/debug/boot/] {
|
||||
+ set debuginfo_path "/usr/lib/debug/boot/"
|
||||
+} elseif [file isdirectory /usr/lib/debug/lib/modules/$uname] {
|
||||
+ set debuginfo_path "/usr/lib/debug/lib/modules/$uname"
|
||||
+} elseif [file isdirectory /lib/modules/$uname/build] {
|
||||
+ set debuginfo_path "/lib/modules/$uname/build"
|
||||
+} else {
|
||||
+ set debuginfo_path "/lib/modules/$uname"
|
||||
}
|
||||
|
||||
-wait
|
||||
+if { ![file isfile "$debuginfo_path/vmlinux"] && ![file isfile "$debuginfo_path/vmlinux.debug"] } {
|
||||
+ untested "$test: kernel debuginfo does not exists\n"
|
||||
+} else {
|
||||
+ spawn env SYSTEMTAP_DEBUGINFO_PATH=$debuginfo_path stap -e "probe kernel.function(\"sys_open\") {}" -p2
|
||||
+ expect {
|
||||
+ -re {kernel.function.*pc=} { pass $test }
|
||||
+ timeout { fail "$test (timeout2)" }
|
||||
+ eof { fail "$test (eof)" }
|
||||
+ }
|
||||
+
|
||||
+ wait
|
||||
+}
|
@ -1,6 +1,50 @@
|
||||
--- stapex.5.in-dist 2008-08-16 16:27:08.000000000 +0200
|
||||
+++ stapex.5.in 2008-08-18 18:01:39.000000000 +0200
|
||||
@@ -109,12 +109,12 @@
|
||||
diff --git a/Makefile.am b/Makefile.am
|
||||
index 945afda..4678c2b 100644
|
||||
--- a/Makefile.am
|
||||
+++ b/Makefile.am
|
||||
@@ -213,7 +213,7 @@ install-data-local:
|
||||
| while read f; do if test -x $$f; then \
|
||||
i_cmd="$(INSTALL_PROGRAM)"; else \
|
||||
i_cmd="$(INSTALL_DATA)"; fi; \
|
||||
- $$i_cmd -D $$f $(DESTDIR)$(docdir)/examples/$$f; done)
|
||||
+ $$i_cmd -D $$f $(DESTDIR)$(datadir)/doc/packages/systemtap/examples/$$f; done)
|
||||
test -e $(DESTDIR)$(sysconfdir)/systemtap || mkdir -p $(DESTDIR)$(sysconfdir)/systemtap
|
||||
|
||||
TEST_COV_DIR = coverage
|
||||
diff --git a/doc/Makefile.am b/doc/Makefile.am
|
||||
index 55291f7..6693f11 100644
|
||||
--- a/doc/Makefile.am
|
||||
+++ b/doc/Makefile.am
|
||||
@@ -2,7 +2,7 @@
|
||||
## process this file with automake to produce Makefile.in
|
||||
|
||||
PDF_FILES = tutorial.pdf langref.pdf
|
||||
-DOC_INSTALL_DIR = $(DESTDIR)$(datadir)/doc/systemtap
|
||||
+DOC_INSTALL_DIR = $(DESTDIR)$(datadir)/doc/packages/systemtap
|
||||
SUBDIRS = SystemTap_Tapset_Reference
|
||||
|
||||
if BUILD_DOCS
|
||||
diff --git a/doc/SystemTap_Tapset_Reference/Makefile.am b/doc/SystemTap_Tapset_Reference/Makefile.am
|
||||
index 9e7d206..557c432 100644
|
||||
--- a/doc/SystemTap_Tapset_Reference/Makefile.am
|
||||
+++ b/doc/SystemTap_Tapset_Reference/Makefile.am
|
||||
@@ -1,9 +1,9 @@
|
||||
# Makefile.am --- automake input file for systemtap tapset reference manual
|
||||
## process this file with automake to produce Makefile.in
|
||||
|
||||
-DOC_INSTALL_DIR = $(DESTDIR)$(datadir)/doc/systemtap
|
||||
+DOC_INSTALL_DIR = $(DESTDIR)$(datadir)/doc/packages/systemtap
|
||||
MAN_INSTALL_DIR = $(DESTDIR)$(mandir)/man5
|
||||
-HTML_INSTALL_DIR = $(DESTDIR)$(datadir)/doc/systemtap/tapsets
|
||||
+HTML_INSTALL_DIR = $(DOC_INSTALL_DIR)/tapsets
|
||||
|
||||
|
||||
###
|
||||
diff --git a/stapex.5.in b/stapex.5.in
|
||||
index 38f30f6..eb753d4 100644
|
||||
--- a/stapex.5.in
|
||||
+++ b/stapex.5.in
|
||||
@@ -114,12 +114,12 @@ To list the probeable functions and local variables in the kernel, use another l
|
||||
.SH MORE EXAMPLES
|
||||
|
||||
Larger examples, demos and samples can be found in
|
||||
@ -15,25 +59,3 @@
|
||||
.IR stap (1)
|
||||
.IR stapprobes (5)
|
||||
.IR stapfuncs (5)
|
||||
--- Makefile.am-dist 2008-08-16 16:27:07.000000000 +0200
|
||||
+++ Makefile.am 2008-08-18 18:02:30.000000000 +0200
|
||||
@@ -191,7 +191,7 @@
|
||||
| while read f; do if test -x $$f; then \
|
||||
i_cmd="$(INSTALL_PROGRAM)"; else \
|
||||
i_cmd="$(INSTALL_DATA)"; fi; \
|
||||
- $$i_cmd -D $$f $(DESTDIR)$(docdir)/examples/$$f; done)
|
||||
+ $$i_cmd -D $$f $(DESTDIR)$(datadir)/doc/packages/systemtap/examples/$$f; done)
|
||||
|
||||
TEST_COV_DIR = coverage
|
||||
|
||||
--- doc/Makefile.am-dist 2008-08-16 16:27:07.000000000 +0200
|
||||
+++ doc/Makefile.am 2008-08-18 18:01:39.000000000 +0200
|
||||
@@ -2,7 +2,7 @@
|
||||
## process this file with automake to produce Makefile.in
|
||||
|
||||
PDF_FILES = tutorial.pdf langref.pdf
|
||||
-DOC_INSTALL_DIR = $(DESTDIR)$(datadir)/doc/systemtap
|
||||
+DOC_INSTALL_DIR = $(DESTDIR)$(datadir)/doc/packages/systemtap
|
||||
|
||||
if BUILD_DOCS
|
||||
all-local: $(PDF_FILES)
|
||||
|
@ -1,15 +0,0 @@
|
||||
--- tapsets.cxx-dist 2008-09-06 16:27:02.000000000 +0200
|
||||
+++ tapsets.cxx 2008-12-12 16:31:18.000000000 +0100
|
||||
@@ -1303,8 +1303,10 @@ struct dwflpp
|
||||
// NB: fnmatch() is used without FNM_PATHNAME.
|
||||
string prefixed_pattern = string("*/") + pattern;
|
||||
|
||||
- dwarf_assert ("dwarf_getsrcfiles",
|
||||
- dwarf_getsrcfiles (cu, &srcfiles, &nfiles));
|
||||
+ // just ignore the errors from dwarf_getsrcfiles; it's not fatal error
|
||||
+ if (dwarf_getsrcfiles (cu, &srcfiles, &nfiles) < 0)
|
||||
+ return;
|
||||
+
|
||||
{
|
||||
for (size_t i = 0; i < nfiles; ++i)
|
||||
{
|
@ -1,40 +0,0 @@
|
||||
From 275a898f43b2e6f7a55112fce91cbeb8a32f99ac Mon Sep 17 00:00:00 2001
|
||||
From: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
|
||||
Date: Thu, 12 Feb 2009 20:00:27 +0530
|
||||
Subject: [PATCH] Extend blacklist to cover bitops.h. While there, fixup paths for existing blacklisted files
|
||||
|
||||
---
|
||||
tapsets.cxx | 5 +++++
|
||||
1 files changed, 5 insertions(+), 0 deletions(-)
|
||||
|
||||
Index: src/tapsets.cxx
|
||||
===================================================================
|
||||
--- src.orig/tapsets.cxx
|
||||
+++ src/tapsets.cxx
|
||||
@@ -2937,6 +2937,13 @@ dwarf_query::build_blacklist()
|
||||
|
||||
blfile += "kernel/kprobes.c"; // first alternative, no "|"
|
||||
blfile += "|arch/.*/kernel/kprobes.c";
|
||||
+ // Older kernels need ...
|
||||
+ blfile += "|include/asm/io.h";
|
||||
+ blfile += "|include/asm/bitops.h";
|
||||
+ // While newer ones need ...
|
||||
+ blfile += "|arch/.*/include/asm/io.h";
|
||||
+ blfile += "|arch/.*/include/asm/bitops.h";
|
||||
+ blfile += "|drivers/ide/ide-iops.c";
|
||||
|
||||
// XXX: it would be nice if these blacklisted functions were pulled
|
||||
// in dynamically, instead of being statically defined here.
|
||||
Index: src/testsuite/systemtap.examples/profiling/functioncallcount.stp
|
||||
===================================================================
|
||||
--- src.orig/testsuite/systemtap.examples/profiling/functioncallcount.stp
|
||||
+++ src/testsuite/systemtap.examples/profiling/functioncallcount.stp
|
||||
@@ -3,7 +3,7 @@
|
||||
#
|
||||
# stap functioncallcount.stp "*@mm/*.c"
|
||||
|
||||
-probe kernel.function(@1) { # probe functions listed on commandline
|
||||
+probe kernel.function(@1).call { # probe functions listed on commandline
|
||||
called[probefunc()] <<< 1 # add a count efficiently
|
||||
}
|
||||
|
@ -1,21 +1,20 @@
|
||||
--- tapset/ioblock.stp-dist 2008-12-04 18:02:22.000000000 +0100
|
||||
+++ tapset/ioblock.stp 2008-12-04 18:03:54.000000000 +0100
|
||||
@@ -122,7 +122,9 @@
|
||||
--- tapset/ioblock.stp-dist 2008-12-05 08:14:19.000000000 +0100
|
||||
+++ tapset/ioblock.stp 2008-12-05 08:14:27.000000000 +0100
|
||||
@@ -122,7 +122,7 @@
|
||||
vcnt = $bio->bi_vcnt
|
||||
idx = $bio->bi_idx
|
||||
phys_segments = $bio->bi_phys_segments
|
||||
-%(kernel_v < "2.6.28" %?
|
||||
+%(kernel_v < "2.6.27" %?
|
||||
hw_segments = $bio->bi_hw_segments
|
||||
+%)
|
||||
%)
|
||||
size = $bio->bi_size
|
||||
|
||||
bdev = $bio->bi_bdev
|
||||
@@ -176,6 +178,8 @@
|
||||
@@ -178,7 +178,7 @@
|
||||
vcnt = $bio->bi_vcnt
|
||||
idx = $bio->bi_idx
|
||||
phys_segments = $bio->bi_phys_segments
|
||||
-%(kernel_v < "2.6.28" %?
|
||||
+%(kernel_v < "2.6.27" %?
|
||||
hw_segments = $bio->bi_hw_segments
|
||||
+%)
|
||||
%)
|
||||
size = $bio->bi_size
|
||||
}
|
@ -1,166 +0,0 @@
|
||||
From 309cc9ecf51b082d6de8f1c3b0028c398daa395f Mon Sep 17 00:00:00 2001
|
||||
From: Dave Brolley <brolley@redhat.com>
|
||||
Date: Tue, 9 Dec 2008 15:31:00 -0500
|
||||
Subject: [PATCH] Use netcat or nc, whichever is available.
|
||||
|
||||
---
|
||||
diff --git a/stap-client b/stap-client
|
||||
index 0ac9bd6..255551b 100755
|
||||
--- a/stap-client
|
||||
+++ b/stap-client
|
||||
@@ -29,6 +29,11 @@ function configuration {
|
||||
tmpdir_prefix_client=stap.client
|
||||
tmpdir_prefix_server=stap.server
|
||||
avahi_service_tag=_stap._tcp
|
||||
+
|
||||
+ # We need either netcat or nc.
|
||||
+ netcat=`which netcat 2>/dev/null`
|
||||
+ test "X$netcat" = "X" && netcat=`which nc 2>/dev/null`
|
||||
+ test "X$netcat" = "X" && fatal "ERROR: cannot find required program 'netcat' or 'nc' on PATH"
|
||||
}
|
||||
|
||||
# function: initialization
|
||||
@@ -386,7 +391,7 @@ function send_request {
|
||||
# Send the request file.
|
||||
for ((attempt=0; $attempt < 10; ++attempt))
|
||||
do
|
||||
- if nc -w10 $server $(($port+1)) < $tar_client > /dev/null 2>&1; then
|
||||
+ if $netcat -w10 $server $(($port+1)) < $tar_client > /dev/null 2>&1; then
|
||||
return;
|
||||
fi
|
||||
sleep 1
|
||||
@@ -405,7 +410,7 @@ function receive_response {
|
||||
# Retrieve the file. Wait for up to 5 minutes for a response.
|
||||
for ((attempt=0; $attempt < 300; ++attempt))
|
||||
do
|
||||
- if nc -d $server $(($port+1)) > $tar_server 2>/dev/null; then
|
||||
+ if $netcat -d $server $(($port+1)) > $tar_server 2>/dev/null; then
|
||||
return;
|
||||
fi
|
||||
sleep 1
|
||||
@@ -535,7 +540,7 @@ function choose_server {
|
||||
function connect_to_server {
|
||||
for ((attempt=0; $attempt < 10; ++attempt))
|
||||
do
|
||||
- if echo "request:" | nc -w10 $1 $2 >/dev/null 2>&1; then
|
||||
+ if echo "request:" | $netcat -w10 $1 $2 >/dev/null 2>&1; then
|
||||
return 0
|
||||
fi
|
||||
sleep 1
|
||||
diff --git a/stap-server b/stap-server
|
||||
index 67573de..a06adc9 100755
|
||||
--- a/stap-server
|
||||
+++ b/stap-server
|
||||
@@ -26,6 +26,11 @@ function configuration {
|
||||
tmpdir_prefix_server=stap.server
|
||||
port=$1
|
||||
test "X$port" = "X" && port=65001
|
||||
+
|
||||
+ # We need either netcat or nc.
|
||||
+ netcat=`which netcat 2>/dev/null`
|
||||
+ test "X$netcat" = "X" && netcat=`which nc 2>/dev/null`
|
||||
+ test "X$netcat" = "X" && fatal "ERROR: cannot find required program 'netcat' or 'nc' on PATH"
|
||||
}
|
||||
|
||||
# function: initialization
|
||||
@@ -53,12 +58,12 @@ function receive_request {
|
||||
fatal "ERROR: cannot create temporary tar file " $tar_client
|
||||
|
||||
# Receive the file.
|
||||
- nc -ld $port > $tar_client 2>/dev/null &
|
||||
+ $netcat -ld $port > $tar_client 2>/dev/null &
|
||||
|
||||
# Wait for 10 seconds before timing out
|
||||
for ((t=0; $t < 10; ++t))
|
||||
do
|
||||
- if jobs '%nc -l' >/dev/null 2>&1; then
|
||||
+ if jobs '%$netcat -l' >/dev/null 2>&1; then
|
||||
sleep 1
|
||||
else
|
||||
return
|
||||
@@ -384,12 +389,12 @@ function package_response {
|
||||
# Wait for the client to take the response file.
|
||||
function send_response {
|
||||
# Now send it.
|
||||
- nc -l $port < $tar_server > /dev/null 2>&1 &
|
||||
+ $netcat -l $port < $tar_server > /dev/null 2>&1 &
|
||||
|
||||
# Wait for 10 seconds before timing out
|
||||
for ((t=0; $t < 10; ++t))
|
||||
do
|
||||
- if jobs '%nc -l' >/dev/null 2>&1; then
|
||||
+ if jobs '%$netcat -l' >/dev/null 2>&1; then
|
||||
sleep 1
|
||||
else
|
||||
return
|
||||
@@ -430,8 +435,8 @@ function cleanup {
|
||||
rm -fr $tmpdir_stap
|
||||
fi
|
||||
|
||||
- # Kill any nc job that may be running
|
||||
- kill -s SIGTERM %nc 2> /dev/null
|
||||
+ # Kill any $netcat job that may be running
|
||||
+ kill -s SIGTERM '%$netcat' 2> /dev/null
|
||||
}
|
||||
|
||||
# function: terminate
|
||||
diff --git a/stap-serverd b/stap-serverd
|
||||
index 45aacf6..b46a425 100755
|
||||
--- a/stap-serverd
|
||||
+++ b/stap-serverd
|
||||
@@ -23,13 +23,21 @@ trap 'terminate' SIGTERM SIGINT
|
||||
function initialization {
|
||||
# Default settings.
|
||||
avahi_type=_stap._tcp
|
||||
+
|
||||
+ # We need either netcat or nc.
|
||||
+ netcat=`which netcat 2>/dev/null`
|
||||
+ test "X$netcat" = "X" && netcat=`which nc 2>/dev/null`
|
||||
+ test "X$netcat" = "X" && fatal "ERROR: cannot find required program 'netcat' or 'nc' on PATH"
|
||||
+
|
||||
+ # See if the given port, or the default port is busy. If so, select another.
|
||||
port=$1
|
||||
test "X$port" = "X" && port=65000
|
||||
- export port2=$(($port + 1))
|
||||
- if netstat -atn | awk '{print $4}' | cut -f2 -d: | egrep -q "^($port|$port2)\$"; then
|
||||
+ port2=$(($port + 1))
|
||||
+ while netstat -atn | awk '{print $4}' | cut -f2 -d: | egrep -q "^($port|$port2)\$"; do
|
||||
# Whoops, the port is busy; try another one.
|
||||
- initialization $((1024+($port + $RANDOM)%64000))
|
||||
- fi
|
||||
+ port=$((1024+($port + $RANDOM)%64000))
|
||||
+ port2=$(($port + 1))
|
||||
+ done
|
||||
}
|
||||
|
||||
# function: advertise_presence
|
||||
@@ -57,8 +65,8 @@ function listen {
|
||||
do
|
||||
for ((attempt=0; $attempt < 5; ++attempt))
|
||||
do
|
||||
- nc -ld $port 2>/dev/null | process_request &
|
||||
- wait '%nc -l'
|
||||
+ $netcat -ld $port 2>/dev/null | process_request &
|
||||
+ wait '%$netcat -l'
|
||||
rc=$?
|
||||
if test $rc = 0 -o $rc = 127; then
|
||||
break; # port was read ok
|
||||
@@ -111,11 +119,11 @@ function terminate {
|
||||
|
||||
# Kill any running 'stap-server' job.
|
||||
kill -s SIGTERM "%stap-server" 2> /dev/null
|
||||
- wait "%stap-server" >/dev/null 2>&1
|
||||
+ wait '%stap-server' >/dev/null 2>&1
|
||||
|
||||
- # Kill any running 'nc -l' job.
|
||||
- kill -s SIGTERM "%?nc -l" 2> /dev/null
|
||||
- wait "%?nc - l" >/dev/null 2>&1
|
||||
+ # Kill any running '$netcat -l' job.
|
||||
+ kill -s SIGTERM '%$netcat -l' 2>/dev/null
|
||||
+ wait '%$netcat -l' >/dev/null 2>&1
|
||||
|
||||
exit
|
||||
}
|
||||
--
|
||||
1.6.0.5
|
||||
|
@ -1,48 +0,0 @@
|
||||
From 0b7f181e1096f8833e24a60a7c0f97ecc063b9f4 Mon Sep 17 00:00:00 2001
|
||||
From: Dave Brolley <brolley@redhat.com>
|
||||
Date: Thu, 11 Dec 2008 12:07:02 -0500
|
||||
Subject: [PATCH] Don't use -d on $netcat. Redirect from /dev/null instead.
|
||||
|
||||
---
|
||||
diff --git a/stap-client b/stap-client
|
||||
index 255551b..3f530c7 100755
|
||||
--- a/stap-client
|
||||
+++ b/stap-client
|
||||
@@ -410,7 +410,7 @@ function receive_response {
|
||||
# Retrieve the file. Wait for up to 5 minutes for a response.
|
||||
for ((attempt=0; $attempt < 300; ++attempt))
|
||||
do
|
||||
- if $netcat -d $server $(($port+1)) > $tar_server 2>/dev/null; then
|
||||
+ if $netcat $server $(($port+1)) </dev/null > $tar_server 2>/dev/null; then
|
||||
return;
|
||||
fi
|
||||
sleep 1
|
||||
diff --git a/stap-server b/stap-server
|
||||
index a06adc9..0a7d597 100755
|
||||
--- a/stap-server
|
||||
+++ b/stap-server
|
||||
@@ -58,7 +58,7 @@ function receive_request {
|
||||
fatal "ERROR: cannot create temporary tar file " $tar_client
|
||||
|
||||
# Receive the file.
|
||||
- $netcat -ld $port > $tar_client 2>/dev/null &
|
||||
+ $netcat -l $port < /dev/null > $tar_client 2>/dev/null &
|
||||
|
||||
# Wait for 10 seconds before timing out
|
||||
for ((t=0; $t < 10; ++t))
|
||||
diff --git a/stap-serverd b/stap-serverd
|
||||
index b46a425..d4d6a77 100755
|
||||
--- a/stap-serverd
|
||||
+++ b/stap-serverd
|
||||
@@ -65,7 +65,7 @@ function listen {
|
||||
do
|
||||
for ((attempt=0; $attempt < 5; ++attempt))
|
||||
do
|
||||
- $netcat -ld $port 2>/dev/null | process_request &
|
||||
+ $netcat -l $port < /dev/null 2>/dev/null | process_request &
|
||||
wait '%$netcat -l'
|
||||
rc=$?
|
||||
if test $rc = 0 -o $rc = 127; then
|
||||
--
|
||||
1.6.0.5
|
||||
|
@ -1,11 +0,0 @@
|
||||
--- translate.cxx-dist 2008-09-06 16:27:03.000000000 +0200
|
||||
+++ translate.cxx 2008-11-21 14:19:52.000000000 +0100
|
||||
@@ -4193,7 +4193,7 @@ c_unparser::visit_print_format (print_fo
|
||||
/* The type of the %m argument is 'char*'. */
|
||||
if (components[i].type == print_format::conv_memory)
|
||||
o->line() << ", (char*)(uintptr_t)" << tmp[arg_ix++].value();
|
||||
- else
|
||||
+ else if (arg_ix < (int) tmp.size())
|
||||
o->line() << ", " << tmp[arg_ix++].value();
|
||||
}
|
||||
|
@ -1,355 +0,0 @@
|
||||
Index: src/tapset/signal.stp
|
||||
===================================================================
|
||||
--- src.orig/tapset/signal.stp
|
||||
+++ src/tapset/signal.stp
|
||||
@@ -16,24 +16,23 @@
|
||||
//
|
||||
|
||||
|
||||
-/* probe signal.send
|
||||
- *
|
||||
- * Fires when a signal is sent to a process.
|
||||
- *
|
||||
+/**
|
||||
+ * probe signal.send- Fires when a signal is sent to a process.
|
||||
+ * Arguments:
|
||||
+ * @sig: The number of the signal
|
||||
+ * @sig_name: A string representation of the signal
|
||||
+ * @sig_pid: The process ID of the signal recipient
|
||||
+ * @pid_name: The name of the signal recipient
|
||||
+ * @si_code: Indicates the signal type
|
||||
+ * @task: A task handle to the signal recipient
|
||||
+ * @sinfo: The address of <command>siginfo</command> struct
|
||||
+ * @shared: Indicates whether the signal is shared by the thread group
|
||||
+ * @send2queue- Indicates whether the signal is sent to an existing <command>sigqueue</command>
|
||||
+ * @name: The name of the function used to send out the signal
|
||||
+ *
|
||||
* Context:
|
||||
* The signal's sender.
|
||||
*
|
||||
- * Arguments:
|
||||
- * sig - the number of the signal
|
||||
- * sig_name - a string representation of the signal
|
||||
- * sig_pid - pid of the signal recipient process
|
||||
- * pid_name - name of the signal recipient process
|
||||
- * si_code - indicates the signal type.
|
||||
- * task - a task handle to the signal recipient
|
||||
- * sinfo - the address of siginfo struct.
|
||||
- * shared - indicates whether this signal is shared by the thread group
|
||||
- * send2queue- indicates whether this signal is sent to an existing sigqueue
|
||||
- * name - name of the function used to send out this signal
|
||||
*/
|
||||
probe signal.send = _signal.send.*
|
||||
{
|
||||
@@ -84,21 +83,17 @@ probe _signal.send.part4 = kernel.functi
|
||||
%( kernel_v > "2.6.25" %?
|
||||
probe _signal.send.part1 = kernel.function("send_signal")
|
||||
{
|
||||
- name = "__group_send_sig_info"
|
||||
- sig = $sig
|
||||
- task = $t
|
||||
- sinfo = $info
|
||||
- shared = 1
|
||||
- send2queue = 0
|
||||
-}
|
||||
-
|
||||
-probe _signal.send.part4 = kernel.function("send_signal")
|
||||
-{
|
||||
- name = "specific_send_sig_info"
|
||||
+ if ($group == 1) {
|
||||
+ name = "__group_send_sig_info"
|
||||
+ shared = 1
|
||||
+ }
|
||||
+ else if ($group == 0) {
|
||||
+ name = "specific_send_sig_info"
|
||||
+ shared = 0
|
||||
+ }
|
||||
sig = $sig
|
||||
task = $t
|
||||
sinfo = $info
|
||||
- shared = 0
|
||||
send2queue = 0
|
||||
}
|
||||
%)
|
||||
@@ -118,27 +113,78 @@ probe _signal.send.part3 = kernel.functi
|
||||
send2queue = 1
|
||||
}
|
||||
|
||||
-/* probe signal.send.return
|
||||
+/**
|
||||
+ * probe signal.send.return - Fires when a signal sent to a process returns.
|
||||
+ * @retstr: The return value to either <command>__group_send_sig_info</command>,
|
||||
+ * <command>specific_send_sig_info</command>, or <command>send_sigqueue</command>.
|
||||
+ * Refer to the Description of this probe for more information about the return
|
||||
+ * values of each function call.
|
||||
+ * @shared: Indicates whether the sent signal is shared by the thread group.
|
||||
+ * @send2queue: Indicates whether the sent signal was sent to an existing <command>sigqueue</command>
|
||||
+ * @name: The name of the function used to send out the signal.
|
||||
+ *
|
||||
+ * Context:
|
||||
+ * The signal's sender. <remark>(correct?)</remark>
|
||||
+ *
|
||||
+ * __group_send_sig_info and specific_send_sig_info return values:
|
||||
+ *
|
||||
+ * <command>0</command> - The signal is sucessfully sent to a process,
|
||||
+ * which means that
|
||||
+ * <1> the signal was ignored by the receiving process,
|
||||
+ * <2> this is a non-RT signal and the system already has one queued, and
|
||||
+ * <3> the signal was successfully added to the <command>sigqueue</command> of the receiving process.
|
||||
+ *
|
||||
+ * <command>-EAGAIN</command> - The <command>sigqueue</command> of the receiving process is
|
||||
+ * overflowing, the signal was RT, and the signal was sent by a user using something other
|
||||
+ * than <command>kill()</command>
|
||||
+ *
|
||||
+ * send_group_sigqueue and send_sigqueue return values:
|
||||
+ *
|
||||
+ * <command>0</command> - The signal was either sucessfully added into the
|
||||
+ * <command>sigqueue</command> of the receiving process, or a <command>SI_TIMER</command> entry is already
|
||||
+ * queued (in which case, the overrun count will be simply incremented).
|
||||
+ *
|
||||
+ * <command>1</command> - The signal was ignored by the receiving process.
|
||||
+ *
|
||||
+ *
|
||||
+ * <command>-1</command> - (<command>send_sigqueue</command> only) The task was marked
|
||||
+ * <command>exiting</command>, allowing * <command>posix_timer_event</command> to redirect it to the group
|
||||
+ * leader.
|
||||
+ *
|
||||
*/
|
||||
probe signal.send.return = _signal.send.*.return
|
||||
{
|
||||
retstr = returnstr(1)
|
||||
}
|
||||
|
||||
-/*
|
||||
- * Return values for "__group_send_sig_info" and "specific_send_sig_info"
|
||||
- *
|
||||
- * - return 0 if the signal is sucessfully sent to a process,
|
||||
- * which means the following:
|
||||
- * <1> the signal is ignored by receiving process
|
||||
- * <2> this is a non-RT signal and we already have one queued
|
||||
- * <3> the signal is successfully added into the sigqueue of
|
||||
- * receiving process
|
||||
- *
|
||||
- * - return -EAGAIN if the sigqueue is overflow the signal was RT
|
||||
- * and sent by user using something other than kill()
|
||||
- *
|
||||
- */
|
||||
+// Return values for "__group_send_sig_info" and "specific_send_sig_info"
|
||||
+//
|
||||
+// - return 0 if the signal is sucessfully sent to a process,
|
||||
+// which means the following:
|
||||
+// <1> the signal is ignored by receiving process
|
||||
+// <2> this is a non-RT signal and we already have one queued
|
||||
+// <3> the signal is successfully added into the sigqueue of
|
||||
+// receiving process
|
||||
+//
|
||||
+// - return -EAGAIN if the sigqueue is overflow the signal was RT
|
||||
+// and sent by user using something other than kill()
|
||||
+
|
||||
+%( kernel_v > "2.6.25" %?
|
||||
+probe _signal.send.part1.return = kernel.function("send_signal").return
|
||||
+{
|
||||
+ if ($group == 1) {
|
||||
+ name = "__group_send_sig_info"
|
||||
+ shared = 1
|
||||
+ }
|
||||
+ else if ($group == 0) {
|
||||
+ name = "specific_send_sig_info"
|
||||
+ shared = 0
|
||||
+ }
|
||||
+ send2queue = 0
|
||||
+}
|
||||
+%)
|
||||
+
|
||||
+%( kernel_v <= "2.6.25" %?
|
||||
probe _signal.send.part1.return = kernel.function("__group_send_sig_info").return
|
||||
{
|
||||
name = "__group_send_sig_info"
|
||||
@@ -153,15 +199,12 @@ probe _signal.send.part4.return = kernel
|
||||
send2queue = 0
|
||||
}
|
||||
|
||||
-%( kernel_v <= "2.6.25" %?
|
||||
-/*
|
||||
- * - return 0 if the signal is either sucessfully added into the
|
||||
- * sigqueue of receiving process or a SI_TIMER entry is already
|
||||
- * queued so just increment the overrun count
|
||||
- *
|
||||
- * - return 1 if this signal is ignored by receiving process
|
||||
- *
|
||||
- */
|
||||
+// - return 0 if the signal is either sucessfully added into the
|
||||
+// sigqueue of receiving process or a SI_TIMER entry is already
|
||||
+// queued so just increment the overrun count
|
||||
+//
|
||||
+// - return 1 if this signal is ignored by receiving process
|
||||
+
|
||||
probe _signal.send.part2.return = kernel.function("send_group_sigqueue").return
|
||||
{
|
||||
name = "send_group_sigqueue"
|
||||
@@ -170,17 +213,14 @@ probe _signal.send.part2.return = kernel
|
||||
}
|
||||
%)
|
||||
|
||||
-/*
|
||||
- * - return 0 if the signal is either sucessfully added into the
|
||||
- * sigqueue of receiving process or a SI_TIMER entry is already
|
||||
- * queued so just increment the overrun count
|
||||
- *
|
||||
- * - return 1 if this signal is ignored by receiving process
|
||||
- *
|
||||
- * - return -1 if the task is marked exiting, so posix_timer_event
|
||||
- * can redirect it to the group leader
|
||||
- *
|
||||
- */
|
||||
+// - return 0 if the signal is either sucessfully added into the
|
||||
+// sigqueue of receiving process or a SI_TIMER entry is already
|
||||
+// queued so just increment the overrun count
|
||||
+//
|
||||
+// - return 1 if this signal is ignored by receiving process
|
||||
+//
|
||||
+// - return -1 if the task is marked exiting, so posix_timer_event
|
||||
+// can redirect it to the group leader
|
||||
|
||||
probe _signal.send.part3.return = kernel.function("send_sigqueue").return
|
||||
{
|
||||
@@ -211,26 +251,25 @@ probe signal.checkperm = kernel.function
|
||||
si_code="SI_KERNEL (SIGFPE, SIGSEGV, SIGTRAP, SIGCHLD, SIGPOLL)"
|
||||
else if (sinfo <= 0)
|
||||
si_code="SI_USER or SI_TIMER or SI_ASYNCIO"
|
||||
-}
|
||||
+}
|
||||
|
||||
probe signal.checkperm.return = kernel.function("check_kill_permission").return
|
||||
{
|
||||
name = "signal.checkperm"
|
||||
retstr = returnstr(1)
|
||||
}
|
||||
-
|
||||
|
||||
-/* probe signal.wakeup
|
||||
- *
|
||||
- * Wake up the process for new active signals.
|
||||
- *
|
||||
- * Argument:
|
||||
- * sig_pid: pid of the process to be woke up
|
||||
- * pid_name: name of the process to be woke up
|
||||
- * resume: indicate whether to wake up a task in STOPPED or
|
||||
- TRACED state
|
||||
- * state_mask: a string representation indicates the mask
|
||||
- * of task states that can be woken
|
||||
+
|
||||
+/**
|
||||
+ * probe signal.wakeup - Wakes up a sleeping process, making it ready for new active signals
|
||||
+ * @sig_pid: PID of the process you wish to wake
|
||||
+ * @pid_name: Name of the process you wish to wake
|
||||
+ * @resume: Indicates whether to wake up a task in a <command>STOPPED</command> or
|
||||
+ * <command>TRACED</command> state
|
||||
+ * @state_mask: A string representation indicating the mask
|
||||
+ * of task states you wish to wake. Possible values are <command>TASK_INTERRUPTIBLE</command>,
|
||||
+ * <command>TASK_STOPPED</command>, <command>TASK_TRACED</command>,
|
||||
+ * and <command>TASK_INTERRUPTIBLE</command>.
|
||||
*/
|
||||
probe signal.wakeup = kernel.function("signal_wake_up")
|
||||
{
|
||||
@@ -245,9 +284,7 @@ probe signal.wakeup = kernel.function("s
|
||||
}
|
||||
|
||||
|
||||
-/* probe signal.ignored
|
||||
- *
|
||||
- * Checks whether the signal is ignored or not.
|
||||
+/* probe signal.ignored - Checks whether a signal is ignored or not.
|
||||
*
|
||||
*/
|
||||
probe signal.check_ignored = kernel.function("sig_ignored")
|
||||
@@ -268,7 +305,7 @@ probe signal.check_ignored.return = kern
|
||||
/* probe signal.handle_stop
|
||||
*
|
||||
* For now, just comment it out since at the time handle_stop_signal()
|
||||
- * is called, it doesn't know whether current signal is STOP/COUNT.
|
||||
+ * is called, it doesn't know whether current signal is STOP/COUNT.
|
||||
* So the calling of handle_stop_signal() doesn't mean that the Kernel
|
||||
* is now processing the STOP/COUNT signal
|
||||
*
|
||||
@@ -389,7 +426,7 @@ probe signal.send_sig_queue.return =
|
||||
|
||||
/* probe signal.pending
|
||||
*
|
||||
- * Used to examine the set of signals that are pending for
|
||||
+ * Used to examine the set of signals that are pending for
|
||||
* delivery to the calling thread
|
||||
*
|
||||
* long do_sigpending(void __user *set, unsigned long sigsetsize)
|
||||
@@ -417,8 +454,8 @@ probe signal.pending.return = kernel.fun
|
||||
* sinfo : address of siginfo table.
|
||||
* ka_addr : Address of the k_sigaction table associated with the signal
|
||||
* oldset_addr : Address of a bit mask array of blocked signals
|
||||
- * regs : Address in the Kernel Mode stack area
|
||||
- *
|
||||
+ * regs : Address in the Kernel Mode stack area
|
||||
+ *
|
||||
*/
|
||||
probe signal.handle = kernel.function("handle_signal")
|
||||
{
|
||||
@@ -431,7 +468,7 @@ probe signal.handle = kernel.function("h
|
||||
regs = $regs
|
||||
|
||||
// Check whether the signal is a User Mode or Kernel mode Signal.
|
||||
-
|
||||
+
|
||||
if (sinfo == 0 && sig_code <= 0)
|
||||
sig_mode = "User Mode Signal"
|
||||
else if (sinfo >= 1)
|
||||
@@ -528,7 +565,7 @@ probe signal.procmask.return = kernel.fu
|
||||
|
||||
/*
|
||||
* probe signal.flush
|
||||
- *
|
||||
+ *
|
||||
* Flush all pending signals for a task.
|
||||
*
|
||||
* void flush_signals(struct task_struct *t)
|
||||
@@ -539,16 +576,16 @@ probe signal.flush = kernel.function("fl
|
||||
task = $t
|
||||
sig_pid = $t->pid
|
||||
pid_name = kernel_string($t->comm)
|
||||
-}
|
||||
+}
|
||||
|
||||
function get_sa_flags:long (act:long) %{ /* pure */
|
||||
- struct k_sigaction *act = (struct k_sigaction *)((long)THIS->act);
|
||||
+ struct k_sigaction *act = (struct k_sigaction *)((long)THIS->act);
|
||||
THIS->__retvalue = kread(&act->sa.sa_flags);
|
||||
CATCH_DEREF_FAULT();
|
||||
%}
|
||||
|
||||
function get_sa_handler:long (act:long) %{ /* pure */
|
||||
- struct k_sigaction *act = (struct k_sigaction *)((long)THIS->act);
|
||||
+ struct k_sigaction *act = (struct k_sigaction *)((long)THIS->act);
|
||||
THIS->__retvalue = (long)kread(&act->sa.sa_handler);
|
||||
CATCH_DEREF_FAULT();
|
||||
%}
|
||||
@@ -630,13 +667,10 @@ function sa_handler_str(handler) {
|
||||
/*
|
||||
* Signals start from 1 not 0.
|
||||
*/
|
||||
-function signal_str(num) {
|
||||
- return __sig[num]
|
||||
-}
|
||||
-
|
||||
global __sig[64]
|
||||
|
||||
-probe begin(-1) {
|
||||
+function signal_str(num) {
|
||||
+ if (!(64 in __sig)) {
|
||||
__sig[1] = "HUP"
|
||||
__sig[2] = "INT"
|
||||
__sig[3] = "QUIT"
|
||||
@@ -701,4 +735,6 @@ probe begin(-1) {
|
||||
__sig[62] = "RTMIN+30"
|
||||
__sig[63] = "RTMIN+31"
|
||||
__sig[64] = "RTMIN+32"
|
||||
+ }
|
||||
+ return __sig[num]
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
--- src/testsuite/systemtap.examples/general/para-callgraph.meta.orig 2008-12-23 11:42:13.000000000 +0530
|
||||
+++ src/testsuite/systemtap.examples/general/para-callgraph.meta 2008-12-23 12:04:33.000000000 +0530
|
||||
@@ -3,5 +3,5 @@ name: para-callgraph.stp
|
||||
keywords: trace callgraph
|
||||
subsystem: general
|
||||
description: Print a timed per-thread callgraph, complete with function parameters and return values. The first parameter names the function probe points to trace. The optional second parameter names the probe points for trigger functions, which acts to enable tracing for only those functions that occur while the current thread is nested within the trigger.
|
||||
-test_check: stap -p4 para-callgraph.stp 'kernel.function("*@fs/proc*.c")' 'kernel.function("sys_read")'
|
||||
-test_installcheck: stap para-callgraph.stp 'kernel.function("*@fs/proc*.c")' 'kernel.function("sys_read")' -c 'cat /proc/sys/vm/*'
|
||||
+test_check: stap -p4 para-callgraph.stp kernel.function("*@fs/proc*.c") kernel.function("sys_read")
|
||||
+test_installcheck: stap para-callgraph.stp kernel.function("*@fs/proc*.c") kernel.function("sys_read") -c "cat /proc/sys/vm/*"
|
@ -1,11 +0,0 @@
|
||||
--- testsuite/systemtap.syscall/test.tcl-dist 2009-01-12 12:48:26.000000000 +0100
|
||||
+++ testsuite/systemtap.syscall/test.tcl 2009-01-12 12:48:48.000000000 +0100
|
||||
@@ -106,7 +106,7 @@
|
||||
}
|
||||
}
|
||||
if {$i < $ind} {
|
||||
- send_log "--------- EXPECTED and NOT MATCHED ----------\n"
|
||||
+ send_log -- "--------- EXPECTED and NOT MATCHED ----------\n"
|
||||
}
|
||||
for {} {$i < $ind} {incr i} {
|
||||
send_log "$results($i)\n"
|
@ -1,85 +0,0 @@
|
||||
From: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
|
||||
Date: Mon, 24 Nov 2008 07:50:49 +0000 (+0530)
|
||||
Subject: Fix for 7030: use send_signal instead of generic_send_sig_info and specific_send_sig_info
|
||||
X-Git-Url: http://sources.redhat.com/git/gitweb.cgi?p=systemtap.git;a=commitdiff_plain;h=563c89d9c8828590941c9a5bee7fa3edc62cbee8
|
||||
|
||||
Fix for 7030: use send_signal instead of generic_send_sig_info and specific_send_sig_info
|
||||
(Prasad's Patch for fixing signal tapset)
|
||||
---
|
||||
|
||||
diff --git a/tapset/signal.stp b/tapset/signal.stp
|
||||
index 66de767..7f932e7 100644
|
||||
--- a/tapset/signal.stp
|
||||
+++ b/tapset/signal.stp
|
||||
@@ -49,6 +49,7 @@ probe signal.send = _signal.send.*
|
||||
si_code="SI_USER or SI_TIMER or SI_ASYNCIO"
|
||||
}
|
||||
|
||||
+%( kernel_v <= "2.6.25" %?
|
||||
probe _signal.send.part1 = kernel.function("__group_send_sig_info")
|
||||
{
|
||||
name = "__group_send_sig_info"
|
||||
@@ -59,7 +60,6 @@ probe _signal.send.part1 = kernel.function("__group_send_sig_info")
|
||||
send2queue = 0
|
||||
}
|
||||
|
||||
-%( kernel_v <= "2.6.25" %?
|
||||
probe _signal.send.part2 = kernel.function("send_group_sigqueue")
|
||||
{
|
||||
name = "send_group_sigqueue"
|
||||
@@ -69,6 +69,38 @@ probe _signal.send.part2 = kernel.function("send_group_sigqueue")
|
||||
shared = 1
|
||||
send2queue = 1
|
||||
}
|
||||
+
|
||||
+probe _signal.send.part4 = kernel.function("specific_send_sig_info")
|
||||
+{
|
||||
+ name = "specific_send_sig_info"
|
||||
+ sig = $sig
|
||||
+ task = $t
|
||||
+ sinfo = $info
|
||||
+ shared = 0
|
||||
+ send2queue = 0
|
||||
+}
|
||||
+%)
|
||||
+
|
||||
+%( kernel_v > "2.6.25" %?
|
||||
+probe _signal.send.part1 = kernel.function("send_signal")
|
||||
+{
|
||||
+ name = "__group_send_sig_info"
|
||||
+ sig = $sig
|
||||
+ task = $t
|
||||
+ sinfo = $info
|
||||
+ shared = 1
|
||||
+ send2queue = 0
|
||||
+}
|
||||
+
|
||||
+probe _signal.send.part4 = kernel.function("send_signal")
|
||||
+{
|
||||
+ name = "specific_send_sig_info"
|
||||
+ sig = $sig
|
||||
+ task = $t
|
||||
+ sinfo = $info
|
||||
+ shared = 0
|
||||
+ send2queue = 0
|
||||
+}
|
||||
%)
|
||||
|
||||
probe _signal.send.part3 = kernel.function("send_sigqueue")
|
||||
@@ -86,16 +118,6 @@ probe _signal.send.part3 = kernel.function("send_sigqueue")
|
||||
send2queue = 1
|
||||
}
|
||||
|
||||
-probe _signal.send.part4 = kernel.function("specific_send_sig_info")
|
||||
-{
|
||||
- name = "specific_send_sig_info"
|
||||
- sig = $sig
|
||||
- task = $t
|
||||
- sinfo = $info
|
||||
- shared = 0
|
||||
- send2queue = 0
|
||||
-}
|
||||
-
|
||||
/* probe signal.send.return
|
||||
*/
|
||||
probe signal.send.return = _signal.send.*.return
|
15
systemtap-xmlto-fop.diff
Normal file
15
systemtap-xmlto-fop.diff
Normal file
@ -0,0 +1,15 @@
|
||||
diff --git a/doc/SystemTap_Tapset_Reference/Makefile.am b/doc/SystemTap_Tapset_Reference/Makefile.am
|
||||
index 9e7d206..efd627c 100644
|
||||
--- a/doc/SystemTap_Tapset_Reference/Makefile.am
|
||||
+++ b/doc/SystemTap_Tapset_Reference/Makefile.am
|
||||
@@ -33,7 +33,9 @@ stamp-htmldocs: tapsets.xml
|
||||
touch stamp-htmldocs
|
||||
|
||||
tapsets.pdf: tapsets.xml
|
||||
- xmlto pdf tapsets.xml
|
||||
+# xmlto pdf tapsets.xml
|
||||
+ xmlto fo tapsets.xml
|
||||
+ fop tapsets.fo tapsets.pdf
|
||||
|
||||
stamp-mandocs: tapsets.xml
|
||||
xmlto man -o man5 tapsets.xml
|
@ -1,3 +1,12 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Feb 19 16:55:48 CET 2009 - tiwai@suse.de
|
||||
|
||||
- updated to systemtap snashot 20090214:
|
||||
* Version bump to 0.8
|
||||
* Bunch of fixes and updates, see ChangeLog
|
||||
* Fix for recent 2.6.29 kernels
|
||||
- fixed doc build, using fop instead of direct xmlto pdf
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Feb 12 16:32:29 CET 2009 - tiwai@suse.de
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# spec file for package systemtap (Version 0.7.1)
|
||||
# spec file for package systemtap (Version 0.8)
|
||||
#
|
||||
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
#
|
||||
@ -20,12 +20,17 @@
|
||||
|
||||
Name: systemtap
|
||||
BuildRequires: gcc-c++ glib2-devel libcap-devel libebl-devel pkg-config sqlite-devel
|
||||
BuildRequires: mozilla-nspr-devel mozilla-nss-devel
|
||||
# for documents
|
||||
BuildRequires: xmlto
|
||||
%if %suse_version > 1030
|
||||
BuildRequires: fop
|
||||
BuildRequires: latex2html
|
||||
%define package_version 20080906
|
||||
%endif
|
||||
%define package_version 20090214
|
||||
License: GPL v2 or later
|
||||
Version: 0.7.1
|
||||
Release: 40
|
||||
Version: 0.8
|
||||
Release: 1
|
||||
Summary: Instrumentation System
|
||||
Group: Development/Tools/Debuggers
|
||||
Url: http://sourceware.org/systemtap/
|
||||
@ -33,21 +38,8 @@ Url: http://sourceware.org/systemtap/
|
||||
# Suggest: kernel-smp-debuginfo
|
||||
Source: ftp://sources.redhat.com/pub/systemtap/snapshots/systemtap-%{package_version}.tar.bz2
|
||||
Patch: systemtap-docdir-fix.diff
|
||||
Patch2: stap-fix-dump_unwindsyms.patch
|
||||
Patch3: systemtap-parameter-bound-check.diff
|
||||
Patch4: systemtap-ioblock-fix.diff
|
||||
Patch5: systemtap-dwarf_getsrcfiles-no-assert.diff
|
||||
Patch6: systemtap-netcat-fix1.diff
|
||||
Patch7: systemtap-netcat-fix2.diff
|
||||
Patch8: systemtap-2.6.28-fixes.diff
|
||||
Patch9: systemtap-use-send_signal.diff
|
||||
Patch10: systemtap-tcl-send_log-syntax-fix.diff
|
||||
Patch11: systemtap-tcl-quote-fix.diff
|
||||
Patch12: stap-fix-procfs-dir_entry-count.diff
|
||||
Patch13: stap-pr6905-weaken-lineno-checks.diff
|
||||
Patch14: systemtap-debugpath.exp-path-fix.diff
|
||||
Patch15: systemtap-signal-stp-fixes.diff
|
||||
Patch16: systemtap-extend-blacklist.diff
|
||||
Patch2: systemtap-ioblock-suse-kernel-fix.diff
|
||||
Patch3: systemtap-xmlto-fop.diff
|
||||
Requires: libebl1
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
@ -68,22 +60,11 @@ Authors:
|
||||
%prep
|
||||
# %setup -n %{name}-%{package_version} -q -a1
|
||||
%setup -n src -q
|
||||
%patch
|
||||
%patch2 -p1
|
||||
%patch3
|
||||
%patch4
|
||||
%patch5
|
||||
%patch6 -p1
|
||||
%patch7 -p1
|
||||
%patch8
|
||||
%patch9 -p1
|
||||
%patch10
|
||||
%patch11 -p1
|
||||
%patch12 -p1
|
||||
%patch13 -p1
|
||||
%patch14 -p1
|
||||
%patch15 -p1
|
||||
%patch16 -p1
|
||||
%patch -p1
|
||||
%patch2
|
||||
%if %suse_version > 1030
|
||||
%patch3 -p1
|
||||
%endif
|
||||
|
||||
%build
|
||||
autoreconf -fi
|
||||
@ -98,6 +79,7 @@ export MKDIR_P="mkdir -p"
|
||||
%makeinstall
|
||||
mkdir -p $RPM_BUILD_ROOT/var/cache/systemtap
|
||||
cp README AUTHORS NEWS COPYING $RPM_BUILD_ROOT%{_docdir}/systemtap/
|
||||
rm -rf $RPM_BUILD_ROOT%{_includedir}/sys/*
|
||||
|
||||
%clean
|
||||
rm -rf ${RPM_BUILD_ROOT}
|
||||
@ -112,6 +94,12 @@ rm -rf ${RPM_BUILD_ROOT}
|
||||
%dir %attr(0755,root,root) /var/cache/systemtap
|
||||
|
||||
%changelog
|
||||
* Thu Feb 19 2009 tiwai@suse.de
|
||||
- updated to systemtap snashot 20090214:
|
||||
* Version bump to 0.8
|
||||
* Bunch of fixes and updates, see ChangeLog
|
||||
* Fix for recent 2.6.29 kernels
|
||||
- fixed doc build, using fop instead of direct xmlto pdf
|
||||
* Thu Feb 12 2009 tiwai@suse.de
|
||||
- backport the blacklist additions from upstream to fix possible
|
||||
system crash (bnc#459387, bnc#473277)
|
||||
|
Loading…
Reference in New Issue
Block a user