summaryrefslogtreecommitdiffstats
path: root/buildrun.cxx
diff options
context:
space:
mode:
authorJosh Stone <jistone@redhat.com>2009-09-28 17:36:04 -0700
committerJosh Stone <jistone@redhat.com>2009-09-28 17:36:04 -0700
commit55e50c24c9176f1b3d15af94e145456a68e7ecf6 (patch)
tree4845578ce0a05487078ba81c126797cb26ef035f /buildrun.cxx
parent5f8ca04fbb0682ff8647b4df5de68cd1042e312d (diff)
downloadsystemtap-steved-55e50c24c9176f1b3d15af94e145456a68e7ecf6.tar.gz
systemtap-steved-55e50c24c9176f1b3d15af94e145456a68e7ecf6.tar.xz
systemtap-steved-55e50c24c9176f1b3d15af94e145456a68e7ecf6.zip
Try to build tracequery for all headers at once
To mitigate PR10424, we switched to building a separate tracequery module for each tracepoint header, so a bad header wouldn't break all of the others. However, with recent kernels that leads to ~18 make commands, which adds up quickly in time. It's cached, so that's not too bad, but as a developer who rebuilds stap frequently, it gets annoying. If we're going to call 18 makes, it's worth it to start with one bigger make that covers all the headers at once (like we used to). If that one fails, we can still fall back to compiling individually. FWIW, the failing ext4.h header was only created in 2.6.31, and was fixed before 2.6.32, so the specific failure in PR10424 has a fairly small window. * buildrun.cxx (make_tracequery): Just take a single vector of headers. * hash.cxx (find_tracequery_hash): Deal with multiple headers. * tapsets.cxx (tracepoint_builder::get_tracequery_module): Ditto. (tracepoint_builder::init_dw): Attempt all system headers together, and if that fails, try again individually.
Diffstat (limited to 'buildrun.cxx')
-rw-r--r--buildrun.cxx13
1 files changed, 4 insertions, 9 deletions
diff --git a/buildrun.cxx b/buildrun.cxx
index cebe3b8e..86940643 100644
--- a/buildrun.cxx
+++ b/buildrun.cxx
@@ -374,8 +374,7 @@ run_pass (systemtap_session& s)
// Build a tiny kernel module to query tracepoints
int
make_tracequery(systemtap_session& s, string& name,
- const std::string& header,
- const vector<string>& extra_headers)
+ const vector<string>& headers)
{
static unsigned tick = 0;
string basename("tracequery_kmod_" + lex_cast(++tick));
@@ -415,13 +414,9 @@ make_tracequery(systemtap_session& s, string& name,
osrc << "#define DEFINE_TRACE(name, proto, args) \\" << endl;
osrc << " DECLARE_TRACE(name, TPPROTO(proto), TPARGS(args))" << endl;
- // PR9993: Add extra headers to work around undeclared types in individual
- // include/trace/foo.h files
- for (unsigned z=0; z<extra_headers.size(); z++)
- osrc << "#include <" << extra_headers[z] << ">\n";
-
- // add the requested tracepoint header
- osrc << "#include <" << header << ">" << endl;
+ // add the specified headers
+ for (unsigned z=0; z<headers.size(); z++)
+ osrc << "#include <" << headers[z] << ">\n";
// finish up the module source
osrc << "#endif /* CONFIG_TRACEPOINTS */" << endl;