summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosh Stone <jistone@redhat.com>2009-08-14 17:56:46 -0700
committerJosh Stone <jistone@redhat.com>2009-08-14 18:05:47 -0700
commitc95eddf7e5ef5b2c8f9f804eeb34a7663ccdb0a3 (patch)
tree930beb098d58264f21b1268b65dec981f7094ab7
parent671ceda847955e31bc3ab310eb180fdc687a2ca8 (diff)
downloadsystemtap-steved-c95eddf7e5ef5b2c8f9f804eeb34a7663ccdb0a3.tar.gz
systemtap-steved-c95eddf7e5ef5b2c8f9f804eeb34a7663ccdb0a3.tar.xz
systemtap-steved-c95eddf7e5ef5b2c8f9f804eeb34a7663ccdb0a3.zip
Cache failed tracepoint headers too
Rather than re-attempting a tracepoint header that fails to compile, we now save an empty file into the cache to indicate "nothing to see here." See also PR10424. * tapsets.cxx (tracepoint_builder::get_tracequery_module): Use /dev/null as the empty result file if make_tracequery fails. (tracepoint_builder::init_dw): Ignore empty tracequery modules.
-rw-r--r--tapsets.cxx10
1 files changed, 8 insertions, 2 deletions
diff --git a/tapsets.cxx b/tapsets.cxx
index a88cda79..d350715c 100644
--- a/tapsets.cxx
+++ b/tapsets.cxx
@@ -6005,6 +6005,9 @@ string
tracepoint_builder::get_tracequery_module(systemtap_session& s,
const string& header)
{
+ if (s.verbose > 2)
+ clog << "Pass 2: getting a tracequery for " << header << endl;
+
string tracequery_path;
if (s.use_cache)
{
@@ -6033,7 +6036,7 @@ tracepoint_builder::get_tracequery_module(systemtap_session& s,
int rc = make_tracequery(s, tracequery_ko, short_header,
tracepoint_extra_headers());
if (rc != 0)
- return "";
+ tracequery_ko = "/dev/null";
if (s.use_cache)
{
@@ -6082,7 +6085,10 @@ tracepoint_builder::init_dw(systemtap_session& s)
continue;
string tracequery_path = get_tracequery_module(s, header);
- if (!tracequery_path.empty())
+
+ /* NB: An empty tracequery means that the
+ * header didn't even compile correctly. */
+ if (get_file_size(tracequery_path))
tracequery_modules.push_back(tracequery_path);
}
globfree(&trace_glob);