From de0db58a72f197e4dff867f9040bfff982035b6f Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Sat, 7 Feb 2009 15:42:56 -0800 Subject: Clean up the autoconf caching This makes the stapconf caching process quite a bit more transparent. The options are now cached in a header file as #defines, and this header file is a normal build dependency instead of calling so many make $(shell ...) commands. * buildrun.cxx (compile_pass): Pull in autoconf options in a header of #defines rather than -DXXX, and make that header a build dependency. * buildrun.cxx (output_autoconf): New function to consolidate the computation of each autoconf test. * cache.cxx (add_to_cache, get_from_cache, clean_cache): Start treating the stapconf header as a first-class cached item. * cache.h: Move definitions of things only needed in cache.cxx * hash.cxx (find_stapconf_hash): Generate stapconf_name as a .h now. * main.cxx (main): Default the stapconf_name based on getpid(). --- cache.h | 18 ------------------ 1 file changed, 18 deletions(-) (limited to 'cache.h') diff --git a/cache.h b/cache.h index 1a9827b7..89f44a43 100644 --- a/cache.h +++ b/cache.h @@ -1,22 +1,4 @@ -#define SYSTEMTAP_CACHE_MAX_FILENAME "cache_mb_limit" -#define SYSTEMTAP_CACHE_DEFAULT_MB 64 - -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); /* vim: set sw=2 ts=8 cino=>4,n-2,{2,^-2,t0,(0,u0,w1,M1 : */ -- cgit