This commit is contained in:
parent
cf7792af6b
commit
8575ab72e5
26
stap-fix-procfs-dir_entry-count.diff
Normal file
26
stap-fix-procfs-dir_entry-count.diff
Normal file
@ -0,0 +1,26 @@
|
||||
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);
|
62
stap-pr6905-weaken-lineno-checks.diff
Normal file
62
stap-pr6905-weaken-lineno-checks.diff
Normal file
@ -0,0 +1,62 @@
|
||||
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,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Jan 29 12:58:42 CET 2009 - tiwai@suse.de
|
||||
|
||||
- Fix procfs dir_entry count warning (bnc#470526)
|
||||
- Improve the parsing of lineno checks (bnc#468247)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jan 15 08:22:24 CET 2009 - tiwai@suse.de
|
||||
|
||||
|
@ -25,7 +25,7 @@ BuildRequires: latex2html
|
||||
%define package_version 20080906
|
||||
License: GPL v2 or later
|
||||
Version: 0.7.1
|
||||
Release: 32
|
||||
Release: 34
|
||||
Summary: Instrumentation System
|
||||
Group: Development/Tools/Debuggers
|
||||
Url: http://sourceware.org/systemtap/
|
||||
@ -43,6 +43,8 @@ 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
|
||||
Requires: libebl1
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
@ -74,6 +76,8 @@ Authors:
|
||||
%patch9 -p1
|
||||
%patch10
|
||||
%patch11 -p1
|
||||
%patch12 -p1
|
||||
%patch13 -p1
|
||||
|
||||
%build
|
||||
autoreconf -fi
|
||||
@ -102,6 +106,9 @@ rm -rf ${RPM_BUILD_ROOT}
|
||||
%dir %attr(0755,root,root) /var/cache/systemtap
|
||||
|
||||
%changelog
|
||||
* Thu Jan 29 2009 tiwai@suse.de
|
||||
- Fix procfs dir_entry count warning (bnc#470526)
|
||||
- Improve the parsing of lineno checks (bnc#468247)
|
||||
* Thu Jan 15 2009 tiwai@suse.de
|
||||
- Fix quoting in Tcl scripts (bnc#461588)
|
||||
* Mon Jan 12 2009 tiwai@suse.de
|
||||
|
Loading…
Reference in New Issue
Block a user