hotspot/src/share/vm/memory/genCollectedHeap.cpp
changeset 3580 55775b48f5e5
parent 1610 5dddd195cc86
child 3581 c84159af60dd
--- a/hotspot/src/share/vm/memory/genCollectedHeap.cpp	Sat Dec 20 09:58:36 2008 -0800
+++ b/hotspot/src/share/vm/memory/genCollectedHeap.cpp	Tue Jul 28 13:35:00 2009 -0600
@@ -1,5 +1,5 @@
 /*
- * Copyright 2000-2008 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2000-2009 Sun Microsystems, Inc.  All Rights Reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -456,6 +456,12 @@
     int max_level_collected = starting_level;
     for (int i = starting_level; i <= max_level; i++) {
       if (_gens[i]->should_collect(full, size, is_tlab)) {
+        if (i == n_gens() - 1) {  // a major collection is to happen
+          if (!complete) {
+            // The full_collections increment was missed above.
+            increment_total_full_collections();
+          }
+        }
         // Timer for individual generations. Last argument is false: no CR
         TraceTime t1(_gens[i]->short_name(), PrintGCDetails, false, gclog_or_tty);
         TraceCollectorStats tcs(_gens[i]->counters());