< prev index next >
src/hotspot/share/gc/shared/memAllocator.cpp
Print this page
rev 52050 : 8211980: Remove ThreadHeapSampler enable/disable/enabled methods
Summary:
Reviewed-by:
@@ -185,11 +185,11 @@
void MemAllocator::Allocation::notify_allocation_jvmti_sampler() {
// support for JVMTI VMObjectAlloc event (no-op if not enabled)
JvmtiExport::vm_object_alloc_event_collector(obj());
- if (!ThreadHeapSampler::enabled()) {
+ if (!JvmtiExport::should_post_sampled_object_alloc()) {
// Sampling disabled
return;
}
if (!_allocated_outside_tlab && _allocated_tlab_size == 0 && !_tlab_end_reset_for_sample) {
@@ -291,11 +291,11 @@
HeapWord* MemAllocator::allocate_inside_tlab_slow(Allocation& allocation) const {
HeapWord* mem = NULL;
ThreadLocalAllocBuffer& tlab = _thread->tlab();
- if (ThreadHeapSampler::enabled()) {
+ if (JvmtiExport::should_post_sampled_object_alloc()) {
// Try to allocate the sampled object from TLAB, it is possible a sample
// point was put and the TLAB still has space.
tlab.set_back_allocation_end();
mem = tlab.allocate(_word_size);
if (mem != NULL) {
< prev index next >