src/hotspot/share/gc/shared/threadLocalAllocBuffer.cpp
changeset 48005 9fd89aabb6cd
parent 47679 4cfcb7be4984
child 48105 8d15b1369c7a
equal deleted inserted replaced
48003:e1ec73e3325e 48005:9fd89aabb6cd
   191              NULL,                    // top
   191              NULL,                    // top
   192              NULL);                   // end
   192              NULL);                   // end
   193 
   193 
   194   set_desired_size(initial_desired_size());
   194   set_desired_size(initial_desired_size());
   195 
   195 
   196   // Following check is needed because at startup the main (primordial)
   196   // Following check is needed because at startup the main
   197   // thread is initialized before the heap is.  The initialization for
   197   // thread is initialized before the heap is.  The initialization for
   198   // this thread is redone in startup_initialization below.
   198   // this thread is redone in startup_initialization below.
   199   if (Universe::heap() != NULL) {
   199   if (Universe::heap() != NULL) {
   200     size_t capacity   = Universe::heap()->tlab_capacity(myThread()) / HeapWordSize;
   200     size_t capacity   = Universe::heap()->tlab_capacity(myThread()) / HeapWordSize;
   201     double alloc_frac = desired_size() * target_refills() / (double) capacity;
   201     double alloc_frac = desired_size() * target_refills() / (double) capacity;
   238     _reserve_for_allocation_prefetch = (AllocatePrefetchDistance + AllocatePrefetchStepSize * lines) /
   238     _reserve_for_allocation_prefetch = (AllocatePrefetchDistance + AllocatePrefetchStepSize * lines) /
   239                                        (int)HeapWordSize;
   239                                        (int)HeapWordSize;
   240   }
   240   }
   241 #endif
   241 #endif
   242 
   242 
   243   // During jvm startup, the main (primordial) thread is initialized
   243   // During jvm startup, the main thread is initialized
   244   // before the heap is initialized.  So reinitialize it now.
   244   // before the heap is initialized.  So reinitialize it now.
   245   guarantee(Thread::current()->is_Java_thread(), "tlab initialization thread not Java thread");
   245   guarantee(Thread::current()->is_Java_thread(), "tlab initialization thread not Java thread");
   246   Thread::current()->tlab().initialize();
   246   Thread::current()->tlab().initialize();
   247 
   247 
   248   log_develop_trace(gc, tlab)("TLAB min: " SIZE_FORMAT " initial: " SIZE_FORMAT " max: " SIZE_FORMAT,
   248   log_develop_trace(gc, tlab)("TLAB min: " SIZE_FORMAT " initial: " SIZE_FORMAT " max: " SIZE_FORMAT,