diff options
author | Tim Moore <timoore@redhat.com> | 2009-05-27 10:32:51 +0200 |
---|---|---|
committer | Tim Moore <timoore@redhat.com> | 2009-07-28 10:17:29 +0200 |
commit | 5f4f8b1129659adb2015ce42821faccf8fe6d8d5 (patch) | |
tree | 9fdb07036f2461a01f8efa1f5d07f496191e71bc /testsuite/systemtap.examples | |
parent | 95ddfc079a1d9affdb285f7690f8d5623cd7124a (diff) | |
download | systemtap-steved-5f4f8b1129659adb2015ce42821faccf8fe6d8d5.tar.gz systemtap-steved-5f4f8b1129659adb2015ce42821faccf8fe6d8d5.tar.xz systemtap-steved-5f4f8b1129659adb2015ce42821faccf8fe6d8d5.zip |
Templatize GraphData
* 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
Diffstat (limited to 'testsuite/systemtap.examples')
-rw-r--r-- | testsuite/systemtap.examples/general/grapher.stp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/testsuite/systemtap.examples/general/grapher.stp b/testsuite/systemtap.examples/general/grapher.stp index 5d9b4bb5..26d35aca 100644 --- a/testsuite/systemtap.examples/general/grapher.stp +++ b/testsuite/systemtap.examples/general/grapher.stp @@ -6,7 +6,7 @@ printf ("%%Title:CPU utilization\n"); printf ("%%XAxisTitle:Time\n"); printf ("%%YAxisTitle:Percent\n"); printf ("%%DataSet:cpu 100 00ff00 bar\n"); -printf ("%%DataSet:kbd 100 ff0000 dot\n"); +printf ("%%DataSet:kbd 75 ff0000 discreet\n"); } # CPU utilization @@ -28,5 +28,6 @@ probe timer.ms(100) { # collect utilization percentages frequently } probe kernel.function("kbd_event") { - printf("kbd %d %d\n", gettimeofday_ms(), 75) + if ($event_type == 1 && $value) + printf("kbd %d %d\n", gettimeofday_ms(), $event_code) } |