summaryrefslogtreecommitdiffstats
path: root/grapher/StapParser.hxx
Commit message (Collapse)AuthorAgeFilesLines
* change namespace indentation to 0Tim Moore2009-12-211-56/+56
| | | | | 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-1/+2
| | | | | | | | | | | | | | | | | | | * 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-2/+3
| | | | | | | | | | | | | | | 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-0/+8
| | | | | | | | | | | | | | | | | | | 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-23/+54
| | | | | | | | | | | | | | | 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-5/+2
| | | | | | | | | | | | | | 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-1/+2
| | | | | | | | | | | | | | 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.
* change time type from double to int64_tTim Moore2009-12-011-1/+1
| | | | | | | | | | | | | | * 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.
* More refactoring for multiple stap processes.Tim Moore2009-10-271-4/+4
| | | | | | | | | * 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/+7
| | | | | | | | * 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.
* grapher: Handle the death of the child stap processTim Moore2009-09-301-2/+5
| | | | | | * grapher/grapher.c (main): Set up signal and i/o handlers to detect death of child. * grapher/StapParser.cxx (errIoCallback): New method
* Templatize GraphDataTim Moore2009-07-281-2/+3
| | | | | | | | | | | | | | | | * 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-0/+1
| | | | | | * 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/+21
* grapher/StapParser.cxx: new file * grapher/StapParser.hxx: new file * grapher/grapher.cxx: Use external StapParser class.