comparison src/share/vm/gc_implementation/g1/concurrentMarkThread.cpp @ 4837:eff609af17d7

7127706: G1: re-enable survivors during the initial-mark pause Summary: Re-enable survivors during the initial-mark pause. Afterwards, the concurrent marking threads have to scan them and mark everything reachable from them. The next GC will have to wait for the survivors to be scanned. Reviewed-by: brutisso, johnc
author tonyp
date Wed, 25 Jan 2012 12:58:23 -0500
parents d30fa85f9994
children 64bf7c8270cb
comparison
equal deleted inserted replaced
4836:d30fa85f9994 4837:eff609af17d7
90 sleepBeforeNextCycle(); 90 sleepBeforeNextCycle();
91 { 91 {
92 ResourceMark rm; 92 ResourceMark rm;
93 HandleMark hm; 93 HandleMark hm;
94 double cycle_start = os::elapsedVTime(); 94 double cycle_start = os::elapsedVTime();
95 char verbose_str[128];
96
97 // We have to ensure that we finish scanning the root regions
98 // before the next GC takes place. To ensure this we have to
99 // make sure that we do not join the STS until the root regions
100 // have been scanned. If we did then it's possible that a
101 // subsequent GC could block us from joining the STS and proceed
102 // without the root regions have been scanned which would be a
103 // correctness issue.
104
105 double scan_start = os::elapsedTime();
106 if (!cm()->has_aborted()) {
107 if (PrintGC) {
108 gclog_or_tty->date_stamp(PrintGCDateStamps);
109 gclog_or_tty->stamp(PrintGCTimeStamps);
110 gclog_or_tty->print_cr("[GC concurrent-root-region-scan-start]");
111 }
112
113 _cm->scanRootRegions();
114
115 double scan_end = os::elapsedTime();
116 if (PrintGC) {
117 gclog_or_tty->date_stamp(PrintGCDateStamps);
118 gclog_or_tty->stamp(PrintGCTimeStamps);
119 gclog_or_tty->print_cr("[GC concurrent-root-region-scan-end, %1.7lf]",
120 scan_end - scan_start);
121 }
122 }
123
95 double mark_start_sec = os::elapsedTime(); 124 double mark_start_sec = os::elapsedTime();
96 char verbose_str[128];
97
98 if (PrintGC) { 125 if (PrintGC) {
99 gclog_or_tty->date_stamp(PrintGCDateStamps); 126 gclog_or_tty->date_stamp(PrintGCDateStamps);
100 gclog_or_tty->stamp(PrintGCTimeStamps); 127 gclog_or_tty->stamp(PrintGCTimeStamps);
101 gclog_or_tty->print_cr("[GC concurrent-mark-start]"); 128 gclog_or_tty->print_cr("[GC concurrent-mark-start]");
102 } 129 }