summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fix regression in statistic operationsAnton Vorontsov2009-12-091-6/+12
| | | | | | | | | | | In commit 98c783852039061db8c1611742660aaded0eab77 ("Use proper types for do_div") I imprudently changed some variables to an unsigned type while in some places the code actually relies on a sign. So, let's be a bit smarter now and use temporary variables. Reported-by: Wenji Huang <wenji.huang@oracle.com> Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
* PR 10848 partial fix by using systemtap memory functions everywhere.David Smith2009-12-092-8/+12
| | | | | | | * runtime/addr-map.c (add_bad_addr_entry): Uses systemtap memory allocation/deallocation wrappers. * runtime/itrace.c (create_itrace_info): Ditto. (remove_usr_itrace_info): Ditto.
* Handle .probes section big endian 32 bit case.Stan Cox2009-12-092-9/+19
| | | | | | sdt.h (STAP_PROBE_ADDR): Add 32 bit big endian case. (STAP_PROBE_DATA_): Use .balign tapsets.cxx (sdt_query::get_next_probe): Stop if there is no probe name.
* Merge commit 'origin/master'Tim Moore2009-12-089-142/+344
|\
| * Add .library("lib").mark("mark") and use it for .mark semaphores.Stan Cox2009-12-087-124/+271
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | tapset-utrace.cxx (TOK_LIBRARY): New. (utrace_derived_probe::utrace_derived_probe): Add library and has_library. (utrace_builder::build): Handle library. (utrace_derived_probe_group::emit_probe_decl): Add sdt_sem_offset to emitted stap_utrace_probes. Add stap_task_finder_target mmap_callback for handling shared library. Handle sdt_sem_offset in emitted_stp_utrace_probe_cb. Add stap_utrace_mmap_found. (register_tapset_utrace): Handle .library tapset-utrace.cxx (TOK_LIBRARY): New. (base_query::base_query): Add path and has_library. (dwarf_derived_probe::dwarf_derived_probe) Likewise. (dwarf_derived_probe::register_patterns): Handle .library (sdt_query::convert_location): Likewise. (dwarf_builder::build): Likewise. (uprobe_derived_probe_group::emit_module_decls): Emit sdt_sem_address. Add sdt_sem_offset to emitted stap_uprobe_spec. Add offset and vm_flags to signature of stap_uprobe_change_plus, and handle sdt_sem_offset. Allow writeable segments in emitted stap_uprobe_mmap_found. sdt_misc.exp: Test .library util.cxx (find_executable): Add env_path to sig and use it in getenv. util.h (find_executable): Likewise. Make "PATH" the default. dtrace.in (provider): Turn on semaphores. sdt.h: Likewise.
| * Revert "PR 10641 fixed by checking module name in unprivileged mode."David Smith2009-12-083-17/+0
| | | | | | | | | | | | | | This reverts commit b2ea60606801aa9bf243f22318ac4bd8a25094fe. * main.cxx (checkOptions): Remove unprivileged mode module name check. * testsuite/parseko/cmdline05.stp: Delete unneeded testcase. * testsuite/parseok/cmdline03.stp: Ditto.
| * Add dtrace -I support.Mark Wielaard2009-12-082-17/+70
| | | | | | | | | | | | | | | | dtrace -I is used to pass through include paths to cpp when run. Thanks to David Malcolm <dmalcolm@redhat.com> for python coding and testing. * dtrace.in: Add -I support. * testsuite/systemtap.base/dtrace.exp: Add testcases for -C -I and -G -I.
| * PR 10641 fixed by checking module name in unprivileged mode.David Smith2009-12-073-0/+17
| | | | | | | | | | | | | | * main.cxx (checkOptions): If in unprivileged mode, make sure module name starts with 'stap_'. * testsuite/parseko/cmdline05.stp: New testcase. * testsuite/parseok/cmdline03.stp: New testcase.
| * Small compile server shutdown fix.David Smith2009-12-071-1/+3
| | | | | | | | | | * testsuite/lib/systemtap.exp (shutdown_server): Only remove the temporary stap script if it exists.
* | grapher: start of a dialog for displaying active stap processesTim Moore2009-12-087-59/+573
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The names of active scripts are displayed in a list; mock buttons suggest being able to stop and restart them. * grapher/processwindow.glade: new file * grapher/Makefile.am: add processwindow.glade to installed files * grapher/StapParser.hxx (StapProcess): new class (StapParser): factor out members that are now in StapProcess (ioCallback): Use the new childDied signal instead of aborting the whole grapher when a child dies. * grapher/grapher.cxx (ProcModelColumns, ProcWindow): classes for displaying stap process window. (GrapherWindow::on_menu_proc_window): new function
* | refactor list of data sets out of GraphWidget into a global data structure.Tim Moore2009-12-088-32/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Also, add a sigc signal for broadcasting data set changes. * grapher/GraphData.hxx (GraphDataList) new typedef (getGraphData, graphDataSignal): new functions * grapher/Graph.hxx (DatasetList): remove typedef in favor of systemtap::GraphDataList * grapher/GraphWidget.cxx (GraphWidget, onGraphDataChanged): Use graphDataSignal to notice new data sets that need to be added. Use the global data set list instead of one embedded in GraphWidget. * grapher/StapParser.hxx: delete the _widget member; use signals to broadcast that there are new data sets instead of calling into the widget.
* | tiny refactoring of signal and pipe codeTim Moore2009-12-081-11/+6
|/
* add copyright and license to grapher filesTim Moore2009-12-0712-0/+96
|
* make the list items in the data set list unselectableTim Moore2009-12-072-1/+13
| | | | | | | | | | 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.
* Change data set list display to use a check box for inclusion in a graphTim Moore2009-12-073-100/+47
| | | | | | | | | | | | | | | | | 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).
* Merge branch 'master' of ssh://sourceware.org/git/systemtapTim Moore2009-12-072-10/+8
|\
| * Fix regression introduced by commit 379c585Wenji Huang2009-12-072-10/+8
| |
* | option to display graph times relative to the start timeTim Moore2009-12-075-6/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Add a missing cairo context restore()Tim Moore2009-12-071-0/+1
|/ | | | | | | It's not clear if this was causing any ill effects, but it is certainly bad form. * grapher/GraphWidget.cxx (on_expose_event): add missing cr->restore().
* Add new graph output to the last graphTim Moore2009-12-041-1/+1
|
* restore event square colorTim Moore2009-12-041-0/+2
| | | | | * grapher/GraphStyle.cxx (GraphStyleEvent::draw): set event color in inner loop.
* hover text on the additional graphsTim Moore2009-12-042-2/+10
| | | | | | | | | * 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.
* tweak multiline hover text to have proper interline spacingTim Moore2009-12-042-8/+16
| | | | | | | | * 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.
* support multiline data output from scripts run under the grapherTim Moore2009-12-045-20/+66
| | | | | | | | | | | | | | 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.
* Merge commit 'origin/master'Tim Moore2009-12-033-11/+33
|\
| * PR11020: Check switch_file global flag inside inner loop for busy scriptsMasami Hiramatsu2009-12-031-2/+4
| | | | | | | | | | * runtime/staprun/relay.c (reader_thread): Check switch_file thread flags inside inner read-write loop. And clear the flags after switching file.
| * Fix PR 11034 by directly allocating per-cpu context data.David Smith2009-12-022-9/+29
| | | | | | | | | | | | | | | | | | | | | | * 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.
* | Error check in hover text code for empty graphsTim Moore2009-12-031-2/+4
| | | | | | | | | | * grapher/GraphStyle.cxx(GraphStyleEvent::dataIndexAtPoint, GraphStyleBar::dataIndexAtPoint): check for empty graph data
* | Hover text for event-style graphsTim Moore2009-12-034-13/+47
|/ | | | | | | | | 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.
* Make the hover text conform to data displayed.Tim Moore2009-12-027-26/+73
| | | | | | | | | 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.
* Refactor drawing of different styles of graph into classesTim Moore2009-12-027-78/+204
| | | | | | * grapher/GraphStyle.cxx: New file * grapher/GraphStyle.hxx: New file * grapher/Graph(draw): Move much drawing code to GraphStyle::draw
* Account for zoom factor when choosing hover textTim Moore2009-12-021-5/+5
| | | | * grapher/Graph.cxx (getTimeAtPoint): Divide by _zoomFactor too.
* Make tapset and tests compatible with old kernelWenji Huang2009-12-0210-39/+94
| | | | | | | | | | | | | * tapset/ioscheduler.stp : Make probe optional. * tapset/irq.stp : Ditto. * tapset/scheduler.stp : Ditto. * tapset/tcpmib.stp : Ditto. * tapset/linuxmib.stp : Switch variable by version. * tapset/tty.stp : Ditto. * testsuite/buildok/irq.stp : Make probe test optional. * testsuite/buildok/tty.stp : Ditto. * testsuite/systemtap.examples/network/netdev.stp : Ditto. * testsuite/buildok/tcpmib-all-probes.stp : Add embedded functions.
* minor correctionDon Domingo2009-12-021-2/+2
|
* correcting license, forgot to change back yesterday while testing default ↵Don Domingo2009-12-021-3/+3
| | | | Publican 1 license
* Regenerate autotools files using autoreconf to pick up latest Makefile.am ↵Dave Brolley2009-12-0111-3756/+4958
| | | | changes.
* Merge branch 'master' of ssh://sources.redhat.com/git/systemtapDave Brolley2009-12-0120-31/+74
|\
| * uprobes ppc64: UPROBES_DEBUG build fixFrank Ch. Eigler2009-12-011-2/+2
| | | | | | | | * runtime/uprobes/uprobes_ppc.c (calc_offset): Fix printk types.
| * Use proper types for do_divAnton Vorontsov2009-12-013-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * Change KERNEL_RELOC_SYMBOL to "_stext" on ppc32Anton Vorontsov2009-12-011-1/+1
| | | | | | | | | | | | | | | | 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>
| * Implement _div64 and _mod64 for ppc32Anton Vorontsov2009-12-011-3/+39
| | | | | | | | | | | | | | _div64 and _mod64 arch-specific details were taken from gcc/longlong.h, just as it was done for i386. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
| * Share ppc64 and ppc32 code where possibleAnton Vorontsov2009-12-015-7/+7
| | | | | | | | | | | | | | | | | | | | * runtime/copy.c: Can use ppc64's code. * runtime/regs.h: Ditto. * runtime/string.h: Ditto. * tapset/context.stp: Ditto. * tapset/errno.stp: Ditto. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
| * Implement ppc32 variant of __is_user_regsAnton Vorontsov2009-12-012-0/+6
| | | | | | | | | | | | | | * tapset/nd_syscalls.stp: Implement ppc32 variant of __is_user_regs. * tapset/syscalls.stp: Ditto. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
| * stack-ppc: Adjust for ppc32Anton Vorontsov2009-12-012-3/+3
| | | | | | | | | | | | | | | | Get rid of magic numbers, use appropriate defines from ptrace.h. From now on stack-ppc.c should be suitable for ppc32. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
| * Rename stack-ppc64.c to stack-ppc.cAnton Vorontsov2009-12-012-1/+1
| | | | | | | | | | | | There should be no functional changes in this patch. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
| * Rename uprobes_ppc64.c to uprobes_ppc.c, use it for ppc32Anton Vorontsov2009-12-016-8/+8
| | | | | | | | | | | | | | The code *looks* generic enough, so I think it can be used for ppc32 without modifications. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
* | Make sure system types are defined.Dave Brolley2009-12-012-5/+7
|/
* Convert string.stp documentation to standard markup.Mark Wielaard2009-12-012-53/+85
| | | | | | * doc/SystemTap_Tapset_Reference/tapsets.tmpl: Add string.stp chapter. * tapset/string.stp: Convert documentation to standard markup and add documentation that was missing.
* some aesthetic tweaks to the grapherTim Moore2009-12-012-2/+2
| | | | | | * 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.
* Add hover text to the graph.Tim Moore2009-12-015-42/+114
| | | | | | | | | | | | | | 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.