From d105f6642677bd9ef1b20d1ba180ba0163cb0fa6 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Tue, 2 Mar 2010 15:57:58 -0800 Subject: PR11246 cont'd: Add options for cache control --disable-cache : turn off all caching --clean-cache : clean up stale entries and then quit --poison-cache : force regeneration of items that would have hit the cache These are undocumented for now, until we decide whether they are generally useful. * main.cxx (main): Parse the new options. * session.h (systemtap_session): Add poison_cache; document the others. * clean.cxx (clean_cache): No longer static. (get_stapconf_from_cache, get_script_from_cache): Respect poison. * tapsets.cxx (tracepoint_builder::get_tracequery_module): Ditto. (dwarf_cast_expanding_visitor::filter_special_modules): Ditto. --- tapsets.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tapsets.cxx') diff --git a/tapsets.cxx b/tapsets.cxx index 1ffbcec8..90dedbe9 100644 --- a/tapsets.cxx +++ b/tapsets.cxx @@ -2773,7 +2773,7 @@ void dwarf_cast_expanding_visitor::filter_special_modules(string& module) { // see if the cached module exists cached_module = find_typequery_hash(s, module); - if (!cached_module.empty()) + if (!cached_module.empty() && !s.poison_cache) { int fd = open(cached_module.c_str(), O_RDONLY); if (fd != -1) @@ -6539,7 +6539,7 @@ tracepoint_builder::get_tracequery_module(systemtap_session& s, { // see if the cached module exists tracequery_path = find_tracequery_hash(s, headers); - if (!tracequery_path.empty()) + if (!tracequery_path.empty() && !s.poison_cache) { int fd = open(tracequery_path.c_str(), O_RDONLY); if (fd != -1) -- cgit