From de7c5583f657bb42980f66d3b88572241b676f76 Mon Sep 17 00:00:00 2001 From: Stan Cox Date: Tue, 16 Jun 2009 12:58:33 -0400 Subject: Support -L for kprobe and utrace static user markers. tapsets.cxx (dwarf_builder::build): Special case listing mode for kprobe and utrace. --- tapsets.cxx | 11 +++++++++-- testsuite/systemtap.base/static_uprobes.exp | 13 ++----------- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/tapsets.cxx b/tapsets.cxx index 5e9deb9b..843b6017 100644 --- a/tapsets.cxx +++ b/tapsets.cxx @@ -3482,9 +3482,9 @@ dwarf_builder::build(systemtap_session & sess, do { set::iterator pb; - pb = probes_handled.find(probe_table.mark_name); + pb = probes_handled.find(probe_table.probe_name); if (pb == probes_handled.end()) - probes_handled.insert (probe_table.mark_name); + probes_handled.insert (probe_table.probe_name); else return; @@ -3504,6 +3504,13 @@ dwarf_builder::build(systemtap_session & sess, new_base->body = svv.require (new_base->body); probe_table.convert_location(new_base, new_location); derive_probes(sess, new_base, finished_results); + if (sess.listing_mode) + { + finished_results.back()->locations[0]->components[0]->functor = TOK_FUNCTION; + finished_results.back()->locations[0]->components[0]->arg = new literal_string (module_name); + finished_results.back()->locations[0]->components[1]->functor = TOK_MARK; + finished_results.back()->locations[0]->components[1]->arg = new literal_string (probe_table.probe_name.c_str()); + } } while (probe_table.get_next_probe()); return; diff --git a/testsuite/systemtap.base/static_uprobes.exp b/testsuite/systemtap.base/static_uprobes.exp index 41dc3ec0..6a597646 100644 --- a/testsuite/systemtap.base/static_uprobes.exp +++ b/testsuite/systemtap.base/static_uprobes.exp @@ -165,12 +165,7 @@ wait if {$ok == 5} { pass "$test $pbtype_mssg" } else { - if { $pbtype_mssg == "uprobe" } { - fail "$test ($ok) $pbtype_mssg" - } else { - # probe fires multiple times - xfail "$test ($ok) $pbtype_mssg" - } + fail "$test ($ok) $pbtype_mssg" } # Test passing various C types to .mark probes @@ -225,11 +220,7 @@ expect { if { $ok == 45 } { pass "$test wildcard $pbtype_mssg" } else { - if { $pbtype_mssg == "uprobe" } { - fail "$test wildcard ($ok) $pbtype_mssg" - } else { - xfail "$test wildcard ($ok) $pbtype_mssg" - } + fail "$test wildcard ($ok) $pbtype_mssg" } # for {set i 0} -- cgit From 657ff134aef7f7fb8e6d7ff687c46d1819f60550 Mon Sep 17 00:00:00 2001 From: David Smith Date: Tue, 16 Jun 2009 12:17:35 -0500 Subject: Moved time.c inclusion from runtime/transport/transport.c to runtime/runtime.h. * runtime/runtime.h: Includes time.c. * runtime/transport/transport.c: Removed time.c inclusion. --- runtime/runtime.h | 1 + runtime/transport/transport.c | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/runtime.h b/runtime/runtime.h index c2e927cc..9881acb7 100644 --- a/runtime/runtime.h +++ b/runtime/runtime.h @@ -88,6 +88,7 @@ static struct #include "copy.c" #include "regs.c" #include "regs-ia64.c" +#include "time.c" #include "task_finder.c" diff --git a/runtime/transport/transport.c b/runtime/transport/transport.c index 762c0a92..0592768c 100644 --- a/runtime/transport/transport.c +++ b/runtime/transport/transport.c @@ -17,7 +17,6 @@ #include #include #include "transport.h" -#include "time.c" #include "../mempool.c" #include "symbols.c" -- cgit From fc4a80b88ef35892b1727b683e6ccf18c67a6877 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Tue, 16 Jun 2009 11:31:22 -0700 Subject: Use the expanded value for sdt $$name * tapsets.cxx (dwarf_builder::build): pass probe_table.probe_name into the sdt_var_expander instead of .mark_name, so wildcards are resolved. --- tapsets.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tapsets.cxx b/tapsets.cxx index 843b6017..15dbeb81 100644 --- a/tapsets.cxx +++ b/tapsets.cxx @@ -3459,7 +3459,7 @@ dwarf_builder::build(systemtap_session & sess, << hex << probe_table.probe_arg << dec << endl; // Now expand the local variables in the probe body - sdt_var_expanding_visitor svv (module_name, probe_table.mark_name, + sdt_var_expanding_visitor svv (module_name, probe_table.probe_name, probe_table.probe_arg, false); new_base->body = svv.require (new_base->body); @@ -3499,7 +3499,7 @@ dwarf_builder::build(systemtap_session & sess, probe_table.convert_probe(new_base); // Expand the local variables in the probe body - sdt_var_expanding_visitor svv (module_name, probe_table.mark_name, + sdt_var_expanding_visitor svv (module_name, probe_table.probe_name, probe_table.probe_arg, true); new_base->body = svv.require (new_base->body); probe_table.convert_location(new_base, new_location); -- cgit From e5964acd5d705b3ed7699c504b8317014f2b7e45 Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Wed, 17 Jun 2009 16:42:59 +0200 Subject: PR10273. uprobes fail to insert on prelinked library. * dwflpp.cxx (relocate_address): For .dynamic section addresses adjust for module bias. --- dwflpp.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dwflpp.cxx b/dwflpp.cxx index 74294384..e01c6974 100644 --- a/dwflpp.cxx +++ b/dwflpp.cxx @@ -2366,7 +2366,7 @@ dwflpp::relocate_address(Dwarf_Addr addr, { blacklist_section = get_blacklist_section(addr); reloc_section = ".dynamic"; - reloc_addr = addr; + reloc_addr += module_bias; // PR10273 } } else -- cgit From 15c3da37215544f08ec8d4231b527dcad2f73426 Mon Sep 17 00:00:00 2001 From: William Cohen Date: Wed, 17 Jun 2009 11:44:13 -0400 Subject: Specify how to generate Publican document with separate build directory. --- doc/Tapset_Reference_Guide/README | 33 +++++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/doc/Tapset_Reference_Guide/README b/doc/Tapset_Reference_Guide/README index 1f27abe7..4ef2333a 100644 --- a/doc/Tapset_Reference_Guide/README +++ b/doc/Tapset_Reference_Guide/README @@ -1,17 +1,30 @@ -This is an automated source build of the SystemTap_Tapset_Reference Guide, -used to build it in Publican. +The Publican Tapset Reference Guide is build from files generated +during the build of SystemTap when it is configured with +"--enable-refdocs". -To build the DocBook XML source (required by Publican), run: +Assuming that SystemTap was built in /home/wcohen/systemtap/build, the +file needed to generate the Publican Tapset Reference Guide would be +/home/wcohen/systemtap/build/doc/SystemTap_Tapset_Reference/tapsets.xml. - bash publicanize.sh +To generate the required DocBook XML file of the tapsets.xml file and build +the Publican Tapset Reference Guide from this directory: -This will copy and clean the XML source of SystemTap_Tapset_Reference -created by kernel-doc. You can now build it in pdf, html, etc using -Publican. +export BUILD=/home/wcohen/systemtap/build +./publicanize.sh -i=$BUILD/doc/SystemTap_Tapset_Reference/tapsets.xml -The main source of the Language Reference Guide is: +This will copy and clean the XML source of SystemTap_Tapset_Reference +created by kernel-doc and place the resulting file in +./en-US/Tapset_Reference_Guide.xml. You can now build it in pdf, html, +etc using Publican. To make the Publican pdf file: - ../SystemTap_Tapset_Reference/tapsets.xml +make pdf-en-US + +The resulting output file will be +./tmp/en-US/pdf/Tapset_Reference_Guide.pdf + +The main source of the Language Reference Guide is in the build directory: + + $BUILD/doc/SystemTap_Tapset_Reference/tapsets.xml This main source is generated by kernel-doc when you run 'make' in the main git tree. The tapset documentation inside is collected from all @@ -32,4 +45,4 @@ context.stp, context-symbols, and all the other tapset files are located in: All tapset documentation should be done inside their respective tapset files. For more information about this project, refer to: - http://sourceware.org/systemtap/wiki/ProjectTapsetReferenceGuide \ No newline at end of file + http://sourceware.org/systemtap/wiki/ProjectTapsetReferenceGuide -- cgit