< prev index next >

src/hotspot/share/gc/shared/threadLocalAllocBuffer.hpp

Print this page




  41   friend class VMStructs;
  42   friend class JVMCIVMStructs;
  43 private:
  44   HeapWord* _start;                              // address of TLAB
  45   HeapWord* _top;                                // address after last allocation
  46   HeapWord* _pf_top;                             // allocation prefetch watermark
  47   HeapWord* _end;                                // allocation end (excluding alignment_reserve)
  48   size_t    _desired_size;                       // desired size   (including alignment_reserve)
  49   size_t    _refill_waste_limit;                 // hold onto tlab if free() is larger than this
  50   size_t    _allocated_before_last_gc;           // total bytes allocated up until the last gc
  51 
  52   static size_t   _max_size;                          // maximum size of any TLAB
  53   static int      _reserve_for_allocation_prefetch;   // Reserve at the end of the TLAB
  54   static unsigned _target_refills;                    // expected number of refills between GCs
  55 
  56   unsigned  _number_of_refills;
  57   unsigned  _fast_refill_waste;
  58   unsigned  _slow_refill_waste;
  59   unsigned  _gc_waste;
  60   unsigned  _slow_allocations;

  61 
  62   AdaptiveWeightedAverage _allocation_fraction;  // fraction of eden allocated in tlabs
  63 
  64   void accumulate_statistics();
  65   void initialize_statistics();
  66 
  67   void set_start(HeapWord* start)                { _start = start; }
  68   void set_end(HeapWord* end)                    { _end = end; }
  69   void set_top(HeapWord* top)                    { _top = top; }
  70   void set_pf_top(HeapWord* pf_top)              { _pf_top = pf_top; }
  71   void set_desired_size(size_t desired_size)     { _desired_size = desired_size; }
  72   void set_refill_waste_limit(size_t waste)      { _refill_waste_limit = waste;  }
  73 
  74   size_t initial_refill_waste_limit()            { return desired_size() / TLABRefillWasteFraction; }
  75 
  76   static int    target_refills()                 { return _target_refills; }
  77   size_t initial_desired_size();
  78 
  79   size_t remaining() const                       { return end() == NULL ? 0 : pointer_delta(hard_end(), top()); }
  80 




  41   friend class VMStructs;
  42   friend class JVMCIVMStructs;
  43 private:
  44   HeapWord* _start;                              // address of TLAB
  45   HeapWord* _top;                                // address after last allocation
  46   HeapWord* _pf_top;                             // allocation prefetch watermark
  47   HeapWord* _end;                                // allocation end (excluding alignment_reserve)
  48   size_t    _desired_size;                       // desired size   (including alignment_reserve)
  49   size_t    _refill_waste_limit;                 // hold onto tlab if free() is larger than this
  50   size_t    _allocated_before_last_gc;           // total bytes allocated up until the last gc
  51 
  52   static size_t   _max_size;                          // maximum size of any TLAB
  53   static int      _reserve_for_allocation_prefetch;   // Reserve at the end of the TLAB
  54   static unsigned _target_refills;                    // expected number of refills between GCs
  55 
  56   unsigned  _number_of_refills;
  57   unsigned  _fast_refill_waste;
  58   unsigned  _slow_refill_waste;
  59   unsigned  _gc_waste;
  60   unsigned  _slow_allocations;
  61   size_t    _allocated_size;
  62 
  63   AdaptiveWeightedAverage _allocation_fraction;  // fraction of eden allocated in tlabs
  64 
  65   void accumulate_statistics();
  66   void initialize_statistics();
  67 
  68   void set_start(HeapWord* start)                { _start = start; }
  69   void set_end(HeapWord* end)                    { _end = end; }
  70   void set_top(HeapWord* top)                    { _top = top; }
  71   void set_pf_top(HeapWord* pf_top)              { _pf_top = pf_top; }
  72   void set_desired_size(size_t desired_size)     { _desired_size = desired_size; }
  73   void set_refill_waste_limit(size_t waste)      { _refill_waste_limit = waste;  }
  74 
  75   size_t initial_refill_waste_limit()            { return desired_size() / TLABRefillWasteFraction; }
  76 
  77   static int    target_refills()                 { return _target_refills; }
  78   size_t initial_desired_size();
  79 
  80   size_t remaining() const                       { return end() == NULL ? 0 : pointer_delta(hard_end(), top()); }
  81 


< prev index next >