112 |
99 |
113 if (PrintGC) { |
100 if (PrintGC) { |
114 gclog_or_tty->date_stamp(PrintGCDateStamps); |
101 gclog_or_tty->date_stamp(PrintGCDateStamps); |
115 gclog_or_tty->stamp(PrintGCTimeStamps); |
102 gclog_or_tty->stamp(PrintGCTimeStamps); |
116 gclog_or_tty->print_cr("[GC concurrent-mark-start]"); |
103 gclog_or_tty->print_cr("[GC concurrent-mark-start]"); |
117 } |
|
118 |
|
119 if (!g1_policy->in_young_gc_mode()) { |
|
120 // this ensures the flag is not set if we bail out of the marking |
|
121 // cycle; normally the flag is cleared immediately after cleanup |
|
122 g1h->set_marking_complete(); |
|
123 |
|
124 if (g1_policy->adaptive_young_list_length()) { |
|
125 double now = os::elapsedTime(); |
|
126 double init_prediction_ms = g1_policy->predict_init_time_ms(); |
|
127 jlong sleep_time_ms = mmu_tracker->when_ms(now, init_prediction_ms); |
|
128 os::sleep(current_thread, sleep_time_ms, false); |
|
129 } |
|
130 |
|
131 // We don't have to skip here if we've been asked to restart, because |
|
132 // in the worst case we just enqueue a new VM operation to start a |
|
133 // marking. Note that the init operation resets has_aborted() |
|
134 CMCheckpointRootsInitialClosure init_cl(_cm); |
|
135 strcpy(verbose_str, "GC initial-mark"); |
|
136 VM_CGC_Operation op(&init_cl, verbose_str); |
|
137 VMThread::execute(&op); |
|
138 } |
104 } |
139 |
105 |
140 int iter = 0; |
106 int iter = 0; |
141 do { |
107 do { |
142 iter++; |
108 iter++; |