< prev index next >
src/share/vm/code/codeCache.hpp
Print this page
@@ -188,11 +188,16 @@
static bool needs_cache_clean() { return _needs_cache_clean; }
static void set_needs_cache_clean(bool v) { _needs_cache_clean = v; }
static void clear_inline_caches(); // clear all inline caches
- // Returns the CodeBlobType for nmethods of the given compilation level
+ // Returns the CodeBlobType for the given nmethod
+ static int get_code_blob_type(nmethod* nm) {
+ return get_code_heap(nm)->code_blob_type();
+ }
+
+ // Returns the CodeBlobType for the given compilation level
static int get_code_blob_type(int comp_level) {
if (comp_level == CompLevel_none ||
comp_level == CompLevel_simple ||
comp_level == CompLevel_full_optimization) {
// Non profiled methods
@@ -286,11 +291,11 @@
_code_blob = (CodeBlob*)nm;
if (!SegmentedCodeCache) {
// Iterate over all CodeBlobs
_code_blob_type = CodeBlobType::All;
} else if (nm != NULL) {
- _code_blob_type = CodeCache::get_code_blob_type(nm->comp_level());
+ _code_blob_type = CodeCache::get_code_blob_type(nm);
} else {
// Only iterate over method code heaps, starting with non-profiled
_code_blob_type = CodeBlobType::MethodNonProfiled;
}
}
< prev index next >