diff options
author | Josh Stone <jistone@redhat.com> | 2009-03-20 16:35:06 -0700 |
---|---|---|
committer | Josh Stone <jistone@redhat.com> | 2009-03-20 16:42:04 -0700 |
commit | b278033a7e4632a414502b63ba51fcce36f44f94 (patch) | |
tree | cfb00de74d5af2138837a8c96f1814aaa11ae8b4 /hash.cxx | |
parent | a1c66a0f3d8795fbcf49ce936dee3c5645f0bfa6 (diff) | |
download | systemtap-steved-b278033a7e4632a414502b63ba51fcce36f44f94.tar.gz systemtap-steved-b278033a7e4632a414502b63ba51fcce36f44f94.tar.xz systemtap-steved-b278033a7e4632a414502b63ba51fcce36f44f94.zip |
Cache the tracepoint query results
To use tracepoints, we build a "tracequery" module that compiles
debuginfo for all available tracepoints in the user's kernel. That's a
bit of a cumbersome step to do during pass-2 though. This change adds
tracequery caching so we only need to compile it once.
Diffstat (limited to 'hash.cxx')
-rw-r--r-- | hash.cxx | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -237,4 +237,22 @@ find_hash (systemtap_session& s, const string& script) find_script_hash(s, script, base); } + +void +find_tracequery_hash (systemtap_session& s) +{ + hash h; + get_base_hash(s, h); + + // The basic hash should be good enough for the tracepoint query module + + // Get the directory path to store our cached module + string result, hashdir; + h.result(result); + if (!create_hashdir(s, result, hashdir)) + return; + + s.tracequery_path = hashdir + "/tracequery_" + result + ".ko"; +} + /* vim: set sw=2 ts=8 cino=>4,n-2,{2,^-2,t0,(0,u0,w1,M1 : */ |