diff options
author | Elliott Baron <ebaron@toriamos.yyz.redhat.com> | 2008-10-10 16:33:24 -0400 |
---|---|---|
committer | Elliott Baron <ebaron@toriamos.yyz.redhat.com> | 2008-10-10 16:33:24 -0400 |
commit | 419463c9aaea3fc2860736eff0e245ae1ea64944 (patch) | |
tree | de967db4305a0c72931d48d7e812392fa76e0825 /cache.h | |
parent | 23433b34c15fbcbd90f6433c5b1dc4176f479437 (diff) | |
parent | e10599ffadb4cd177581a36feb8485028c9fbf7b (diff) | |
download | systemtap-steved-419463c9aaea3fc2860736eff0e245ae1ea64944.tar.gz systemtap-steved-419463c9aaea3fc2860736eff0e245ae1ea64944.tar.xz systemtap-steved-419463c9aaea3fc2860736eff0e245ae1ea64944.zip |
Merge branch 'master' of ssh://sources.redhat.com/git/systemtap
Diffstat (limited to 'cache.h')
-rw-r--r-- | cache.h | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -1,2 +1,19 @@ +#define SYSTEMTAP_CACHE_MAX_FILENAME "cache_mb_limit" + +struct cache_ent_info { + std::string path; + size_t size; + long weight; //lower == removed earlier +}; + +struct weight_sorter { + bool operator() (const struct cache_ent_info& c1, const struct cache_ent_info& c2) const + { return c1.weight < c2.weight;} +}; + void add_to_cache(systemtap_session& s); bool get_from_cache(systemtap_session& s); +void clean_cache(systemtap_session& s); +long get_cache_file_size(const std::string &cache_ent_path); +long get_cache_file_weight(const std::string &cache_ent_path); +void unlink_cache_entry(const std::string &cache_ent_path); |