summaryrefslogtreecommitdiffstats
path: root/main.cxx
diff options
context:
space:
mode:
authorfche <fche>2007-01-29 20:32:00 +0000
committerfche <fche>2007-01-29 20:32:00 +0000
commit9abec5383dd77c0e164f043da3523d6cf4bf992f (patch)
tree535d20f5b720d7b235021ba541f49fd54ec6074c /main.cxx
parent4c6d6df0e248aba4accec19d74bdbaaf2219a7a6 (diff)
downloadsystemtap-steved-9abec5383dd77c0e164f043da3523d6cf4bf992f.tar.gz
systemtap-steved-9abec5383dd77c0e164f043da3523d6cf4bf992f.tar.xz
systemtap-steved-9abec5383dd77c0e164f043da3523d6cf4bf992f.zip
2007-01-29 Frank Ch. Eigler <fche@elastic.org>
* main.cxx (main): For successful last_pass=4, print compiled module name. * cache.cxx (get_from_cache): Ditto. 2007-01-29 Frank Ch. Eigler <fche@elastic.org> * systemtap.base/cache.exp (stap_compile): Accept new -p4 output.
Diffstat (limited to 'main.cxx')
-rw-r--r--main.cxx26
1 files changed, 14 insertions, 12 deletions
diff --git a/main.cxx b/main.cxx
index 3ded761e..09810bd5 100644
--- a/main.cxx
+++ b/main.cxx
@@ -1,5 +1,5 @@
// systemtap translator/driver
-// Copyright (C) 2005-2006 Red Hat Inc.
+// Copyright (C) 2005-2007 Red Hat Inc.
// Copyright (C) 2005 IBM Corp.
// Copyright (C) 2006 Intel Corporation.
//
@@ -623,17 +623,15 @@ main (int argc, char * const argv [])
{
ostringstream o;
unsigned saved_verbose;
-
- // Make sure we're in verbose mode, so that printscript()
- // will output function/probe bodies.
- saved_verbose = s.verbose;
- s.verbose = 3;
- // Print script to 'o'
- printscript(s, o);
-
- // Restore original verbose mode setting.
- s.verbose = saved_verbose;
+ {
+ // Make sure we're in verbose mode, so that printscript()
+ // will output function/probe bodies.
+ saved_verbose = s.verbose;
+ s.verbose = 3;
+ printscript(s, o); // Print script to 'o'
+ s.verbose = saved_verbose;
+ }
// Generate hash
find_hash (s, o.str());
@@ -685,6 +683,10 @@ main (int argc, char * const argv [])
times (& tms_before);
gettimeofday (&tv_before, NULL);
rc = compile_pass (s);
+
+ if (rc == 0 && s.last_pass == 4)
+ cout << s.hash_path << endl;
+
times (& tms_after);
gettimeofday (&tv_after, NULL);
@@ -704,9 +706,9 @@ main (int argc, char * const argv [])
add_to_cache(s);
}
- // XXX: what to do if rc==0 && last_pass == 4? dump .ko file to stdout?
if (rc || s.last_pass == 4) goto cleanup;
+
// PASS 5: RUN
pass_5:
times (& tms_before);