8015774: Add support for multiple code heaps

Support for segmentation of the code cache. Separate code heaps are created and used to store code of different types.

Reviewed-by: kvn, iveresov, roland, anoll, egahlin, sla
This commit is contained in:
Tobias Hartmann 2014-09-17 08:00:07 +02:00
parent b2620f89c3
commit cd01de591a
51 changed files with 1756 additions and 680 deletions

View file

@ -229,14 +229,11 @@ BufferBlob* BufferBlob::create(const char* name, CodeBuffer* cb) {
return blob;
}
void* BufferBlob::operator new(size_t s, unsigned size, bool is_critical) throw() {
void* p = CodeCache::allocate(size, is_critical);
return p;
return CodeCache::allocate(size, CodeBlobType::NonMethod, is_critical);
}
void BufferBlob::free( BufferBlob *blob ) {
void BufferBlob::free(BufferBlob *blob) {
ThreadInVMfromUnknown __tiv; // get to VM state in case we block on CodeCache_lock
blob->flush();
{
@ -299,7 +296,6 @@ MethodHandlesAdapterBlob* MethodHandlesAdapterBlob::create(int buffer_size) {
return blob;
}
//----------------------------------------------------------------------------------------------------
// Implementation of RuntimeStub
@ -340,14 +336,14 @@ RuntimeStub* RuntimeStub::new_runtime_stub(const char* stub_name,
void* RuntimeStub::operator new(size_t s, unsigned size) throw() {
void* p = CodeCache::allocate(size, true);
void* p = CodeCache::allocate(size, CodeBlobType::NonMethod, true);
if (!p) fatal("Initial size of CodeCache is too small");
return p;
}
// operator new shared by all singletons:
void* SingletonBlob::operator new(size_t s, unsigned size) throw() {
void* p = CodeCache::allocate(size, true);
void* p = CodeCache::allocate(size, CodeBlobType::NonMethod, true);
if (!p) fatal("Initial size of CodeCache is too small");
return p;
}