< prev index next >

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

Print this page
rev 13233 : 8179268: Factor out AdaptiveSizePolicy from top-level interfaces CollectorPolicy and CollectedHeap

*** 35,45 **** // This class keeps statistical information and computes the // size of the heap. // Forward decls class elapsedTimer; ! class CollectorPolicy; class AdaptiveSizePolicy : public CHeapObj<mtGC> { friend class GCAdaptivePolicyCounters; friend class PSGCAdaptivePolicyCounters; friend class CMSGCAdaptivePolicyCounters; --- 35,45 ---- // This class keeps statistical information and computes the // size of the heap. // Forward decls class elapsedTimer; ! class GenCollectorPolicy; class AdaptiveSizePolicy : public CHeapObj<mtGC> { friend class GCAdaptivePolicyCounters; friend class PSGCAdaptivePolicyCounters; friend class CMSGCAdaptivePolicyCounters;
*** 484,494 **** size_t eden_live, size_t max_old_gen_size, size_t max_eden_size, bool is_full_gc, GCCause::Cause gc_cause, ! CollectorPolicy* collector_policy); static bool should_update_promo_stats(GCCause::Cause cause) { return ((GCCause::is_user_requested_gc(cause) && UseAdaptiveSizePolicyWithSystemGC) || GCCause::is_tenured_allocation_failure_gc(cause)); --- 484,494 ---- size_t eden_live, size_t max_old_gen_size, size_t max_eden_size, bool is_full_gc, GCCause::Cause gc_cause, ! GenCollectorPolicy* collector_policy); static bool should_update_promo_stats(GCCause::Cause cause) { return ((GCCause::is_user_requested_gc(cause) && UseAdaptiveSizePolicyWithSystemGC) || GCCause::is_tenured_allocation_failure_gc(cause));
*** 503,537 **** // Printing support virtual bool print() const; void print_tenuring_threshold(uint new_tenuring_threshold) const; }; - // Class that can be used to print information about the - // adaptive size policy at intervals specified by - // AdaptiveSizePolicyOutputInterval. Only print information - // if an adaptive size policy is in use. - class AdaptiveSizePolicyOutput : StackObj { - static bool enabled() { - return UseParallelGC && - UseAdaptiveSizePolicy && - log_is_enabled(Debug, gc, ergo); - } - public: - static void print() { - if (enabled()) { - Universe::heap()->size_policy()->print(); - } - } - - static void print(AdaptiveSizePolicy* size_policy, uint count) { - bool do_print = - enabled() && - (AdaptiveSizePolicyOutputInterval > 0) && - (count % AdaptiveSizePolicyOutputInterval) == 0; - - if (do_print) { - size_policy->print(); - } - } - }; - #endif // SHARE_VM_GC_SHARED_ADAPTIVESIZEPOLICY_HPP --- 503,508 ----
< prev index next >