From a2639cb76e9151cad6ceebc21857d2d6aa8cbc8a Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Mon, 20 Jul 2009 16:25:35 -0700 Subject: 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 --- hash.cxx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'hash.cxx') 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"); } -- cgit