comparison src/share/vm/gc_implementation/g1/concurrentMark.cpp @ 6007:5c86f8211d1e

7160728: Introduce an extra logging level for G1 logging Summary: Added log levels "fine", "finer" and "finest". Let PrintGC map to "fine" and PrintGCDetails map to "finer". Separated out the per worker information in the G1 logging to the "finest" level. Reviewed-by: stefank, jwilhelm, tonyp, johnc
author brutisso
date Fri, 13 Apr 2012 01:59:38 +0200
parents 2a0172480595
children b632e80fc9dc
comparison
equal deleted inserted replaced
5994:4a32c51458b9 6007:5c86f8211d1e
27 #include "gc_implementation/g1/concurrentMark.inline.hpp" 27 #include "gc_implementation/g1/concurrentMark.inline.hpp"
28 #include "gc_implementation/g1/concurrentMarkThread.inline.hpp" 28 #include "gc_implementation/g1/concurrentMarkThread.inline.hpp"
29 #include "gc_implementation/g1/g1CollectedHeap.inline.hpp" 29 #include "gc_implementation/g1/g1CollectedHeap.inline.hpp"
30 #include "gc_implementation/g1/g1CollectorPolicy.hpp" 30 #include "gc_implementation/g1/g1CollectorPolicy.hpp"
31 #include "gc_implementation/g1/g1ErgoVerbose.hpp" 31 #include "gc_implementation/g1/g1ErgoVerbose.hpp"
32 #include "gc_implementation/g1/g1Log.hpp"
32 #include "gc_implementation/g1/g1OopClosures.inline.hpp" 33 #include "gc_implementation/g1/g1OopClosures.inline.hpp"
33 #include "gc_implementation/g1/g1RemSet.hpp" 34 #include "gc_implementation/g1/g1RemSet.hpp"
34 #include "gc_implementation/g1/heapRegion.inline.hpp" 35 #include "gc_implementation/g1/heapRegion.inline.hpp"
35 #include "gc_implementation/g1/heapRegionRemSet.hpp" 36 #include "gc_implementation/g1/heapRegionRemSet.hpp"
36 #include "gc_implementation/g1/heapRegionSeq.inline.hpp" 37 #include "gc_implementation/g1/heapRegionSeq.inline.hpp"
844 // we exit this method to abort the pause and restart concurent 845 // we exit this method to abort the pause and restart concurent
845 // marking. 846 // marking.
846 clear_marking_state(concurrent() /* clear_overflow */); 847 clear_marking_state(concurrent() /* clear_overflow */);
847 force_overflow()->update(); 848 force_overflow()->update();
848 849
849 if (PrintGC) { 850 if (G1Log::fine()) {
850 gclog_or_tty->date_stamp(PrintGCDateStamps); 851 gclog_or_tty->date_stamp(PrintGCDateStamps);
851 gclog_or_tty->stamp(PrintGCTimeStamps); 852 gclog_or_tty->stamp(PrintGCTimeStamps);
852 gclog_or_tty->print_cr("[GC concurrent-mark-reset-for-overflow]"); 853 gclog_or_tty->print_cr("[GC concurrent-mark-reset-for-overflow]");
853 } 854 }
854 } 855 }
2103 2104
2104 // Statistics. 2105 // Statistics.
2105 double end = os::elapsedTime(); 2106 double end = os::elapsedTime();
2106 _cleanup_times.add((end - start) * 1000.0); 2107 _cleanup_times.add((end - start) * 1000.0);
2107 2108
2108 if (PrintGC || PrintGCDetails) { 2109 if (G1Log::fine()) {
2109 g1h->print_size_transition(gclog_or_tty, 2110 g1h->print_size_transition(gclog_or_tty,
2110 start_used_bytes, 2111 start_used_bytes,
2111 g1h->used(), 2112 g1h->used(),
2112 g1h->capacity()); 2113 g1h->capacity());
2113 } 2114 }
2444 G1CMIsAliveClosure g1_is_alive(g1h); 2445 G1CMIsAliveClosure g1_is_alive(g1h);
2445 2446
2446 // Inner scope to exclude the cleaning of the string and symbol 2447 // Inner scope to exclude the cleaning of the string and symbol
2447 // tables from the displayed time. 2448 // tables from the displayed time.
2448 { 2449 {
2449 bool verbose = PrintGC && PrintGCDetails; 2450 if (G1Log::finer()) {
2450 if (verbose) {
2451 gclog_or_tty->put(' '); 2451 gclog_or_tty->put(' ');
2452 } 2452 }
2453 TraceTime t("GC ref-proc", verbose, false, gclog_or_tty); 2453 TraceTime t("GC ref-proc", G1Log::finer(), false, gclog_or_tty);
2454 2454
2455 ReferenceProcessor* rp = g1h->ref_processor_cm(); 2455 ReferenceProcessor* rp = g1h->ref_processor_cm();
2456 2456
2457 // See the comment in G1CollectedHeap::ref_processing_init() 2457 // See the comment in G1CollectedHeap::ref_processing_init()
2458 // about how reference processing currently works in G1. 2458 // about how reference processing currently works in G1.