Mercurial > hg > truffle
comparison src/share/vm/gc_implementation/parNew/parNewGeneration.cpp @ 4911:d903bf750e9f
7129514: time warp warnings after 7117303
Summary: Replace calls to os::javaTimeMillis() that are used to update the milliseconds since the last GC to an equivalent that uses a monotonically non-decreasing time source.
Reviewed-by: ysr, jmasa
author | johnc |
---|---|
date | Wed, 18 Jan 2012 09:50:16 -0800 |
parents | 441e946dc1af |
children | 9d679effd28c |
comparison
equal
deleted
inserted
replaced
4910:caa4652b4414 | 4911:d903bf750e9f |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * | 4 * |
5 * This code is free software; you can redistribute it and/or modify it | 5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as | 6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
1040 if (UseAdaptiveSizePolicy) { | 1040 if (UseAdaptiveSizePolicy) { |
1041 size_policy->minor_collection_end(gch->gc_cause()); | 1041 size_policy->minor_collection_end(gch->gc_cause()); |
1042 size_policy->avg_survived()->sample(from()->used()); | 1042 size_policy->avg_survived()->sample(from()->used()); |
1043 } | 1043 } |
1044 | 1044 |
1045 update_time_of_last_gc(os::javaTimeMillis()); | 1045 // We need to use a monotonically non-deccreasing time in ms |
1046 // or we will see time-warp warnings and os::javaTimeMillis() | |
1047 // does not guarantee monotonicity. | |
1048 jlong now = os::javaTimeNanos() / NANOSECS_PER_MILLISEC; | |
1049 update_time_of_last_gc(now); | |
1046 | 1050 |
1047 SpecializationStats::print(); | 1051 SpecializationStats::print(); |
1048 | 1052 |
1049 rp->set_enqueuing_is_done(true); | 1053 rp->set_enqueuing_is_done(true); |
1050 if (rp->processing_is_mt()) { | 1054 if (rp->processing_is_mt()) { |