Mark Wielaard [Tue, 1 Dec 2009 13:29:51 +0000 (14:29 +0100)]
Convert string.stp documentation to standard markup.
* doc/SystemTap_Tapset_Reference/tapsets.tmpl: Add string.stp chapter.
* tapset/string.stp: Convert documentation to standard markup and add
documentation that was missing.
Tim Moore [Tue, 1 Dec 2009 11:54:25 +0000 (12:54 +0100)]
some aesthetic tweaks to the grapher
* grapher/Graph.cxx (draw): Draw tick labels (times) below the graph.
* grapher/grapher.cxx (main): Open main window with a size big enough
to display an entire graph.
Tim Moore [Tue, 1 Dec 2009 11:26:59 +0000 (12:26 +0100)]
Add hover text to the graph.
When the graph display is paused, leaving the mouse stationary over
the graph will display the data point under the pointer.
* grapher/CairoWidget.hxx (CairoTextBox): new class
(CairoWidget, CairoPlayButton): refector some play button-specific
things from CairoWidget to CairoPlayButton.
* grapher/CairoWidget.cxx (CairoTextBox::draw): new function.
* grapher/GraphWidget.hxx (GraphWidget): new members for supporting
hover text.
* grapher/GraphWidget.cxx (on_motion_notify_event): Set up hover text box.
(establishHoverTimeout, onHoverTimeout, getGraphUnderPoint): new functions.
Tim Moore [Tue, 1 Dec 2009 11:02:24 +0000 (12:02 +0100)]
change time type from double to int64_t
* grapher/Graph.hxx (Graph): Change variables holding the time limits
of the displayed graph from double to int64_t.
* grapher/Graph.cxx (Graph::draw): Do calculations of time differences
using int64_t.
(Graph::getExtents, Graph::setExtents): Change left and right
arguments to int64_t.
* grapher/GraphData.hxx (GraphDataBase): Change time type to int64_t.
(GraphDataBase::elementAsString): New function.
(GraphData::elementAsString): Implementation of that function.
* grapher/StapParser.cxx (parseData): Parse time values from the stap
script as 64 bit values.
Dave Brolley [Mon, 23 Nov 2009 22:39:16 +0000 (17:39 -0500)]
Ensure uprobes/Makefile never returns failure due to setting permissions.
Ensure uprobes install directory has group 'stap-server'.
Rename igid_in to in_group.
David Smith [Mon, 23 Nov 2009 20:13:38 +0000 (14:13 -0600)]
Fixed tapset reference manual generation.
* doc/SystemTap_Tapset_Reference/Makefile.am: Check for file existence
before doing compare.
* doc/SystemTap_Tapset_Reference/Makefile.in: Regenerated.
* tapset/ioblock.stp: Fixed comment so that docs can be built.
Prerna Saxena [Sun, 22 Nov 2009 18:10:39 +0000 (23:40 +0530)]
Added tracepoint-based probes to block IO and IO scheduler tapsets.
Added testcases for these probes.
Also, modified comments in ioblock.stp so that tapset docmentation can be automatically generated for this tapset.
Josh Stone [Wed, 18 Nov 2009 21:32:22 +0000 (13:32 -0800)]
PR10983: Give preference to tracepoints in trace/events/
In 2.6.32-rc7, there are two power.h tracepoints headers, and only the
one in trace/events/ is valid. In general, we can expect that
trace/events/ has newer headers, so we should search those first.
David Smith [Wed, 18 Nov 2009 18:53:50 +0000 (12:53 -0600)]
PR 10981. Fixed buildok/netdev.stp for RHEL5.
* tapset/networking.stp: Made 'netdev.change_rx_flag' and
'netdev.get_stats' optional, since those functions don't exist on
RHEL5.
* testsuite/buildok/netdev.stp: Ditto.
David Smith [Wed, 18 Nov 2009 17:16:15 +0000 (11:16 -0600)]
Don't kfail buildok/sched_test.stp and buildok/process_test.stp.
* testsuite/systemtap.pass1-4/buildok.exp: On rhel5 and rawhide, the
buildok/sched_test.stp and buildok/process_test.stp tests pass
sucessfully, so there is no reason to kfail them.
David Smith [Wed, 18 Nov 2009 16:59:37 +0000 (10:59 -0600)]
PR 5150. Fixed nfs tapset by making probes optional.
* tapset/nfs_proc.stp: Made 'nfs.proc.read', 'nfs.proc.write', and
'nfs.proc.commit' optional for newer kernels without those functions.
* testsuite/systemtap.pass1-4/buildok.exp: Expect nfs-all-probes.stp to
pass.
David Smith [Tue, 17 Nov 2009 21:40:59 +0000 (15:40 -0600)]
With tapset/aux_syscalls.stp fixes, test twentyseven.stp is not kfail.
* testsuite/systemtap.pass1-4/buildok.exp: Test twentyseven.stp should
pass now.
Mark Wielaard [Tue, 17 Nov 2009 21:20:32 +0000 (22:20 +0100)]
Search other CUs of the module when resolving declarations.
* dwflpp.h (declaration_resolve_other_cus): New method.
(iterate_over_globals): Mark as static and takes a CU to iterate over.
(global_alias_caching_callback_cus): New method.
* dwflpp.cxx (global_alias_caching_callback_cus): New method.
(declaration_resolve_other_cus): New method.
(declaration_resolve): Call iterate_over_globals() with current cu.
Call declaration_resolve_other_cus() when name not found.
(iterate_over_globals): Takes cu_die to iterate over as argument.
Mark Wielaard [Tue, 17 Nov 2009 09:10:31 +0000 (10:10 +0100)]
Remove caching of emit_address for kernel modules and shared libraries.
Caching of the address is only safe for kernel addresses that can never
change. For kernel module or dynamic shared library addresses it isn't
safe to cache the address since they can be unloaded, reloaded or mapped
differently in separate executables.
* dwflpp.cxx (emit_address): Remove static from addr definition for
kernel and dynamic modules.
Mark Wielaard [Tue, 17 Nov 2009 08:24:41 +0000 (09:24 +0100)]
Explain "cheat" comment in sym.c (_stp_tf_mmap_cb).
We are abusing the "first" section address here to indicate where the
module (actually first segment) is loaded (which is why we are ignoring
the offset). It would be good to redesign the stp_module/stp_section
data structures to better align with the actual memory mappings we are
interested in (especially the "section" naming is slightly confusing
since what we really seem to mean are elf segments (which can contain
multiple elf sections).
Mark Wielaard [Mon, 16 Nov 2009 20:41:13 +0000 (21:41 +0100)]
Add testcase for retrieving $global vars from execs and shared libs.
Explicit testcase for PR10010 and PR10622.
* testsuite/systemtap.base/externalvar.c: New file.
* testsuite/systemtap.base/externalvar.exp: New file.
* testsuite/systemtap.base/externalvar.stp: New file.
* testsuite/systemtap.base/externalvar_lib.c: New file.
Mark Wielaard [Mon, 16 Nov 2009 20:34:00 +0000 (21:34 +0100)]
PR10010 Support $globals in shared libraries.
* dwflpp.cxx (dwflpp::emit_address): Enable task finder and emit a
_stp_module_relocate for the ".dynamic" section when seeing a
user-space dso address.
* runtime/sym.c (_stp_mod_sec_lookup): Remove .dynamic section addr cheat.
(_stp_tf_mmap_cb): Add cheat here.
David Smith [Mon, 16 Nov 2009 18:58:46 +0000 (12:58 -0600)]
PR 5150 partial fix. Support nfs_write_begin()/nfs_write_end().
* tapset/nfs.stp: Added support for nfs_write_begin()/nfs_write_end(),
which replaced nfs_prepare_write()/nfs_commit_write().
Mark Wielaard [Mon, 16 Nov 2009 09:02:50 +0000 (10:02 +0100)]
PR10622 Search for extern $variables in symbol table.
* dwflpp.h (vardie_from_symtable): New method.
* dwflpp.cxx (vardie_from_symtable): New method.
(literal_stmt_for_local): Use vardie_from_symtable when no location
attribute and DW_AT_external.
* testsuite/buildok/xtime.stp: New testcase from PR10622.
Mark Wielaard [Fri, 13 Nov 2009 12:39:24 +0000 (13:39 +0100)]
Accept relative user module paths for -d.
When using relative (non-canonical) paths for user modules one would get
a confusing WARNING: missing unwind/symbol data for module 'bin/test'.
Also unless the path started with '/' the task_finder wouldn't start.
By checking that the given file can be made absolute (canonicalized)
both issues are resolved and the user module will be correctly identified
at both translation and runtime.
* main.cxx (main): case 'd' try canonicalize_file_name() the argument
first to identify user modules.
Josh Stone [Wed, 11 Nov 2009 02:37:02 +0000 (18:37 -0800)]
PR5916: Exploit kretprobe data storage area
Since 2.6.25, kretprobes can carry a data packet to be filled in an
entry_handler. This patch lets us store our implicitly-saved $target
variables in .return probes in that data area.
* tapset/kretprobe.stp: New get/set functions for kretprobe data.
* translate.cxx (c_unparser::emit_common_header): Add context->pi_longs.
* tapsets.cxx
(dwarf_var_expanding_visitor::visit_target_symbol_saved_return): Switch
between the old and new methods of saving $vars in .return probes.
(dwarf_var_expanding_visitor::gen_mapped_saved_return): The old way.
(dwarf_var_expanding_visitor::gen_kretprobe_saved_return): The new way.
(dwarf_derived_probe::join_group): Don't register paired entry-handlers.
(dwarf_derived_probe::dwarf_derived_probe): Remember saved-var details.
(dwarf_derived_probe_group::emit_module_decls): Output saved-var details.
Also split the kretprobe handler whether we're on entry or return.
(dwarf_derived_probe_group::emit_module_init): Prepare the entry handler.
* testsuite/systemtap.base/kretprobe-vars.stp: Test implicit $var saving.
Dave Brolley [Mon, 9 Nov 2009 19:50:52 +0000 (14:50 -0500)]
Don't reference global variable modpath in insert_module and its helpers.
This allows insert_module to to be used for loading the signed uprobes.ko
module.
Allow the use of $$parms and $$return in uprobes based probes for
unprivileged users.
Re-add management of module signatures in the cache. Don't know why
it was removed.