< prev index next >
src/hotspot/share/gc/shared/collectedHeap.inline.hpp
Print this page
rev 48551 : [mq]: heap8
rev 48559 : [mq]: heap20
rev 48562 : [mq]: heap23
rev 48563 : [mq]: heap_to_thread
rev 48564 : [mq]: update-spec
rev 48565 : [mq]: event
*** 31,40 ****
--- 31,41 ----
#include "gc/shared/threadLocalAllocBuffer.inline.hpp"
#include "memory/universe.hpp"
#include "oops/arrayOop.hpp"
#include "oops/oop.inline.hpp"
#include "prims/jvmtiExport.hpp"
+ #include "runtime/heapMonitoring.hpp"
#include "runtime/sharedRuntime.hpp"
#include "runtime/thread.inline.hpp"
#include "services/lowMemoryDetector.hpp"
#include "utilities/align.hpp"
#include "utilities/copy.hpp"
*** 152,165 ****
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;
}
if (!gc_overhead_limit_was_exceeded) {
--- 153,170 ----
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");
! int size_in_bytes = size * HeapWordSize;
! THREAD->incr_allocated_bytes(size_in_bytes);
! AllocTracer::send_allocation_outside_tlab(klass, result, size_in_bytes, THREAD);
+ if (HeapMonitoring::enabled()) {
+ THREAD->heap_sampler().check_for_sampling(result, size_in_bytes);
+ }
return result;
}
if (!gc_overhead_limit_was_exceeded) {
< prev index next >