Tim Moore [Mon, 7 Dec 2009 17:51:55 +0000 (18:51 +0100)]
make the list items in the data set list unselectable
The checkbox selects the list, so it is just sloppy to allow the item
to be selected.
* grapher/GraphWidget.hxx (no_select_fun): New function; just returns
false.
* grapher/GraphWidget.cxx (GraphWidget): Connect list store selection
to function that prevents selection.
Tim Moore [Mon, 7 Dec 2009 15:50:44 +0000 (16:50 +0100)]
Change data set list display to use a check box for inclusion in a graph
Incidently, this supports removing a data set from a graph.
Also, remove the Add, Remove, and Cancel buttons from the data set dialog.
* grapher/GraphWidget.hxx (DataModelColumns::_dataEnabled): new member
_listConnection: new member
* grapher/GraphWidget.cxx (GraphWidget): Delete connections for
removed buttons. Connect to dialog show and hide signals instead of
map. Add "Enabled" column to dialog list.
(onDataAdd, onDataRemove): delete
(onDataDialogOpen): Initialize list store with all data sets and
hook up row_changed signal
(onDataDialogClose, onRowChanged): new functions
* grapher/graph-dialog.glade: Remove obsolete buttons (Add, Remove, Cancel).
Tim Moore [Mon, 7 Dec 2009 11:43:56 +0000 (12:43 +0100)]
option to display graph times relative to the start time
This avoids having humongous numbers displayed on the graphs' x
axis. Also, the dialog for adding a data set to a graph was cleaned
up.
* grapher/graph-dialog.glade: Add check box for display of relative
time and a label for the data set list. Force the list of data sets
to be larger.
* grapher/Graph.hxx (_timeBase): new member
* grapher/Graph.cxx (draw): Subtract _timeBase from displayed time
value.
* grapher/GraphWidget.hxx (DataModelColumns): Add a column for a data
set's title, which is optional at the moment.
* grapher/GraphWidget.hxx (_globalTimeBase, _timeBaseInitialized,
_relativeTimesButton, _displayRelativeTimes): new members
* grapher/GraphWidget.hxx (GraphWidget): Hook up check button for
displaying relative time.
(on_expose_event): Determine base time if needed; set base time in
graphs.
(onDataDialogOpen): Insert graph data set's name (key) and title
into the list of data sets.
Tim Moore [Fri, 4 Dec 2009 16:12:06 +0000 (17:12 +0100)]
hover text on the additional graphs
* grapher/Graph.cxx (window2GraphCoords): Take the entire graph's
position into account too.
* grapher/GraphWidget.cxx (GraphWidget): Hook up the data dialog's OK
button.
(onDataDialogOpen): If a data set doesn't have a title, use it's
name (key) instead.
Tim Moore [Fri, 4 Dec 2009 13:11:25 +0000 (14:11 +0100)]
tweak multiline hover text to have proper interline spacing
* grapher/CairoWidget.cxx (CairoTextBox::draw): Use font information
to caculate legible spacing. Also change the font to something more
readable.
* testsuite/systemtap.examples/general/grapher.stp: Put carriage
returns in the right spots.
Tim Moore [Fri, 4 Dec 2009 12:08:01 +0000 (13:08 +0100)]
support multiline data output from scripts run under the grapher
This is accompanied by support for multiline output in hover text.
* grapher/StapParser.cxx (ioCallback): Read data 'til the end of line
character, not just '\n'. Be careful to use I/O functions that don't
treat '\n' specially.
* grapher/StapParser.hxx: ditto
* grapher/CairoWidget.cxx (CairoTextBox::draw): Perform line breaks
for hover text.
* testsuite/systemtap.examples/general/grapher.stp: Do multiline
output of keyboard events. Also, fix longstanding breaking in the
pty probe.
Tim Moore [Thu, 3 Dec 2009 18:31:08 +0000 (19:31 +0100)]
Hover text for event-style graphs
Don't draw the data value for an event; only display it in hover text.
* grapher/Graph.hxx (window2GraphCoords): new function
* grapher/Graph.cxx (window2GraphCoords): ditto
* grapher/GraphStyle.cxx (GraphStyleEvent::dataIndexAtPoint): new
function implementation.
David Smith [Wed, 2 Dec 2009 21:16:10 +0000 (15:16 -0600)]
Fix PR 11034 by directly allocating per-cpu context data.
* translate.cxx (emit_common_header): Change type of 'contexts' to an
array of struct context pointers.
(emit_module_init): Allocate a context structure for each possible cpu.
Free each if an error occurs.
(emit_module_exit): Update contexts reference. Free each possible cpu's
context structure.
* tapsets.cxx (common_probe_entryfn_prologue): Use array instead of percpu
data for context structure.
Tim Moore [Wed, 2 Dec 2009 18:27:07 +0000 (19:27 +0100)]
Make the hover text conform to data displayed.
Start of code to be more selective about the association between the
hover text and the underling graph. Also, show the data set name in hover text.
* grapher/GraphStyle.hxx (dataIndexAtPoint): New virtual function.
* grapher/GraphStyle.cxx (dataIndexAtPoint): Implementation for bar graphs
* grapher/GraphWidget.cxx (onHoverTimeout): Use dataIndexAtPoint.
Anton Vorontsov [Fri, 27 Nov 2009 22:33:47 +0000 (01:33 +0300)]
Use proper types for do_div
do_div accepts unsigned 64-bit integer type for dividend, signed types
would cause do_div's typecheck fail:
stat-common.c: In function 'needed_space':
stat-common.c:50: error: comparison of distinct pointer types lacks a cast
...same errors in time.c and tapset-timers.cxx's generated code...
A fix for time.c is special, on ppc32 cycles_t is 32-bit, so technically
we don't need do_div, but since the whole _stp_gettimeofday_ns() operates
on 64-bit types we'd better be safe and use uint64_t for the math.
Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Anton Vorontsov [Fri, 27 Nov 2009 22:33:51 +0000 (01:33 +0300)]
Change KERNEL_RELOC_SYMBOL to "_stext" on ppc32
Currently staprun fails at send_relocation_kernel(), this is because
ppc32 doesn't have ".__start" symbol. I think we should use _stext,
just as other arches.
Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
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).