Mercurial > hg > graal-compiler
diff src/share/vm/code/codeCache.hpp @ 10114:a7fb14888912
8006952: Slow VM due to excessive code cache freelist iteration
Summary: Remove continous free block requirement
Reviewed-by: kvn
author | neliasso |
---|---|
date | Thu, 11 Apr 2013 13:57:44 +0200 |
parents | 3c786355ffb4 |
children | 0cfa93c2fcc4 |
line wrap: on
line diff
--- a/src/share/vm/code/codeCache.hpp Tue Apr 16 10:04:01 2013 -0700 +++ b/src/share/vm/code/codeCache.hpp Thu Apr 11 13:57:44 2013 +0200 @@ -70,7 +70,7 @@ static void initialize(); // Allocation/administration - static CodeBlob* allocate(int size); // allocates a new CodeBlob + static CodeBlob* allocate(int size, bool is_critical = false); // allocates a new CodeBlob static void commit(CodeBlob* cb); // called when the allocated CodeBlob has been filled static int alignment_unit(); // guaranteed alignment of all CodeBlobs static int alignment_offset(); // guaranteed offset of first CodeBlob byte within alignment unit (i.e., allocation header) @@ -156,19 +156,13 @@ static address low_bound() { return (address) _heap->low_boundary(); } static address high_bound() { return (address) _heap->high_boundary(); } - static bool has_space(int size) { - // Always leave some room in the CodeCache for I2C/C2I adapters - return largest_free_block() > (CodeCacheMinimumFreeSpace + size); - } - // Profiling static address first_address(); // first address used for CodeBlobs static address last_address(); // last address used for CodeBlobs static size_t capacity() { return _heap->capacity(); } static size_t max_capacity() { return _heap->max_capacity(); } static size_t unallocated_capacity() { return _heap->unallocated_capacity(); } - static size_t largest_free_block(); - static bool needs_flushing() { return largest_free_block() < CodeCacheFlushingMinimumFreeSpace; } + static bool needs_flushing() { return unallocated_capacity() < CodeCacheFlushingMinimumFreeSpace; } static bool needs_cache_clean() { return _needs_cache_clean; } static void set_needs_cache_clean(bool v) { _needs_cache_clean = v; }