mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-23 12:34:32 +02:00
8023014: CodeSweeperSweepNoFlushTest.java fails with HS crash
Ensure ensure correct initialization of compiler runtime Reviewed-by: kvn, twisti
This commit is contained in:
parent
7f46feeee2
commit
aef0d74e96
18 changed files with 386 additions and 265 deletions
|
@ -245,8 +245,8 @@ BufferBlob* BufferBlob::create(const char* name, CodeBuffer* cb) {
|
|||
}
|
||||
|
||||
|
||||
void* BufferBlob::operator new(size_t s, unsigned size) throw() {
|
||||
void* p = CodeCache::allocate(size);
|
||||
void* BufferBlob::operator new(size_t s, unsigned size, bool is_critical) throw() {
|
||||
void* p = CodeCache::allocate(size, is_critical);
|
||||
return p;
|
||||
}
|
||||
|
||||
|
@ -277,7 +277,10 @@ AdapterBlob* AdapterBlob::create(CodeBuffer* cb) {
|
|||
unsigned int size = allocation_size(cb, sizeof(AdapterBlob));
|
||||
{
|
||||
MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag);
|
||||
blob = new (size) AdapterBlob(size, cb);
|
||||
// The parameter 'true' indicates a critical memory allocation.
|
||||
// This means that CodeCacheMinimumFreeSpace is used, if necessary
|
||||
const bool is_critical = true;
|
||||
blob = new (size, is_critical) AdapterBlob(size, cb);
|
||||
}
|
||||
// Track memory usage statistic after releasing CodeCache_lock
|
||||
MemoryService::track_code_cache_memory_usage();
|
||||
|
@ -299,7 +302,10 @@ MethodHandlesAdapterBlob* MethodHandlesAdapterBlob::create(int buffer_size) {
|
|||
size += round_to(buffer_size, oopSize);
|
||||
{
|
||||
MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag);
|
||||
blob = new (size) MethodHandlesAdapterBlob(size);
|
||||
// The parameter 'true' indicates a critical memory allocation.
|
||||
// This means that CodeCacheMinimumFreeSpace is used, if necessary
|
||||
const bool is_critical = true;
|
||||
blob = new (size, is_critical) MethodHandlesAdapterBlob(size);
|
||||
}
|
||||
// Track memory usage statistic after releasing CodeCache_lock
|
||||
MemoryService::track_code_cache_memory_usage();
|
||||
|
|
|
@ -209,7 +209,7 @@ class BufferBlob: public CodeBlob {
|
|||
BufferBlob(const char* name, int size);
|
||||
BufferBlob(const char* name, int size, CodeBuffer* cb);
|
||||
|
||||
void* operator new(size_t s, unsigned size) throw();
|
||||
void* operator new(size_t s, unsigned size, bool is_critical = false) throw();
|
||||
|
||||
public:
|
||||
// Creation
|
||||
|
@ -253,7 +253,6 @@ public:
|
|||
class MethodHandlesAdapterBlob: public BufferBlob {
|
||||
private:
|
||||
MethodHandlesAdapterBlob(int size) : BufferBlob("MethodHandles adapters", size) {}
|
||||
MethodHandlesAdapterBlob(int size, CodeBuffer* cb) : BufferBlob("MethodHandles adapters", size, cb) {}
|
||||
|
||||
public:
|
||||
// Creation
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue