From 4569f6bb769482d732f72fb1208522d51f4e36f4 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Tue, 1 Sep 2009 09:38:12 -0700 Subject: PR10581: Use ARCH for tracepoints and kernel typequeries These are kernel modules that we generate for querying debuginfo, so they need to use the same ARCH settings that we put in the main script module. * buildrun.cxx (make_tracequery, make_typequery_kmod): Add the arch and kbuild flags to make_cmd. * hash.cxx (find_stapconf_hash, find_tracequery_hash, find_typequery_hash): The arch is in the base hash already, but add the kbuild flags too. --- hash.cxx | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'hash.cxx') diff --git a/hash.cxx b/hash.cxx index 6e798f81..105e1115 100644 --- a/hash.cxx +++ b/hash.cxx @@ -190,6 +190,7 @@ find_script_hash (systemtap_session& s, const string& script, const hash &base) for (unsigned i = 0; i < s.macros.size(); i++) h.add(s.macros[i]); + // Add any custom kbuild flags (-B) for (unsigned i = 0; i < s.kbuildflags.size(); i++) h.add(s.kbuildflags[i]); @@ -236,7 +237,9 @@ find_stapconf_hash (systemtap_session& s, const hash& base) { hash h(base); - // The basic hash should be good enough for STAPCONF variables + // Add any custom kbuild flags + for (unsigned i = 0; i < s.kbuildflags.size(); i++) + h.add(s.kbuildflags[i]); // Get the directory path to store our cached stapconf parameters string result, hashdir; @@ -268,6 +271,10 @@ find_tracequery_hash (systemtap_session& s, const string& header) // Add the tracepoint header to the computed hash h.add_file(header); + // Add any custom kbuild flags + for (unsigned i = 0; i < s.kbuildflags.size(); i++) + h.add(s.kbuildflags[i]); + // Get the directory path to store our cached module string result, hashdir; h.result(result); @@ -287,6 +294,11 @@ find_typequery_hash (systemtap_session& s, const string& name) // Add the typequery name to distinguish the hash h.add(name); + if (name[0] == 'k') + // Add any custom kbuild flags + for (unsigned i = 0; i < s.kbuildflags.size(); i++) + h.add(s.kbuildflags[i]); + // Get the directory path to store our cached module string result, hashdir; h.result(result); -- cgit