summaryrefslogtreecommitdiffstats
path: root/grapher/grapher.cxx
Commit message (Collapse)AuthorAgeFilesLines
* grapher: implement restarting a stap processTim Moore2009-12-111-47/+108
| | | | | | | | | | | | | | | | | | | * 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-8/+9
| | | | | | | | | | | | | | | 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-101-4/+34
| | | | | | | | | | | | | 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-091-54/+113
| | | | | | | | | | | | | | | | | | | 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-30/+126
| | | | | | | | | | | | | | | 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/+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.
* tiny refactoring of signal and pipe codeTim Moore2009-12-081-11/+6
|
* add copyright and license to grapher filesTim Moore2009-12-071-0/+8
|
* some aesthetic tweaks to the grapherTim Moore2009-12-011-1/+1
| | | | | | * 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.
* 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-271-153/+164
| | | | | | | | | * 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-14/+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.
* dialog for choosing stap script and providing arguments to stap and the scriptTim Moore2009-09-301-4/+89
| | | | | | | | | * 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
* grapher: Handle the death of the child stap processTim Moore2009-09-301-8/+85
| | | | | | * grapher/grapher.c (main): Set up signal and i/o handlers to detect death of child. * grapher/StapParser.cxx (errIoCallback): New method
* Draw multiple graphsTim Moore2009-09-301-0/+10
| | | | | | | | | | | | | | * grapher/Graph.cxx (Graph constructor): Initialize graph dimensions. (draw): Don't clear the drawing area. * grapher/GraphWidget.hxx (GraphWidget): Add dimensions and on_size_request() method. * grapher/GraphWidget.cxx (GraphWidget constructor): Initialize dimensions. (addGraph): New method. (on_size_request): New method to pass widget's size to parent widgets * grapher/grapher.cxx (GrapherWindow constructor): add "add graph" action. (addGraph): New method.
* Draw graphs inside a scrolled windowTim Moore2009-09-161-2/+5
| | | | | * grapher/grapher.cxx (GrapherWindow, GrapherWindow constructor): Add ScrolledWindow object and display it. Make GraphWidget its child.
* Support for presenting multiple graphsTim Moore2009-07-281-3/+0
| | | | | | | | | | | | | | | | | | | | * 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.
* grapher fixupsTim Moore2009-07-281-1/+1
| | | | * grapher/grapher.cxx (main): Fix problems with call to execlp.
* run stap from grapherTim Moore2009-07-281-2/+32
| | | | | * grapher/grapher.cxx (main): Start stap + script from program if supplied as an argument.
* Incorporate grapher widget in real applicationTim Moore2009-07-281-11/+78
| | | | | * grapher/grapher.cxx (GrapherWindow): New class. (main): Instantiate GrapherWindow.
* Refactor StapParser into its own filesTim Moore2009-07-281-87/+1
| | | | | | * grapher/StapParser.cxx: new file * grapher/StapParser.hxx: new file * grapher/grapher.cxx: Use external StapParser class.
* Move grapher to subdirectoryTim Moore2009-04-201-0/+127