src/hotspot/share/gc/shared/memAllocator.cpp
changeset 52131 e9727e6b5fc1
parent 52077 b6eaf7b7cd7f
child 54659 62d6baca22fc
equal deleted inserted replaced
52130:e851c8ca30a7 52131:e9727e6b5fc1
   185 
   185 
   186 void MemAllocator::Allocation::notify_allocation_jvmti_sampler() {
   186 void MemAllocator::Allocation::notify_allocation_jvmti_sampler() {
   187   // support for JVMTI VMObjectAlloc event (no-op if not enabled)
   187   // support for JVMTI VMObjectAlloc event (no-op if not enabled)
   188   JvmtiExport::vm_object_alloc_event_collector(obj());
   188   JvmtiExport::vm_object_alloc_event_collector(obj());
   189 
   189 
   190   if (!ThreadHeapSampler::enabled()) {
   190   if (!JvmtiExport::should_post_sampled_object_alloc()) {
   191     // Sampling disabled
   191     // Sampling disabled
   192     return;
   192     return;
   193   }
   193   }
   194 
   194 
   195   if (!_allocated_outside_tlab && _allocated_tlab_size == 0 && !_tlab_end_reset_for_sample) {
   195   if (!_allocated_outside_tlab && _allocated_tlab_size == 0 && !_tlab_end_reset_for_sample) {
   280 
   280 
   281 HeapWord* MemAllocator::allocate_inside_tlab_slow(Allocation& allocation) const {
   281 HeapWord* MemAllocator::allocate_inside_tlab_slow(Allocation& allocation) const {
   282   HeapWord* mem = NULL;
   282   HeapWord* mem = NULL;
   283   ThreadLocalAllocBuffer& tlab = _thread->tlab();
   283   ThreadLocalAllocBuffer& tlab = _thread->tlab();
   284 
   284 
   285   if (ThreadHeapSampler::enabled()) {
   285   if (JvmtiExport::should_post_sampled_object_alloc()) {
   286     // Try to allocate the sampled object from TLAB, it is possible a sample
   286     // Try to allocate the sampled object from TLAB, it is possible a sample
   287     // point was put and the TLAB still has space.
   287     // point was put and the TLAB still has space.
   288     tlab.set_back_allocation_end();
   288     tlab.set_back_allocation_end();
   289     mem = tlab.allocate(_word_size);
   289     mem = tlab.allocate(_word_size);
   290     if (mem != NULL) {
   290     if (mem != NULL) {