summaryrefslogtreecommitdiffstats
path: root/cache.cxx
diff options
context:
space:
mode:
authorJosh Stone <jistone@redhat.com>2009-04-20 16:58:37 -0700
committerJosh Stone <jistone@redhat.com>2009-04-20 16:58:37 -0700
commit2ca818756fff583220c238cf344add80b71f7f8c (patch)
tree9569ca7a98ab5e301b8d8952f7de7648a8b6119c /cache.cxx
parentfb0274bc9ad5b82caffa33fbd077104b0b7f3b4e (diff)
downloadsystemtap-steved-2ca818756fff583220c238cf344add80b71f7f8c.tar.gz
systemtap-steved-2ca818756fff583220c238cf344add80b71f7f8c.tar.xz
systemtap-steved-2ca818756fff583220c238cf344add80b71f7f8c.zip
Cleanup typequery user modules from the cache too
Diffstat (limited to 'cache.cxx')
-rw-r--r--cache.cxx18
1 files changed, 16 insertions, 2 deletions
diff --git a/cache.cxx b/cache.cxx
index 86f7213a..61bc243f 100644
--- a/cache.cxx
+++ b/cache.cxx
@@ -253,14 +253,28 @@ clean_cache(systemtap_session& s)
globfree(&cache_glob);
+ //grab info for each typequery user module (.so)
+ glob_str = s.cache_path + "/*/*.so";
+ glob(glob_str.c_str(), 0, NULL, &cache_glob);
+ for (unsigned int i = 0; i < cache_glob.gl_pathc; i++)
+ {
+ string cache_ent_path = cache_glob.gl_pathv[i];
+ struct cache_ent_info cur_info(cache_ent_path, false);
+ if (cur_info.size != 0 && cur_info.weight != 0)
+ {
+ cache_size_b += cur_info.size;
+ cache_contents.insert(cur_info);
+ }
+ }
+
+ globfree(&cache_glob);
+
//grab info for each stapconf cache entry (.h)
glob_str = s.cache_path + "/*/*.h";
glob(glob_str.c_str(), 0, NULL, &cache_glob);
for (unsigned int i = 0; i < cache_glob.gl_pathc; i++)
{
string cache_ent_path = cache_glob.gl_pathv[i];
- cache_ent_path.resize(cache_ent_path.length() - 3);
-
struct cache_ent_info cur_info(cache_ent_path, false);
if (cur_info.size != 0 && cur_info.weight != 0)
{