hotspot/src/share/vm/gc/g1/g1CollectedHeap.cpp
changeset 31032 8e72621ca186
parent 30881 7a3899d7cea0
child 31330 77061bb01b18
equal deleted inserted replaced
31031:d0b85f02898f 31032:8e72621ca186
  1181 
  1181 
  1182   {
  1182   {
  1183     IsGCActiveMark x;
  1183     IsGCActiveMark x;
  1184 
  1184 
  1185     // Timing
  1185     // Timing
  1186     assert(gc_cause() != GCCause::_java_lang_system_gc || explicit_gc, "invariant");
  1186     assert(!GCCause::is_user_requested_gc(gc_cause()) || explicit_gc, "invariant");
  1187     TraceCPUTime tcpu(G1Log::finer(), true, gclog_or_tty);
  1187     TraceCPUTime tcpu(G1Log::finer(), true, gclog_or_tty);
  1188 
  1188 
  1189     {
  1189     {
  1190       GCTraceTime t(GCCauseString("Full GC", gc_cause()), G1Log::fine(), true, NULL, gc_tracer->gc_id());
  1190       GCTraceTime t(GCCauseString("Full GC", gc_cause()), G1Log::fine(), true, NULL, gc_tracer->gc_id());
  1191       TraceCollectorStats tcs(g1mm()->full_collection_counters());
  1191       TraceCollectorStats tcs(g1mm()->full_collection_counters());
  2197 
  2197 
  2198 bool G1CollectedHeap::should_do_concurrent_full_gc(GCCause::Cause cause) {
  2198 bool G1CollectedHeap::should_do_concurrent_full_gc(GCCause::Cause cause) {
  2199   switch (cause) {
  2199   switch (cause) {
  2200     case GCCause::_gc_locker:               return GCLockerInvokesConcurrent;
  2200     case GCCause::_gc_locker:               return GCLockerInvokesConcurrent;
  2201     case GCCause::_java_lang_system_gc:     return ExplicitGCInvokesConcurrent;
  2201     case GCCause::_java_lang_system_gc:     return ExplicitGCInvokesConcurrent;
       
  2202     case GCCause::_dcmd_gc_run:             return ExplicitGCInvokesConcurrent;
  2202     case GCCause::_g1_humongous_allocation: return true;
  2203     case GCCause::_g1_humongous_allocation: return true;
  2203     case GCCause::_update_allocation_context_stats_inc: return true;
  2204     case GCCause::_update_allocation_context_stats_inc: return true;
  2204     case GCCause::_wb_conc_mark:            return true;
  2205     case GCCause::_wb_conc_mark:            return true;
  2205     default:                                return false;
  2206     default:                                return false;
  2206   }
  2207   }