< prev index next >
src/hotspot/share/gc/shared/collectedHeap.inline.hpp
Print this page
rev 49521 : [mq]: heap8
rev 49523 : [mq]: heap9
rev 49524 : [mq]: heap11
@@ -152,14 +152,18 @@
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);
+ int size_in_bytes = size * HeapWordSize;
+ THREAD->incr_allocated_bytes(size_in_bytes);
- AllocTracer::send_allocation_outside_tlab(klass, result, size * HeapWordSize, THREAD);
+ AllocTracer::send_allocation_outside_tlab(klass, result, size_in_bytes, THREAD);
+ if (ThreadHeapSampler::enabled()) {
+ THREAD->heap_sampler().check_for_sampling(result, size_in_bytes);
+ }
return result;
}
if (!gc_overhead_limit_was_exceeded) {
< prev index next >