diff options
author | fche <fche> | 2007-01-29 20:32:00 +0000 |
---|---|---|
committer | fche <fche> | 2007-01-29 20:32:00 +0000 |
commit | 9abec5383dd77c0e164f043da3523d6cf4bf992f (patch) | |
tree | 535d20f5b720d7b235021ba541f49fd54ec6074c | |
parent | 4c6d6df0e248aba4accec19d74bdbaaf2219a7a6 (diff) | |
download | systemtap-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.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | NEWS | 6 | ||||
-rw-r--r-- | cache.cxx | 12 | ||||
-rw-r--r-- | main.cxx | 26 | ||||
-rw-r--r-- | testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | testsuite/systemtap.base/cache.exp | 2 |
6 files changed, 43 insertions, 12 deletions
@@ -1,3 +1,8 @@ +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-23 Mike Mason <mmlnx@us.ibm.com> * Makefile.am, configure.ac: Add support for @@ -1,3 +1,9 @@ +* What's new since version 0.5.12? + +- When running in -p4 (compile-only) mode, the compiled .ko file name + is printed on standard output. + + * What's new since version 0.5.10? - Offline processing of debugging information, enabling general @@ -1,3 +1,12 @@ +// systemtap cache manager +// Copyright (C) 2006-2007 Red Hat Inc. +// +// This file is part of systemtap, and is free software. You can +// redistribute it and/or modify it under the terms of the GNU General +// Public License (GPL); either version 2, or (at your option) any +// later version. + + #include "session.h" #include "cache.h" #include "util.h" @@ -108,6 +117,9 @@ get_from_cache(systemtap_session& s) ifstream i (s.translated_source.c_str()); cout << i.rdbuf(); } + // And similarly, display probe module name for -p4. + if (s.last_pass == 4) + cout << s.hash_path << endl; // If everything worked, tell the user. We need to do this here, // since if copying the cached C file works, but copying the cached @@ -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); diff --git a/testsuite/ChangeLog b/testsuite/ChangeLog index 5245b75e..2c72f3e5 100644 --- a/testsuite/ChangeLog +++ b/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2007-01-29 Frank Ch. Eigler <fche@elastic.org> + + * systemtap.base/cache.exp (stap_compile): Accept new -p4 output. + 2007-01-24 Will Cohen <wcohen@redhat.com> * systemtap.syscall/syscall.exp: Increase timeout for slow machines. diff --git a/testsuite/systemtap.base/cache.exp b/testsuite/systemtap.base/cache.exp index af72fa63..04da509b 100644 --- a/testsuite/systemtap.base/cache.exp +++ b/testsuite/systemtap.base/cache.exp @@ -29,6 +29,8 @@ proc stap_compile { TEST_NAME flags script args } { expect { -re {^Pass\ [1234]:[^\r]*\ in\ .*\ ms.\r\n} {exp_continue} -re {^Pass\ [34]: using cached [^\r\n]+\r\n} {incr cached 1; exp_continue} + # pass-4 output + -re {^/[^\r\n]+.ko\r\n} {exp_continue} -re "compilation failed" {incr compile_errors 1; exp_continue} -re "semantic error:" {incr compile_errors 1; exp_continue} } |