src/share/vm/memory/genCollectedHeap.cpp

changeset 6904
0982ec23da03
parent 6680
78bbf4d43a14
child 6968
9fec19bb0659
equal deleted inserted replaced
6903:5d855d021755 6904:0982ec23da03
26 #include "classfile/symbolTable.hpp" 26 #include "classfile/symbolTable.hpp"
27 #include "classfile/systemDictionary.hpp" 27 #include "classfile/systemDictionary.hpp"
28 #include "classfile/vmSymbols.hpp" 28 #include "classfile/vmSymbols.hpp"
29 #include "code/icBuffer.hpp" 29 #include "code/icBuffer.hpp"
30 #include "gc_implementation/shared/collectorCounters.hpp" 30 #include "gc_implementation/shared/collectorCounters.hpp"
31 #include "gc_implementation/shared/gcTrace.hpp"
31 #include "gc_implementation/shared/gcTraceTime.hpp" 32 #include "gc_implementation/shared/gcTraceTime.hpp"
32 #include "gc_implementation/shared/vmGCOperations.hpp" 33 #include "gc_implementation/shared/vmGCOperations.hpp"
33 #include "gc_interface/collectedHeap.inline.hpp" 34 #include "gc_interface/collectedHeap.inline.hpp"
34 #include "memory/filemap.hpp" 35 #include "memory/filemap.hpp"
35 #include "memory/gcLocker.inline.hpp" 36 #include "memory/gcLocker.inline.hpp"
383 384
384 bool complete = full && (max_level == (n_gens()-1)); 385 bool complete = full && (max_level == (n_gens()-1));
385 const char* gc_cause_prefix = complete ? "Full GC" : "GC"; 386 const char* gc_cause_prefix = complete ? "Full GC" : "GC";
386 gclog_or_tty->date_stamp(PrintGC && PrintGCDateStamps); 387 gclog_or_tty->date_stamp(PrintGC && PrintGCDateStamps);
387 TraceCPUTime tcpu(PrintGCDetails, true, gclog_or_tty); 388 TraceCPUTime tcpu(PrintGCDetails, true, gclog_or_tty);
388 GCTraceTime t(GCCauseString(gc_cause_prefix, gc_cause()), PrintGCDetails, false, NULL); 389 // The PrintGCDetails logging starts before we have incremented the GC id. We will do that later
390 // so we can assume here that the next GC id is what we want.
391 GCTraceTime t(GCCauseString(gc_cause_prefix, gc_cause()), PrintGCDetails, false, NULL, GCId::peek());
389 392
390 gc_prologue(complete); 393 gc_prologue(complete);
391 increment_total_collections(complete); 394 increment_total_collections(complete);
392 395
393 size_t gch_prev_used = used(); 396 size_t gch_prev_used = used();
416 } 419 }
417 pre_full_gc_dump(NULL); // do any pre full gc dumps 420 pre_full_gc_dump(NULL); // do any pre full gc dumps
418 } 421 }
419 // Timer for individual generations. Last argument is false: no CR 422 // Timer for individual generations. Last argument is false: no CR
420 // FIXME: We should try to start the timing earlier to cover more of the GC pause 423 // FIXME: We should try to start the timing earlier to cover more of the GC pause
421 GCTraceTime t1(_gens[i]->short_name(), PrintGCDetails, false, NULL); 424 // The PrintGCDetails logging starts before we have incremented the GC id. We will do that later
425 // so we can assume here that the next GC id is what we want.
426 GCTraceTime t1(_gens[i]->short_name(), PrintGCDetails, false, NULL, GCId::peek());
422 TraceCollectorStats tcs(_gens[i]->counters()); 427 TraceCollectorStats tcs(_gens[i]->counters());
423 TraceMemoryManagerStats tmms(_gens[i]->kind(),gc_cause()); 428 TraceMemoryManagerStats tmms(_gens[i]->kind(),gc_cause());
424 429
425 size_t prev_used = _gens[i]->used(); 430 size_t prev_used = _gens[i]->used();
426 _gens[i]->stat_record()->invocations++; 431 _gens[i]->stat_record()->invocations++;

mercurial