equal
deleted
inserted
replaced
264 size_t _young_gen_used; |
264 size_t _young_gen_used; |
265 size_t _old_gen_used; |
265 size_t _old_gen_used; |
266 size_t _metadata_used; |
266 size_t _metadata_used; |
267 }; |
267 }; |
268 |
268 |
|
269 // Class that can be used to print information about the |
|
270 // adaptive size policy at intervals specified by |
|
271 // AdaptiveSizePolicyOutputInterval. Only print information |
|
272 // if an adaptive size policy is in use. |
|
273 class AdaptiveSizePolicyOutput : AllStatic { |
|
274 static bool enabled() { |
|
275 return UseParallelGC && |
|
276 UseAdaptiveSizePolicy && |
|
277 log_is_enabled(Debug, gc, ergo); |
|
278 } |
|
279 public: |
|
280 static void print() { |
|
281 if (enabled()) { |
|
282 ParallelScavengeHeap::heap()->size_policy()->print(); |
|
283 } |
|
284 } |
|
285 |
|
286 static void print(AdaptiveSizePolicy* size_policy, uint count) { |
|
287 bool do_print = |
|
288 enabled() && |
|
289 (AdaptiveSizePolicyOutputInterval > 0) && |
|
290 (count % AdaptiveSizePolicyOutputInterval) == 0; |
|
291 |
|
292 if (do_print) { |
|
293 size_policy->print(); |
|
294 } |
|
295 } |
|
296 }; |
|
297 |
269 #endif // SHARE_VM_GC_PARALLEL_PARALLELSCAVENGEHEAP_HPP |
298 #endif // SHARE_VM_GC_PARALLEL_PARALLELSCAVENGEHEAP_HPP |