8314220: Configurable InlineCacheBuffer size
Reviewed-by: dlong, kvn
This commit is contained in:
parent
12723688ca
commit
a40d8d97e8
@ -141,7 +141,7 @@ void ICStub::print() {
|
||||
|
||||
void InlineCacheBuffer::initialize() {
|
||||
if (_buffer != nullptr) return; // already initialized
|
||||
_buffer = new StubQueue(new ICStubInterface, 10*K, InlineCacheBuffer_lock, "InlineCacheBuffer");
|
||||
_buffer = new StubQueue(new ICStubInterface, checked_cast<int>(InlineCacheBufferSize), InlineCacheBuffer_lock, "InlineCacheBuffer");
|
||||
assert (_buffer != nullptr, "cannot allocate InlineCacheBuffer");
|
||||
}
|
||||
|
||||
|
@ -218,8 +218,6 @@ void StubQueue::verify() {
|
||||
guarantee(0 <= _queue_begin && _queue_begin < _buffer_limit, "_queue_begin out of bounds");
|
||||
guarantee(0 <= _queue_end && _queue_end <= _buffer_limit, "_queue_end out of bounds");
|
||||
// verify alignment
|
||||
guarantee(_buffer_size % stub_alignment() == 0, "_buffer_size not aligned");
|
||||
guarantee(_buffer_limit % stub_alignment() == 0, "_buffer_limit not aligned");
|
||||
guarantee(_queue_begin % stub_alignment() == 0, "_queue_begin not aligned");
|
||||
guarantee(_queue_end % stub_alignment() == 0, "_queue_end not aligned");
|
||||
// verify buffer limit/size relationship
|
||||
|
@ -498,6 +498,11 @@ bool CompilerConfig::check_args_consistency(bool status) {
|
||||
"Invalid NonNMethodCodeHeapSize=%dK. Must be at least %uK.\n", NonNMethodCodeHeapSize/K,
|
||||
min_code_cache_size/K);
|
||||
status = false;
|
||||
} else if (InlineCacheBufferSize > NonNMethodCodeHeapSize / 2) {
|
||||
jio_fprintf(defaultStream::error_stream(),
|
||||
"Invalid InlineCacheBufferSize=" SIZE_FORMAT "K. Must be less than or equal to " SIZE_FORMAT "K.\n",
|
||||
InlineCacheBufferSize/K, NonNMethodCodeHeapSize/2/K);
|
||||
status = false;
|
||||
}
|
||||
|
||||
#ifdef _LP64
|
||||
|
@ -295,6 +295,9 @@ const int ObjectAlignmentInBytes = 8;
|
||||
product(bool, UseInlineCaches, true, \
|
||||
"Use Inline Caches for virtual calls ") \
|
||||
\
|
||||
product(size_t, InlineCacheBufferSize, 10*K, EXPERIMENTAL, \
|
||||
"InlineCacheBuffer size") \
|
||||
\
|
||||
product(bool, InlineArrayCopy, true, DIAGNOSTIC, \
|
||||
"Inline arraycopy native that is known to be part of " \
|
||||
"base library DLL") \
|
||||
|
Loading…
Reference in New Issue
Block a user