diff -r b9bc732be7c0 -r f6f3eef8a521 src/share/vm/services/management.cpp --- a/src/share/vm/services/management.cpp Thu Jun 10 08:27:35 2010 -0700 +++ b/src/share/vm/services/management.cpp Fri Jul 30 22:43:50 2010 +0100 @@ -1900,16 +1900,15 @@ // Get the GCMemoryManager GCMemoryManager* mgr = get_gc_memory_manager_from_jobject(obj, CHECK); - if (mgr->last_gc_stat() == NULL) { - gc_stat->gc_index = 0; - return; - } // Make a copy of the last GC statistics // GC may occur while constructing the last GC information int num_pools = MemoryService::num_memory_pools(); GCStatInfo* stat = new GCStatInfo(num_pools); - stat->copy_stat(mgr->last_gc_stat()); + if (mgr->get_last_gc_stat(stat) == 0) { + gc_stat->gc_index = 0; + return; + } gc_stat->gc_index = stat->gc_index(); gc_stat->start_time = Management::ticks_to_ms(stat->start_time());