8204554: JFR TLAB tracing broken after 8202776
Reviewed-by: rkennke, stefank
This commit is contained in:
parent
e9f3b0e527
commit
ff7db9b11a
@ -373,7 +373,8 @@ HeapWord* CollectedHeap::obj_allocate_raw(Klass* klass, size_t size,
|
||||
return result;
|
||||
}
|
||||
}
|
||||
return Universe::heap()->mem_allocate(size, gc_overhead_limit_was_exceeded);
|
||||
|
||||
return allocate_outside_tlab(klass, size, gc_overhead_limit_was_exceeded, THREAD);
|
||||
}
|
||||
|
||||
HeapWord* CollectedHeap::allocate_from_tlab_slow(Klass* klass, size_t size, TRAPS) {
|
||||
|
@ -144,6 +144,9 @@ class CollectedHeap : public CHeapObj<mtInternal> {
|
||||
inline static HeapWord* allocate_from_tlab(Klass* klass, size_t size, TRAPS);
|
||||
static HeapWord* allocate_from_tlab_slow(Klass* klass, size_t size, TRAPS);
|
||||
|
||||
inline static HeapWord* allocate_outside_tlab(Klass* klass, size_t size,
|
||||
bool* gc_overhead_limit_was_exceeded, TRAPS);
|
||||
|
||||
// Raw memory allocation facilities
|
||||
// The obj and array allocate methods are covers for these methods.
|
||||
// mem_allocate() should never be
|
||||
|
@ -142,14 +142,6 @@ HeapWord* CollectedHeap::common_mem_allocate_noinit(Klass* klass, size_t size, T
|
||||
HeapWord* result = heap->obj_allocate_raw(klass, size, &gc_overhead_limit_was_exceeded, THREAD);
|
||||
|
||||
if (result != NULL) {
|
||||
NOT_PRODUCT(Universe::heap()->
|
||||
check_for_non_bad_heap_word_value(result, size));
|
||||
assert(!HAS_PENDING_EXCEPTION,
|
||||
"Unexpected exception, will result in uninitialized storage");
|
||||
THREAD->incr_allocated_bytes(size * HeapWordSize);
|
||||
|
||||
AllocTracer::send_allocation_outside_tlab(klass, result, size * HeapWordSize, THREAD);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -198,6 +190,22 @@ HeapWord* CollectedHeap::allocate_from_tlab(Klass* klass, size_t size, TRAPS) {
|
||||
return obj;
|
||||
}
|
||||
|
||||
HeapWord* CollectedHeap::allocate_outside_tlab(Klass* klass, size_t size,
|
||||
bool* gc_overhead_limit_was_exceeded, TRAPS) {
|
||||
HeapWord* result = Universe::heap()->mem_allocate(size, gc_overhead_limit_was_exceeded);
|
||||
if (result == NULL) {
|
||||
return result;
|
||||
}
|
||||
|
||||
NOT_PRODUCT(Universe::heap()->check_for_non_bad_heap_word_value(result, size));
|
||||
assert(!HAS_PENDING_EXCEPTION,
|
||||
"Unexpected exception, will result in uninitialized storage");
|
||||
THREAD->incr_allocated_bytes(size * HeapWordSize);
|
||||
|
||||
AllocTracer::send_allocation_outside_tlab(klass, result, size * HeapWordSize, THREAD);
|
||||
return result;
|
||||
}
|
||||
|
||||
void CollectedHeap::init_obj(HeapWord* obj, size_t size) {
|
||||
assert(obj != NULL, "cannot initialize NULL object");
|
||||
const size_t hs = oopDesc::header_size();
|
||||
|
Loading…
Reference in New Issue
Block a user