< prev index next >

src/share/vm/gc/parallel/parallelScavengeHeap.hpp

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

*** 264,269 **** --- 264,298 ---- size_t _young_gen_used; size_t _old_gen_used; size_t _metadata_used; }; + // 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 : AllStatic { + static bool enabled() { + return UseParallelGC && + UseAdaptiveSizePolicy && + log_is_enabled(Debug, gc, ergo); + } + public: + static void print() { + if (enabled()) { + ParallelScavengeHeap::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_PARALLEL_PARALLELSCAVENGEHEAP_HPP
< prev index next >