summaryrefslogtreecommitdiffstats
path: root/hash.cxx
diff options
context:
space:
mode:
authorJosh Stone <jistone@redhat.com>2009-04-20 17:25:35 -0700
committerJosh Stone <jistone@redhat.com>2009-04-20 17:25:35 -0700
commitb68b2088c1b6e4c0eb4f18c161d3273fed33a385 (patch)
treec669748c25ce6a5a8942c4edbb53a04b0ebf95b5 /hash.cxx
parent436e5bf634020bcb9f98967891508db21f9e6cbd (diff)
parent219b3700b8603b6fe3610d6f06e353f3c041ee0b (diff)
downloadsystemtap-steved-b68b2088c1b6e4c0eb4f18c161d3273fed33a385.tar.gz
systemtap-steved-b68b2088c1b6e4c0eb4f18c161d3273fed33a385.tar.xz
systemtap-steved-b68b2088c1b6e4c0eb4f18c161d3273fed33a385.zip
Merge branch 'cast_header'
Diffstat (limited to 'hash.cxx')
-rw-r--r--hash.cxx20
1 files changed, 20 insertions, 0 deletions
diff --git a/hash.cxx b/hash.cxx
index 01013c43..45ae05eb 100644
--- a/hash.cxx
+++ b/hash.cxx
@@ -273,4 +273,24 @@ find_tracequery_hash (systemtap_session& s)
s.tracequery_path = hashdir + "/tracequery_" + result + ".ko";
}
+
+void
+find_typequery_hash (systemtap_session& s, const string& name, string& module)
+{
+ hash h;
+ get_base_hash(s, h);
+
+ // Add the typequery name to distinguish the hash
+ h.add(name);
+
+ // Get the directory path to store our cached module
+ string result, hashdir;
+ h.result(result);
+ if (!create_hashdir(s, result, hashdir))
+ return;
+
+ module = hashdir + "/typequery_" + result
+ + (name[0] == 'k' ? ".ko" : ".so");
+}
+
/* vim: set sw=2 ts=8 cino=>4,n-2,{2,^-2,t0,(0,u0,w1,M1 : */