summaryrefslogtreecommitdiffstats
path: root/grapher
Commit message (Collapse)AuthorAgeFilesLines
* change namespace indentation to 0Tim Moore2009-12-2111-1364/+1364
| | | | | A silly change, but this works better with other tools, like git diff. I should have started the C++ files this way.
* PR 10889: Reorganize client/server man pages. Document --unprivileged.Dave Brolley2009-12-171-223/+129
|
* grapher: implement restarting a stap processTim Moore2009-12-113-48/+128
| | | | | | | | | | | | | | | | | | | * grapher/StapParser.cxx (StapParser::disconnect): new function * grapher/StapParser.hxx (StapProcess::StapProcess): initialize argv to 0 * grapher/grapher.cxx (StapLauncher::setArgs): Set argv to 0 (StapLauncher launch, launchUsingParser): Refactor launch(), extracting function a that (re)launches a stap process using an existing parser. (StapLauncher::onChildDied): call disconnect() on dead parser. (GrapherWindow::_graphicalLauncher, setGraphicalLauncher): delete member, replacing with... (graphicalLauncher): new variable (ProcModelColumns): Store parser object in the list model instead of just a StapProcess object. (ProcWindow::onRestart): new function (ProcWindow::refresh): Preserve the list selection when the process list is refreshed. (ProcWindow::onSelectionChanged): Manage the restart button's state.
* grapher: integrate graph events from stdin with the stap process framework.Tim Moore2009-12-103-21/+32
| | | | | | | | | | | | | | | This was the original way to do graphing and had bitrotted some. * grapher/StapParser.cxx (initIO): new catchHUP argument (ioCallback): Only disconnect signals, etc. on IN_HUP if catchHUP is true. (errIoCallback): Write error messages to stderr, not stdout. * grapher/grapher.cxx (StapLauncher::launch): Don't catchHUP on our stap process children. (ProcWindow::refresh): Display something reasonable for the stap "process" that is feeding stdin. (main): Use StapParser::initIO to initialize parser reading from stdin.
* grapher: more implementation stap process windowTim Moore2009-12-102-155/+173
| | | | | | | | | | | | | The process arguments are displayed, and the "kill" button is insensitive when a process is dead or nothing is selected. * grapher/grapher.cxx (ProcWindow _killButton, _restartButton, _stapArgsLabel, _scriptArgsLabel): new members (ProcWindow::ProcWindow): hook 'em up (ProcWindow::onSelectionChanged): Enable / disable kill button and display process arguments. * grapher/processwindow.glade: Replace bizzare handle window with a horizontal pane. Tweak various widget sizes.
* grapher: change SIGCHLD handling and exit cleanupTim Moore2009-12-101-115/+95
| | | | | | | | | | | | | | | | | | | | | | | The signal handler now calls waitpid() and writes the pid and status to its pipe. * grapher.cxx (ChildInfo): new class (handleChild): wait for zombies and write their status down the pipe. (ChildDeathReader::ioCallback): Read dead child's pid from signal handler pipe and emit signal. (ChildDeathReader::reap): delete (ChildDeathReader::Callback): delete (StapLauncher::StapLauncher): Connect to childDied signal. (StapLauncher setWinParams, reap, cleanUp): delete (onChildDied): new function that updates the parsers list when a child dies. (GrapherWindow): Remove ChildDeathReader::Callback base class (GrapherWindow::onParserListChanged): New function; exits if program is quitting and no parsers are left. (on_menu_file_quit): Kill all children; don't hide (and exit) unless there are no parsers. (main): Don't do any cleanup after Gtk loop exits.
* show the status of stap processes in the process windowTim Moore2009-12-094-227/+418
| | | | | | | | | | | | | | | | | | | Also, the "kill" button now works. * grapher/StapParser.hxx (_ioConnection, _errIoConnection): new members for sigc connections. (initIo): New function (parsers, parserListChangedSignal): new variables * grapher/StapParser.cxx (ioCallback): disconnect signals when child dies (initIo): new function * grapher/grapher.cxx (StapLauncher): eliminate death callback in favor of childDied signal. Use global parsers list (ProcWindow::_listSelection): new member (ProcWindow::show, hide, onParserListChanged, onSelectionChanged, onKill): new functions (ProcWindow::ProcWindow): Set up cell renderer for status icon * grapher/processwindow.glade: labels for display script and stap arguments
* 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).
* 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-041-7/+13
| | | | | | | | * 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-044-15/+53
| | | | | | | | | | | | | | 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.
* 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.
* Regenerate autotools files using autoreconf to pick up latest Makefile.am ↵Dave Brolley2009-12-011-124/+216
| | | | changes.
* 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.
* change time type from double to int64_tTim Moore2009-12-015-25/+44
| | | | | | | | | | | | | | * 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.
* Merge branch 'master' of ssh://sources.redhat.com/git/systemtapDave Brolley2009-11-231-1/+0
|\ | | | | | | | | | | Conflicts: configure
| * PR4037: 32-bit staprun vs. 64-bit kernels just works (tm)Frank Ch. Eigler2009-11-171-1/+0
| | | | | | | | | | * configure.ac (PROCFLAGS): Don't define it. * Makefile.am: Don't use it.
* | Ensure uprobes/Makefile never returns failure due to setting permissions.Dave Brolley2009-11-231-216/+124
|/ | | | | Ensure uprobes install directory has group 'stap-server'. Rename igid_in to in_group.
* Fix stapprobes.irq title and add to install listJosh Stone2009-11-101-124/+216
| | | | (And incidentally re-enable quiet builds at the same time...)
* Merge branch 'master' of ssh://sources.redhat.com/git/systemtapDave Brolley2009-11-034-231/+318
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: Makefile.in configure doc/Makefile.in doc/SystemTap_Tapset_Reference/Makefile.in grapher/Makefile.in testsuite/configure
| * * grapher/GraphData.hxx (GraphDataBase, GraphData): UseTim Moore2009-10-281-3/+10
| | | | | | | | boost::circular_buffer for time and data storage.
| * Fix regression of parsing grapher optionsTim Moore2009-10-281-28/+28
| | | | | | | | | | * grapher/StapParser.hxx (ioCallback): Test return value from findTaggedValue properly.
| * Merge branch 'master' of ssh://sourceware.org/git/systemtapTim Moore2009-10-271-25/+53
| |\
| | * Enable Kbuild-like quiet buildsJosh Stone2009-10-221-25/+53
| | | | | | | | | | | | | | | | | | | | | | | | This enables much cleaner build output from automake. To re-enable the verbose commands, pass --disable-silent-rules to configure, or use V=1 at make time. * configure.ac: Enable AM_SILENT_RULES by default.
| * | Kill off child processes correctly on exit.Tim Moore2009-10-271-30/+100
| | | | | | | | | | | | | | | | | | * grapher/grapher.cxx (ChildDeathReader::reap): New function. (StapLauncher): Keep a list of instantiated parsers. (StapLauncher::cleanup): Kill off all launched stap processes.
| * | More refactoring for multiple stap processes.Tim Moore2009-10-273-162/+173
| | | | | | | | | | | | | | | | | | | | | | | | | | | * grapher/StapParser.hxx (StapParser): Change _win and _widget from references to pointers. * grapher/StapParser.cxx (ioCallback): Ditto. * grapher/grapher.cxx (StapLauncher, GraphicalStapLauncher): Rewrite to make GraphicalStapLauncher a derived class of StapLauncher. (main): Accept graphing data from stdin with a "-" argument.
| * | Change stap parser to use an input file descriptor other than stdinTim Moore2009-10-273-16/+15
| |/ | | | | | | | | | | | | | | * grapher/StapParser.hxx (_inFd, getInFd, setInFd): new member and fuctions * grapher/StapParser.cxx (ioCallback): Use _inFd variable instead of stdin. * grapher/grapher.cxx (StapLauncher::launch): Don't read input from stap on stdin; use the the read end of the pipe.
* / Infrastructure for new stap-server initscript.Dave Brolley2009-10-201-175/+111
|/
* Updated checking for grapher dependencies.David Smith2009-10-152-5/+14
| | | | | | | | | | | | * configure.ac: Made sure nss includes will error even if only 1 header isn't usable. Added grapher dependencies gtkmm and boost headers. * Makefile.in: Regenerated. * config.in: Ditto. * configure: Ditto. * doc/Makefile.in: Ditto. * doc/SystemTap_Tapset_Reference/Makefile.in: Ditto. * grapher/Makefile.am: Use libglade CFLAGS/LIBS. * grapher/Makefile.in: Regenerated.
* cleanup of graph data parser, using Boost functions where usefulTim Moore2009-10-143-36/+34
| | | | | | * grapher/StapParser.cxx (commaSplit): Use Boost string split function (findTaggedValue): Return bool instead of position (ioCallback): Avoid using hard-coded string lengths
* Added man page for stapgraphTim Moore2009-10-073-11/+202
| | | | * grapher/stapgraph.1.in: new file
* dialog for choosing stap script and providing arguments to stap and the scriptTim Moore2009-09-305-7/+348
| | | | | | | | | * grapher/grapher.cxx (GraphicalStapLauncher): New class. (GrapherWindow constructor): Bind actions for graphical launcher buttons (GrapherWindow::setGraphicalLauncher): new method (GrapherWindow::on_menu_script_start): new method grapher/stap-start.glade, grapher/stap-start.gladep: new files grapher/Makefile.am: install stap-start.glade
* classes for launching stap and listening for its deathTim Moore2009-09-301-94/+221
| | | | | | | | | * grapher/grapher.cxx (ChildDeathReader): New class to handle I/O signalling death of a child. (GrapherWindow): Inherit from ChildDeathReader. (StapLauncher): New class for passing arguments to inferior stap process and checking for its demise. (main): Move launching logic to StapLauncher.
* Pass command line arguments on to stapTim Moore2009-09-301-3/+6
| | | | * grapher/grapher.cxx (main): Pass program arguments to stap
* cleanup of graph data dialogTim Moore2009-09-301-3/+16
| | | | | * grapher/GraphWidget.cxx (on_button_release_event, onDataAdd): tweaks for graph data dialog
* grapher: Handle the death of the child stap processTim Moore2009-09-303-11/+116
| | | | | | * grapher/grapher.c (main): Set up signal and i/o handlers to detect death of child. * grapher/StapParser.cxx (errIoCallback): New method