174 // input to soft ref clearing policy at the next gc. |
174 // input to soft ref clearing policy at the next gc. |
175 Universe::update_heap_info_at_gc(); |
175 Universe::update_heap_info_at_gc(); |
176 |
176 |
177 // Update time of last gc for all generations we collected |
177 // Update time of last gc for all generations we collected |
178 // (which curently is all the generations in the heap). |
178 // (which curently is all the generations in the heap). |
179 gch->update_time_of_last_gc(os::javaTimeMillis()); |
179 // We need to use a monotonically non-deccreasing time in ms |
|
180 // or we will see time-warp warnings and os::javaTimeMillis() |
|
181 // does not guarantee monotonicity. |
|
182 jlong now = os::javaTimeNanos() / NANOSECS_PER_MILLISEC; |
|
183 gch->update_time_of_last_gc(now); |
180 } |
184 } |
181 |
185 |
182 void GenMarkSweep::allocate_stacks() { |
186 void GenMarkSweep::allocate_stacks() { |
183 GenCollectedHeap* gch = GenCollectedHeap::heap(); |
187 GenCollectedHeap* gch = GenCollectedHeap::heap(); |
184 // Scratch request on behalf of oldest generation; will do no |
188 // Scratch request on behalf of oldest generation; will do no |