From 4b17d6af571193c8a78c470ef941bbfea73de253 Mon Sep 17 00:00:00 2001 From: wcohen Date: Tue, 2 May 2006 19:26:34 +0000 Subject: "-t" option to collect information the number of times a probe runs and the average amount of time spent in the probe. --- main.cxx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'main.cxx') 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) -- cgit