Mercurial > hg > graal-compiler
comparison src/share/vm/services/management.cpp @ 1703:f6f3eef8a521
6581734: CMS Old Gen's collection usage is zero after GC which is incorrect
Summary: Management code enabled for use by a concurrent collector.
Reviewed-by: mchung, ysr
author | kevinw |
---|---|
date | Fri, 30 Jul 2010 22:43:50 +0100 |
parents | c18cbe5936b8 |
children | 1c63587d925b |
comparison
equal
deleted
inserted
replaced
1594:b9bc732be7c0 | 1703:f6f3eef8a521 |
---|---|
1898 THROW(vmSymbols::java_lang_NullPointerException()); | 1898 THROW(vmSymbols::java_lang_NullPointerException()); |
1899 } | 1899 } |
1900 | 1900 |
1901 // Get the GCMemoryManager | 1901 // Get the GCMemoryManager |
1902 GCMemoryManager* mgr = get_gc_memory_manager_from_jobject(obj, CHECK); | 1902 GCMemoryManager* mgr = get_gc_memory_manager_from_jobject(obj, CHECK); |
1903 if (mgr->last_gc_stat() == NULL) { | |
1904 gc_stat->gc_index = 0; | |
1905 return; | |
1906 } | |
1907 | 1903 |
1908 // Make a copy of the last GC statistics | 1904 // Make a copy of the last GC statistics |
1909 // GC may occur while constructing the last GC information | 1905 // GC may occur while constructing the last GC information |
1910 int num_pools = MemoryService::num_memory_pools(); | 1906 int num_pools = MemoryService::num_memory_pools(); |
1911 GCStatInfo* stat = new GCStatInfo(num_pools); | 1907 GCStatInfo* stat = new GCStatInfo(num_pools); |
1912 stat->copy_stat(mgr->last_gc_stat()); | 1908 if (mgr->get_last_gc_stat(stat) == 0) { |
1909 gc_stat->gc_index = 0; | |
1910 return; | |
1911 } | |
1913 | 1912 |
1914 gc_stat->gc_index = stat->gc_index(); | 1913 gc_stat->gc_index = stat->gc_index(); |
1915 gc_stat->start_time = Management::ticks_to_ms(stat->start_time()); | 1914 gc_stat->start_time = Management::ticks_to_ms(stat->start_time()); |
1916 gc_stat->end_time = Management::ticks_to_ms(stat->end_time()); | 1915 gc_stat->end_time = Management::ticks_to_ms(stat->end_time()); |
1917 | 1916 |