diff options
author | Frank Ch. Eigler <fche@elastic.org> | 2009-03-20 19:26:58 -0400 |
---|---|---|
committer | Frank Ch. Eigler <fche@elastic.org> | 2009-03-20 19:26:58 -0400 |
commit | a1c66a0f3d8795fbcf49ce936dee3c5645f0bfa6 (patch) | |
tree | d714d871a0410cdb6090eb29c8503bc0883bce60 /buildrun.cxx | |
parent | 11dc6a07aa2aa1c7da1738c20cbc5c19f878374b (diff) | |
download | systemtap-steved-a1c66a0f3d8795fbcf49ce936dee3c5645f0bfa6.tar.gz systemtap-steved-a1c66a0f3d8795fbcf49ce936dee3c5645f0bfa6.tar.xz systemtap-steved-a1c66a0f3d8795fbcf49ce936dee3c5645f0bfa6.zip |
support tracepoint extraction for kernel build trees built with O=/path
* buildrun.cxx (make_tracequery): Also search source/include/trace/*.h.
Diffstat (limited to 'buildrun.cxx')
-rw-r--r-- | buildrun.cxx | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/buildrun.cxx b/buildrun.cxx index e3634545..6a266bd2 100644 --- a/buildrun.cxx +++ b/buildrun.cxx @@ -384,21 +384,25 @@ make_tracequery(systemtap_session& s, string& name) // dynamically pull in all tracepoint headers from include/trace/ glob_t trace_glob; - string glob_str(s.kernel_build_tree + "/include/trace/*.h"); - glob(glob_str.c_str(), 0, NULL, &trace_glob); - for (unsigned i = 0; i < trace_glob.gl_pathc; ++i) + string globs[2] = { "/include/trace/*.h", "/source/include/trace/*.h" }; + for (unsigned z=0; z<2; z++) { - string header(basename(trace_glob.gl_pathv[i])); - - // filter out a few known "internal-only" headers - if (header == "trace_events.h") - continue; - if (header.find("_event_types.h") != string::npos) - continue; - - osrc << "#include <trace/" << header << ">" << endl; + string glob_str(s.kernel_build_tree + globs[z]); + glob(glob_str.c_str(), 0, NULL, &trace_glob); + for (unsigned i = 0; i < trace_glob.gl_pathc; ++i) + { + string header(basename(trace_glob.gl_pathv[i])); + + // filter out a few known "internal-only" headers + if (header == "trace_events.h") + continue; + if (header.find("_event_types.h") != string::npos) + continue; + + osrc << "#include <trace/" << header << ">" << endl; + } + globfree(&trace_glob); } - globfree(&trace_glob); // finish up the module source osrc << "#endif /* CONFIG_TRACEPOINTS */" << endl; |