< 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,195 **** 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()) { // Sampling disabled return; } if (!_allocated_outside_tlab && _allocated_tlab_size == 0 && !_tlab_end_reset_for_sample) { --- 185,195 ---- 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 (!JvmtiExport::should_post_sampled_object_alloc()) { // Sampling disabled return; } if (!_allocated_outside_tlab && _allocated_tlab_size == 0 && !_tlab_end_reset_for_sample) {
*** 291,301 **** HeapWord* MemAllocator::allocate_inside_tlab_slow(Allocation& allocation) const { HeapWord* mem = NULL; ThreadLocalAllocBuffer& tlab = _thread->tlab(); ! if (ThreadHeapSampler::enabled()) { // 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) { --- 291,301 ---- HeapWord* MemAllocator::allocate_inside_tlab_slow(Allocation& allocation) const { HeapWord* mem = NULL; ThreadLocalAllocBuffer& tlab = _thread->tlab(); ! 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 >