summaryrefslogtreecommitdiffstats
path: root/grapher/StapParser.cxx
Commit message (Collapse)AuthorAgeFilesLines
* change namespace indentation to 0Tim Moore2009-12-211-263/+263
| | | | | A silly change, but this works better with other tools, like git diff. I should have started the C++ files this way.
* grapher: implement restarting a stap processTim Moore2009-12-111-0/+18
| | | | | | | | | | | | | | | | | | | * 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-101-11/+20
| | | | | | | | | | | | | | | 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.
* show the status of stap processes in the process windowTim Moore2009-12-091-157/+181
| | | | | | | | | | | | | | | | | | | 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-081-3/+9
| | | | | | | | | | | | | | | 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-081-2/+4
| | | | | | | | | | | | | | 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.
* add copyright and license to grapher filesTim Moore2009-12-071-0/+8
|
* support multiline data output from scripts run under the grapherTim Moore2009-12-041-8/+19
| | | | | | | | | | | | | | 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.
* Make the hover text conform to data displayed.Tim Moore2009-12-021-0/+2
| | | | | | | | | 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-021-2/+2
| | | | | | * grapher/GraphStyle.cxx: New file * grapher/GraphStyle.hxx: New file * grapher/Graph(draw): Move much drawing code to GraphStyle::draw
* change time type from double to int64_tTim Moore2009-12-011-3/+3
| | | | | | | | | | | | | | * 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.
* Fix regression of parsing grapher optionsTim Moore2009-10-281-28/+28
| | | | | * grapher/StapParser.hxx (ioCallback): Test return value from findTaggedValue properly.
* More refactoring for multiple stap processes.Tim Moore2009-10-271-5/+5
| | | | | | | | | * 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-271-1/+1
| | | | | | | | * 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.
* cleanup of graph data parser, using Boost functions where usefulTim Moore2009-10-141-34/+32
| | | | | | * grapher/StapParser.cxx (commaSplit): Use Boost string split function (findTaggedValue): Return bool instead of position (ioCallback): Avoid using hard-coded string lengths
* grapher: Handle the death of the child stap processTim Moore2009-09-301-1/+26
| | | | | | * grapher/grapher.c (main): Set up signal and i/o handlers to detect death of child. * grapher/StapParser.cxx (errIoCallback): New method
* Fix graph attribute parsing bugletTim Moore2009-09-161-2/+2
| | | | | * grapher/StapParser.cxx (findTaggedValue): Extract value substring after tag.
* Fix missing strlen compile error.Stan Cox2009-08-061-0/+1
| | | | StapParser.cxx (#include cstring): New.
* Add #include and casting to allow compilations of grapher on RHEL5.William Cohen2009-08-041-0/+1
|
* Support for presenting multiple graphsTim Moore2009-07-281-113/+135
| | | | | | | | | | | | | | | | | | | | * grapher/Graph.hxx: New file; class for single graph display. * grapher/Graph.cxx: New file. * grapher/GraphData.hxx: Associate title and axis labels with graph data and not a graph display. * grapher/GraphWidget.hxx: Move graph-related members to Graph class. * grapher/GraphWidget.cxx (getExtents, setExtents): Move to Graph class (on_expose_event): Move graph rendering to Graph. (on_button_press_event): Delegate to Graph. (on_motion_notify_event, on_scroll_event): Modify "active" graph. * grapher/StapParser.cxx (findTaggedValue): New parsing helper function. (io_callback): Support new syntax where properties are attached to graph data and not the entire graph. * grapher/grapher.cxx (GrapherWindow): Don't set graph values. * grapher/Makefile.am: Add Graph.cxx. * testsuite/systemtap.examples/general/grapher.stp: New property syntax.
* Templatize GraphDataTim Moore2009-07-281-18/+59
| | | | | | | | | | | | | | | | * grapher/GraphData.hxx (GraphDataBase): new superclass for GraphData. Split time data out as a separate vector. (GraphData): Rewrite as template. * grapher/GraphWidget.cxx (on_expose_event): Reflect GraphData templatization. Handle events with string values. * grapher/GraphWidget.hxx (GraphWidget): Keep pointers to GraphDataBase objects instead of GraphData. * grapher/StapParser.cxx (parseData): new member function (ioCallback): Handle new discreet event * grapher/StapParser.hxx (StapParser): keep pointers to GraphDataBase objects instead of GraphData * testsuite/systemtap.examples/general/grapher.stp: Display actual key pressed for keyboard event
* Add CSV syntax support to the grapherTim Moore2009-07-281-10/+70
| | | | | | * grapher/GraphData.hxx (CSVData): new class * grapher/GraphData.cxx (commaSplit): new function (ioCallback): handle CSV definition and data
* Refactor StapParser into its own filesTim Moore2009-07-281-0/+81
* grapher/StapParser.cxx: new file * grapher/StapParser.hxx: new file * grapher/grapher.cxx: Use external StapParser class.