Mercurial > hg > truffle
comparison src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp @ 6064:9d679effd28c
7166894: Add gc cause to GC logging for all collectors
Reviewed-by: mgerdin, johnc
author | brutisso |
---|---|
date | Tue, 15 May 2012 10:25:06 +0200 |
parents | ab4422d0ed59 |
children | d2a62e0f25eb |
comparison
equal
deleted
inserted
replaced
6063:cdfa5139bd58 | 6064:9d679effd28c |
---|---|
2045 // Set the number of GC threads to be used in this collection | 2045 // Set the number of GC threads to be used in this collection |
2046 gc_task_manager()->set_active_gang(); | 2046 gc_task_manager()->set_active_gang(); |
2047 gc_task_manager()->task_idle_workers(); | 2047 gc_task_manager()->task_idle_workers(); |
2048 heap->set_par_threads(gc_task_manager()->active_workers()); | 2048 heap->set_par_threads(gc_task_manager()->active_workers()); |
2049 | 2049 |
2050 const bool is_system_gc = gc_cause == GCCause::_java_lang_system_gc; | |
2051 | |
2052 // This is useful for debugging but don't change the output the | |
2053 // the customer sees. | |
2054 const char* gc_cause_str = "Full GC"; | |
2055 if (is_system_gc && PrintGCDetails) { | |
2056 gc_cause_str = "Full GC (System)"; | |
2057 } | |
2058 gclog_or_tty->date_stamp(PrintGC && PrintGCDateStamps); | 2050 gclog_or_tty->date_stamp(PrintGC && PrintGCDateStamps); |
2059 TraceCPUTime tcpu(PrintGCDetails, true, gclog_or_tty); | 2051 TraceCPUTime tcpu(PrintGCDetails, true, gclog_or_tty); |
2060 TraceTime t1(gc_cause_str, PrintGC, !PrintGCDetails, gclog_or_tty); | 2052 TraceTime t1(GCCauseString("Full GC", gc_cause), PrintGC, !PrintGCDetails, gclog_or_tty); |
2061 TraceCollectorStats tcs(counters()); | 2053 TraceCollectorStats tcs(counters()); |
2062 TraceMemoryManagerStats tms(true /* Full GC */,gc_cause); | 2054 TraceMemoryManagerStats tms(true /* Full GC */,gc_cause); |
2063 | 2055 |
2064 if (TraceGen1Time) accumulated_time()->start(); | 2056 if (TraceGen1Time) accumulated_time()->start(); |
2065 | 2057 |
2088 mark_bitmap()->cas_tries(), mark_bitmap()->cas_retries(), | 2080 mark_bitmap()->cas_tries(), mark_bitmap()->cas_retries(), |
2089 mark_bitmap()->cas_by_another()); | 2081 mark_bitmap()->cas_by_another()); |
2090 } | 2082 } |
2091 #endif // #ifndef PRODUCT | 2083 #endif // #ifndef PRODUCT |
2092 | 2084 |
2093 bool max_on_system_gc = UseMaximumCompactionOnSystemGC && is_system_gc; | 2085 bool max_on_system_gc = UseMaximumCompactionOnSystemGC |
2086 && gc_cause == GCCause::_java_lang_system_gc; | |
2094 summary_phase(vmthread_cm, maximum_heap_compaction || max_on_system_gc); | 2087 summary_phase(vmthread_cm, maximum_heap_compaction || max_on_system_gc); |
2095 | 2088 |
2096 COMPILER2_PRESENT(assert(DerivedPointerTable::is_active(), "Sanity")); | 2089 COMPILER2_PRESENT(assert(DerivedPointerTable::is_active(), "Sanity")); |
2097 COMPILER2_PRESENT(DerivedPointerTable::set_active(false)); | 2090 COMPILER2_PRESENT(DerivedPointerTable::set_active(false)); |
2098 | 2091 |