143 gclog_or_tty->print(" VerifyBeforeGC:"); 144 Universe::verify(true); 145 } 146 147 // Verify object start arrays 148 if (VerifyObjectStartArray && 149 VerifyBeforeGC) { 150 old_gen->verify_object_start_array(); 151 perm_gen->verify_object_start_array(); 152 } 153 154 heap->pre_full_gc_dump(); 155 156 // Filled in below to track the state of the young gen after the collection. 157 bool eden_empty; 158 bool survivors_empty; 159 bool young_gen_empty; 160 161 { 162 HandleMark hm; 163 const bool is_system_gc = gc_cause == GCCause::_java_lang_system_gc; 164 // This is useful for debugging but don't change the output the 165 // the customer sees. 166 const char* gc_cause_str = "Full GC"; 167 if (is_system_gc && PrintGCDetails) { 168 gc_cause_str = "Full GC (System)"; 169 } 170 gclog_or_tty->date_stamp(PrintGC && PrintGCDateStamps); 171 TraceCPUTime tcpu(PrintGCDetails, true, gclog_or_tty); 172 TraceTime t1(gc_cause_str, PrintGC, !PrintGCDetails, gclog_or_tty); 173 TraceCollectorStats tcs(counters()); 174 TraceMemoryManagerStats tms(true /* Full GC */,gc_cause); 175 176 if (TraceGen1Time) accumulated_time()->start(); 177 178 // Let the size policy know we're starting 179 size_policy->major_collection_begin(); 180 181 // When collecting the permanent generation methodOops may be moving, 182 // so we either have to flush all bcp data or convert it into bci. 183 CodeCache::gc_prologue(); 184 Threads::gc_prologue(); 185 BiasedLocking::preserve_marks(); 186 187 // Capture heap size before collection for printing. 188 size_t prev_used = heap->used(); 189 190 // Capture perm gen size before collection for sizing. 191 size_t perm_gen_prev_used = perm_gen->used_in_bytes(); 192 | 143 gclog_or_tty->print(" VerifyBeforeGC:"); 144 Universe::verify(true); 145 } 146 147 // Verify object start arrays 148 if (VerifyObjectStartArray && 149 VerifyBeforeGC) { 150 old_gen->verify_object_start_array(); 151 perm_gen->verify_object_start_array(); 152 } 153 154 heap->pre_full_gc_dump(); 155 156 // Filled in below to track the state of the young gen after the collection. 157 bool eden_empty; 158 bool survivors_empty; 159 bool young_gen_empty; 160 161 { 162 HandleMark hm; 163 164 gclog_or_tty->date_stamp(PrintGC && PrintGCDateStamps); 165 TraceCPUTime tcpu(PrintGCDetails, true, gclog_or_tty); 166 TraceTime t1(GCCauseString("Full GC", gc_cause), PrintGC, !PrintGCDetails, gclog_or_tty); 167 TraceCollectorStats tcs(counters()); 168 TraceMemoryManagerStats tms(true /* Full GC */,gc_cause); 169 170 if (TraceGen1Time) accumulated_time()->start(); 171 172 // Let the size policy know we're starting 173 size_policy->major_collection_begin(); 174 175 // When collecting the permanent generation methodOops may be moving, 176 // so we either have to flush all bcp data or convert it into bci. 177 CodeCache::gc_prologue(); 178 Threads::gc_prologue(); 179 BiasedLocking::preserve_marks(); 180 181 // Capture heap size before collection for printing. 182 size_t prev_used = heap->used(); 183 184 // Capture perm gen size before collection for sizing. 185 size_t perm_gen_prev_used = perm_gen->used_in_bytes(); 186 |