comparison src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepThread.hpp @ 14909:4ca6dc0799b6

Backout jdk9 merge
author Gilles Duboscq <duboscq@ssw.jku.at>
date Tue, 01 Apr 2014 13:57:07 +0200
parents 63a4eb8bcd23
children 89152779163c
comparison
equal deleted inserted replaced
14908:8db6e76cb658 14909:4ca6dc0799b6
1 /* 1 /*
2 * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2001, 2011, 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.
162 // and to clear only the async counter when it yields. However, it turns out 162 // and to clear only the async counter when it yields. However, it turns out
163 // to be more efficient for CMS code to just check a single counter 163 // to be more efficient for CMS code to just check a single counter
164 // _pending_yields that holds the sum (of both sync and async requests), and 164 // _pending_yields that holds the sum (of both sync and async requests), and
165 // a second counter _pending_decrements that only holds the async requests, 165 // a second counter _pending_decrements that only holds the async requests,
166 // for greater efficiency, since in a typical CMS run, there are many more 166 // for greater efficiency, since in a typical CMS run, there are many more
167 // potential (i.e. static) yield points than there are actual 167 // pontential (i.e. static) yield points than there are actual
168 // (i.e. dynamic) yields because of requests, which are few and far between. 168 // (i.e. dynamic) yields because of requests, which are few and far between.
169 // 169 //
170 // Note that, while "_pending_yields >= _pending_decrements" is an invariant, 170 // Note that, while "_pending_yields >= _pending_decrements" is an invariant,
171 // we cannot easily test that invariant, since the counters are manipulated via 171 // we cannot easily test that invariant, since the counters are manipulated via
172 // atomic instructions without explicit locking and we cannot read 172 // atomic instructions without explicit locking and we cannot read