summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--NEWS6
-rw-r--r--cache.cxx12
-rw-r--r--main.cxx26
-rw-r--r--testsuite/ChangeLog4
-rw-r--r--testsuite/systemtap.base/cache.exp2
6 files changed, 43 insertions, 12 deletions
diff --git a/ChangeLog b/ChangeLog
index 530ed851..930d081d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
diff --git a/NEWS b/NEWS
index 21d15998..19efd252 100644
--- a/NEWS
+++ b/NEWS
@@ -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
diff --git a/cache.cxx b/cache.cxx
index 247bb96b..b17c7af6 100644
--- a/cache.cxx
+++ b/cache.cxx
@@ -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
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);
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}
}