summaryrefslogtreecommitdiffstats
path: root/main.cxx
diff options
context:
space:
mode:
authorwcohen <wcohen>2006-05-02 19:26:34 +0000
committerwcohen <wcohen>2006-05-02 19:26:34 +0000
commit4b17d6af571193c8a78c470ef941bbfea73de253 (patch)
tree9ac3ac53f04b20469b7765c532336f431bac067a /main.cxx
parent86cae39ac23bb8fd44416520b53b8fc74ae9a857 (diff)
downloadsystemtap-steved-4b17d6af571193c8a78c470ef941bbfea73de253.tar.gz
systemtap-steved-4b17d6af571193c8a78c470ef941bbfea73de253.tar.xz
systemtap-steved-4b17d6af571193c8a78c470ef941bbfea73de253.zip
"-t" option to collect information the number of times a probe runs and
the average amount of time spent in the probe.
Diffstat (limited to 'main.cxx')
-rw-r--r--main.cxx8
1 files changed, 7 insertions, 1 deletions
diff --git a/main.cxx b/main.cxx
index 8005a7ec..ab13a516 100644
--- a/main.cxx
+++ b/main.cxx
@@ -91,6 +91,7 @@ usage (systemtap_session& s)
<< " -c CMD start the probes, run CMD, and exit when it finishes"
<< endl
<< " -x PID sets target() to PID" << endl
+ << " -t benchmarking timing information generated" << endl
;
// -d: dump safety-related external references
@@ -124,6 +125,7 @@ main (int argc, char * const argv [])
s.kernel_release = string (buf.release);
s.architecture = string (buf.machine);
s.verbose = 0;
+ s.timing = 0;
s.guru_mode = false;
s.bulk_mode = false;
s.unoptimized = false;
@@ -149,7 +151,7 @@ main (int argc, char * const argv [])
while (true)
{
- int grc = getopt (argc, argv, "hVvp:I:e:o:R:r:m:kgc:x:D:bs:u");
+ int grc = getopt (argc, argv, "hVvtp:I:e:o:R:r:m:kgc:x:D:bs:u");
if (grc < 0)
break;
switch (grc)
@@ -162,6 +164,10 @@ main (int argc, char * const argv [])
s.verbose ++;
break;
+ case 't':
+ s.timing ++;
+ break;
+
case 'p':
s.last_pass = atoi (optarg);
if (s.last_pass < 1 || s.last_pass > 5)