1.1 --- a/src/share/vm/memory/genCollectedHeap.cpp Sat Dec 20 09:58:36 2008 -0800 1.2 +++ b/src/share/vm/memory/genCollectedHeap.cpp Tue Jul 28 13:35:00 2009 -0600 1.3 @@ -1,5 +1,5 @@ 1.4 /* 1.5 - * Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved. 1.6 + * Copyright 2000-2009 Sun Microsystems, Inc. All Rights Reserved. 1.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.8 * 1.9 * This code is free software; you can redistribute it and/or modify it 1.10 @@ -456,6 +456,12 @@ 1.11 int max_level_collected = starting_level; 1.12 for (int i = starting_level; i <= max_level; i++) { 1.13 if (_gens[i]->should_collect(full, size, is_tlab)) { 1.14 + if (i == n_gens() - 1) { // a major collection is to happen 1.15 + if (!complete) { 1.16 + // The full_collections increment was missed above. 1.17 + increment_total_full_collections(); 1.18 + } 1.19 + } 1.20 // Timer for individual generations. Last argument is false: no CR 1.21 TraceTime t1(_gens[i]->short_name(), PrintGCDetails, false, gclog_or_tty); 1.22 TraceCollectorStats tcs(_gens[i]->counters());