hotspot/src/share/vm/code/codeCache.hpp
changeset 27420 04e6f914cce1
parent 27410 dd80df7cfa2b
child 27642 8c9eff693145
equal deleted inserted replaced
27419:a934f24b4dcf 27420:04e6f914cce1
   118  public:
   118  public:
   119   // Initialization
   119   // Initialization
   120   static void initialize();
   120   static void initialize();
   121 
   121 
   122   // Allocation/administration
   122   // Allocation/administration
   123   static CodeBlob* allocate(int size, int code_blob_type, bool is_critical = false); // allocates a new CodeBlob
   123   static CodeBlob* allocate(int size, int code_blob_type); // allocates a new CodeBlob
   124   static void commit(CodeBlob* cb);                     // called when the allocated CodeBlob has been filled
   124   static void commit(CodeBlob* cb);                        // called when the allocated CodeBlob has been filled
   125   static int  alignment_unit();                         // guaranteed alignment of all CodeBlobs
   125   static int  alignment_unit();                            // guaranteed alignment of all CodeBlobs
   126   static int  alignment_offset();                       // guaranteed offset of first CodeBlob byte within alignment unit (i.e., allocation header)
   126   static int  alignment_offset();                          // guaranteed offset of first CodeBlob byte within alignment unit (i.e., allocation header)
   127   static void free(CodeBlob* cb);                       // frees a CodeBlob
   127   static void free(CodeBlob* cb);                          // frees a CodeBlob
   128   static bool contains(void *p);                        // returns whether p is included
   128   static bool contains(void *p);                           // returns whether p is included
   129   static void blobs_do(void f(CodeBlob* cb));           // iterates over all CodeBlobs
   129   static void blobs_do(void f(CodeBlob* cb));              // iterates over all CodeBlobs
   130   static void blobs_do(CodeBlobClosure* f);             // iterates over all CodeBlobs
   130   static void blobs_do(CodeBlobClosure* f);                // iterates over all CodeBlobs
   131   static void nmethods_do(void f(nmethod* nm));         // iterates over all nmethods
   131   static void nmethods_do(void f(nmethod* nm));            // iterates over all nmethods
   132   static void alive_nmethods_do(void f(nmethod* nm));   // iterates over all alive nmethods
   132   static void alive_nmethods_do(void f(nmethod* nm));      // iterates over all alive nmethods
   133 
   133 
   134   // Lookup
   134   // Lookup
   135   static CodeBlob* find_blob(void* start);              // Returns the CodeBlob containing the given address
   135   static CodeBlob* find_blob(void* start);              // Returns the CodeBlob containing the given address
   136   static CodeBlob* find_blob_unsafe(void* start);       // Same as find_blob but does not fail if looking up a zombie method
   136   static CodeBlob* find_blob_unsafe(void* start);       // Same as find_blob but does not fail if looking up a zombie method
   137   static nmethod*  find_nmethod(void* start);           // Returns the nmethod containing the given address
   137   static nmethod*  find_nmethod(void* start);           // Returns the nmethod containing the given address
   180   static size_t capacity();
   180   static size_t capacity();
   181   static size_t unallocated_capacity(int code_blob_type);
   181   static size_t unallocated_capacity(int code_blob_type);
   182   static size_t unallocated_capacity();
   182   static size_t unallocated_capacity();
   183   static size_t max_capacity();
   183   static size_t max_capacity();
   184 
   184 
   185   static bool   is_full(int* code_blob_type);
       
   186   static double reverse_free_ratio(int code_blob_type);
   185   static double reverse_free_ratio(int code_blob_type);
   187 
   186 
   188   static bool needs_cache_clean()                     { return _needs_cache_clean; }
   187   static bool needs_cache_clean()                     { return _needs_cache_clean; }
   189   static void set_needs_cache_clean(bool v)           { _needs_cache_clean = v;    }
   188   static void set_needs_cache_clean(bool v)           { _needs_cache_clean = v;    }
   190   static void clear_inline_caches();                  // clear all inline caches
   189   static void clear_inline_caches();                  // clear all inline caches