< prev index next >

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

Print this page
rev 8816 : imported patch 8073013-add-detailed-information-about-plab-memory-usage

*** 24,35 **** #ifndef SHARE_VM_GC_SHARED_PLAB_HPP #define SHARE_VM_GC_SHARED_PLAB_HPP #include "gc/shared/gcUtil.hpp" ! #include "memory/allocation.hpp" ! #include "runtime/atomic.hpp" #include "utilities/globalDefinitions.hpp" // Forward declarations. class PLABStats; --- 24,35 ---- #ifndef SHARE_VM_GC_SHARED_PLAB_HPP #define SHARE_VM_GC_SHARED_PLAB_HPP #include "gc/shared/gcUtil.hpp" ! #include "memory/allocation.inline.hpp" ! #include "runtime/atomic.inline.hpp" #include "utilities/globalDefinitions.hpp" // Forward declarations. class PLABStats;
*** 147,166 **** void print() PRODUCT_RETURN; }; // PLAB book-keeping. ! class PLABStats VALUE_OBJ_CLASS_SPEC { size_t _allocated; // Total allocated size_t _wasted; // of which wasted (internal fragmentation) size_t _undo_wasted; // of which wasted on undo (is not used for calculation of PLAB size) 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; _undo_wasted = 0; _unused = 0; } --- 147,167 ---- void print() PRODUCT_RETURN; }; // PLAB book-keeping. ! class PLABStats : public CHeapObj<mtGC> { ! protected: size_t _allocated; // Total allocated size_t _wasted; // of which wasted (internal fragmentation) size_t _undo_wasted; // of which wasted on undo (is not used for calculation of PLAB size) 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 ! virtual void reset() { _allocated = 0; _wasted = 0; _undo_wasted = 0; _unused = 0; }
*** 172,181 **** --- 173,184 ---- _unused(0), _desired_net_plab_sz(desired_net_plab_sz_), _filter(wt) { } + virtual ~PLABStats() { } + static const size_t min_size() { return PLAB::min_size(); } static const size_t max_size() {
*** 185,195 **** // 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); } --- 188,198 ---- // 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. ! virtual void adjust_desired_plab_sz(); void add_allocated(size_t v) { Atomic::add_ptr(v, &_allocated); }
< prev index next >