From 9abec5383dd77c0e164f043da3523d6cf4bf992f Mon Sep 17 00:00:00 2001 From: fche Date: Mon, 29 Jan 2007 20:32:00 +0000 Subject: 2007-01-29 Frank Ch. Eigler * main.cxx (main): For successful last_pass=4, print compiled module name. * cache.cxx (get_from_cache): Ditto. 2007-01-29 Frank Ch. Eigler * systemtap.base/cache.exp (stap_compile): Accept new -p4 output. --- main.cxx | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) (limited to 'main.cxx') 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); -- cgit