summaryrefslogtreecommitdiffstats
path: root/hash.cxx
diff options
context:
space:
mode:
authorJosh Stone <jistone@redhat.com>2009-07-20 16:25:35 -0700
committerJosh Stone <jistone@redhat.com>2009-07-20 18:08:14 -0700
commita2639cb76e9151cad6ceebc21857d2d6aa8cbc8a (patch)
treefce5f2cb0fa8f4b6e9a76652e8659682bbcab5c3 /hash.cxx
parent1c47903b03c678470cf81c3a7d5c3ad95420d569 (diff)
downloadsystemtap-steved-a2639cb76e9151cad6ceebc21857d2d6aa8cbc8a.tar.gz
systemtap-steved-a2639cb76e9151cad6ceebc21857d2d6aa8cbc8a.tar.xz
systemtap-steved-a2639cb76e9151cad6ceebc21857d2d6aa8cbc8a.zip
Return hash module values directly as strings
* session.h (systemtap_session): remove tracequery_path * hash.cxx (find_tracequery_hash, find_typequery_hash): return strings * tapsets.cxx (dwarf_cast_expanding_visitor::filter_special_modules): get the hashed path from the return value instead of a parameter (tracepoint_builder::init_dw): ditto, and don't stuff it in session
Diffstat (limited to 'hash.cxx')
-rw-r--r--hash.cxx14
1 files changed, 7 insertions, 7 deletions
diff --git a/hash.cxx b/hash.cxx
index 45ae05eb..e550be76 100644
--- a/hash.cxx
+++ b/hash.cxx
@@ -256,7 +256,7 @@ find_hash (systemtap_session& s, const string& script)
}
-void
+string
find_tracequery_hash (systemtap_session& s)
{
hash h;
@@ -268,14 +268,14 @@ find_tracequery_hash (systemtap_session& s)
string result, hashdir;
h.result(result);
if (!create_hashdir(s, result, hashdir))
- return;
+ return "";
- s.tracequery_path = hashdir + "/tracequery_" + result + ".ko";
+ return hashdir + "/tracequery_" + result + ".ko";
}
-void
-find_typequery_hash (systemtap_session& s, const string& name, string& module)
+string
+find_typequery_hash (systemtap_session& s, const string& name)
{
hash h;
get_base_hash(s, h);
@@ -287,9 +287,9 @@ find_typequery_hash (systemtap_session& s, const string& name, string& module)
string result, hashdir;
h.result(result);
if (!create_hashdir(s, result, hashdir))
- return;
+ return "";
- module = hashdir + "/typequery_" + result
+ return hashdir + "/typequery_" + result
+ (name[0] == 'k' ? ".ko" : ".so");
}