< prev index next >

src/hotspot/share/code/stubs.cpp


*** 115,125 **** } Stub* StubQueue::request(int requested_code_size) { assert(requested_code_size > 0, "requested_code_size must be > 0"); ! if (_mutex != NULL) _mutex->lock(); Stub* s = current_stub(); int requested_size = align_up(stub_code_size_to_size(requested_code_size), CodeEntryAlignment); if (requested_size <= available_space()) { if (is_contiguous()) { // Queue: |...|XXXXXXX|.............| --- 115,125 ---- } Stub* StubQueue::request(int requested_code_size) { assert(requested_code_size > 0, "requested_code_size must be > 0"); ! if (_mutex != NULL) _mutex->lock_without_safepoint_check(); Stub* s = current_stub(); int requested_size = align_up(stub_code_size_to_size(requested_code_size), CodeEntryAlignment); if (requested_size <= available_space()) { if (is_contiguous()) { // Queue: |...|XXXXXXX|.............| ***************
*** 205,215 **** void StubQueue::verify() { // verify only if initialized if (_stub_buffer == NULL) return; ! MutexLockerEx lock(_mutex); // verify index boundaries guarantee(0 <= _buffer_size, "buffer size must be positive"); guarantee(0 <= _buffer_limit && _buffer_limit <= _buffer_size , "_buffer_limit out of bounds"); 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"); --- 205,215 ---- void StubQueue::verify() { // verify only if initialized if (_stub_buffer == NULL) return; ! MutexLockerEx lock(_mutex, Mutex::_no_safepoint_check_flag); // verify index boundaries guarantee(0 <= _buffer_size, "buffer size must be positive"); guarantee(0 <= _buffer_limit && _buffer_limit <= _buffer_size , "_buffer_limit out of bounds"); 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"); ***************
*** 232,242 **** guarantee(_queue_begin != _queue_end || n == 0, "buffer indices must be the same"); } void StubQueue::print() { ! MutexLockerEx lock(_mutex); for (Stub* s = first(); s != NULL; s = next(s)) { stub_print(s); } } - --- 232,241 ---- guarantee(_queue_begin != _queue_end || n == 0, "buffer indices must be the same"); } void StubQueue::print() { ! MutexLockerEx lock(_mutex, Mutex::_no_safepoint_check_flag); for (Stub* s = first(); s != NULL; s = next(s)) { stub_print(s); } }
< prev index next >