Mercurial > hg > graal-jvmci-8
comparison src/share/vm/memory/defNewGeneration.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 | f08d439fab8c |
children | b632e80fc9dc |
comparison
equal
deleted
inserted
replaced
4910:caa4652b4414 | 4911:d903bf750e9f |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2001, 2010, 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. |
653 } | 653 } |
654 // set new iteration safe limit for the survivor spaces | 654 // set new iteration safe limit for the survivor spaces |
655 from()->set_concurrent_iteration_safe_limit(from()->top()); | 655 from()->set_concurrent_iteration_safe_limit(from()->top()); |
656 to()->set_concurrent_iteration_safe_limit(to()->top()); | 656 to()->set_concurrent_iteration_safe_limit(to()->top()); |
657 SpecializationStats::print(); | 657 SpecializationStats::print(); |
658 update_time_of_last_gc(os::javaTimeMillis()); | 658 |
659 // We need to use a monotonically non-deccreasing time in ms | |
660 // or we will see time-warp warnings and os::javaTimeMillis() | |
661 // does not guarantee monotonicity. | |
662 jlong now = os::javaTimeNanos() / NANOSECS_PER_MILLISEC; | |
663 update_time_of_last_gc(now); | |
659 } | 664 } |
660 | 665 |
661 class RemoveForwardPointerClosure: public ObjectClosure { | 666 class RemoveForwardPointerClosure: public ObjectClosure { |
662 public: | 667 public: |
663 void do_object(oop obj) { | 668 void do_object(oop obj) { |