< prev index next >

src/share/vm/gc_implementation/shared/plab.hpp

Print this page

        

*** 145,169 **** // PLAB book-keeping. class PLABStats VALUE_OBJ_CLASS_SPEC { size_t _allocated; // Total allocated size_t _wasted; // of which wasted (internal fragmentation) size_t _unused; // Unused in last buffer ! size_t _desired_plab_sz;// Output of filter (below), suitably trimmed and quantized AdaptiveWeightedAverage _filter; // Integrator with decay void reset() { _allocated = 0; _wasted = 0; _unused = 0; } public: ! PLABStats(size_t desired_plab_sz_, unsigned wt) : _allocated(0), _wasted(0), _unused(0), ! _desired_plab_sz(desired_plab_sz_), _filter(wt) { } static const size_t min_size() { return PLAB::min_size(); --- 145,169 ---- // PLAB book-keeping. class PLABStats VALUE_OBJ_CLASS_SPEC { size_t _allocated; // Total allocated size_t _wasted; // of which wasted (internal fragmentation) size_t _unused; // Unused in last buffer ! size_t _desired_net_plab_sz;// Output of filter (below), suitably trimmed and quantized AdaptiveWeightedAverage _filter; // Integrator with decay void reset() { _allocated = 0; _wasted = 0; _unused = 0; } public: ! PLABStats(size_t _desired_net_plab_sz, unsigned wt) : _allocated(0), _wasted(0), _unused(0), ! _desired_net_plab_sz(_desired_net_plab_sz), _filter(wt) { } static const size_t min_size() { return PLAB::min_size();
*** 171,187 **** static const size_t max_size() { return PLAB::max_size(); } ! size_t desired_plab_sz() { ! return _desired_plab_sz; ! } ! // Updates the current desired PLAB size. Computes the new desired PLAB size, // updates _desired_plab_sz and clears sensor accumulators. ! void adjust_desired_plab_sz(uint no_of_gc_workers); void add_allocated(size_t v) { Atomic::add_ptr(v, &_allocated); } --- 171,186 ---- static const size_t max_size() { return PLAB::max_size(); } ! // Calculates plab size for current number of gc worker threads. ! size_t desired_plab_sz(uint no_of_gc_workers); ! // Updates the current desired PLAB size. Computes the new desired PLAB size with one gc worker thread, // updates _desired_plab_sz and clears sensor accumulators. ! void adjust_desired_plab_sz(); void add_allocated(size_t v) { Atomic::add_ptr(v, &_allocated); }
< prev index next >