8072913: [REDO] GCCause should distinguish jcmd GC.run from System.gc()

GCCause which is caused by GC.run diagnostic command should be different from System.gc() .

Reviewed-by: jmasa, jwilhelm
This commit is contained in:
Yasumasa Suenaga 2015-06-03 08:49:34 +09:00
parent c1fc7aa38a
commit 242ce54cc7
15 changed files with 34 additions and 19 deletions

View file

@ -272,7 +272,7 @@ bool PSMarkSweep::invoke_no_policy(bool clear_all_softrefs) {
// Don't check if the size_policy is ready here. Let
// the size_policy check that internally.
if (UseAdaptiveGenerationSizePolicyAtMajorCollection &&
((gc_cause != GCCause::_java_lang_system_gc) ||
(!GCCause::is_user_requested_gc(gc_cause) ||
UseAdaptiveSizePolicyWithSystemGC)) {
// Swap the survivor spaces if from_space is empty. The
// resize_young_gen() called below is normally used after