8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #include "precompiled.hpp"
26 #include "gc_implementation/g1/g1CollectedHeap.inline.hpp"
27 #include "gc_implementation/g1/satbQueue.hpp"
28 #include "memory/allocation.inline.hpp"
29 #include "memory/sharedHeap.hpp"
30 #include "oops/oop.inline.hpp"
31 #include "runtime/mutexLocker.hpp"
32 #include "runtime/thread.hpp"
33 #include "runtime/vmThread.hpp"
34
35 void ObjPtrQueue::flush() {
36 // The buffer might contain refs into the CSet. We have to filter it
37 // first before we flush it, otherwise we might end up with an
38 // enqueued buffer with refs into the CSet which breaks our invariants.
39 filter();
40 flush_impl();
41 }
42
43 // This method removes entries from an SATB buffer that will not be
44 // useful to the concurrent marking threads. An entry is removed if it
45 // satisfies one of the following conditions:
46 //
47 // * it points to an object outside the G1 heap (G1's concurrent
48 // marking only visits objects inside the G1 heap),
49 // * it points to an object that has been allocated since marking
|
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #include "precompiled.hpp"
26 #include "gc_implementation/g1/g1CollectedHeap.inline.hpp"
27 #include "gc_implementation/g1/satbQueue.hpp"
28 #include "gc_interface/collectedHeap.hpp"
29 #include "memory/allocation.inline.hpp"
30 #include "oops/oop.inline.hpp"
31 #include "runtime/mutexLocker.hpp"
32 #include "runtime/thread.hpp"
33 #include "runtime/vmThread.hpp"
34
35 void ObjPtrQueue::flush() {
36 // The buffer might contain refs into the CSet. We have to filter it
37 // first before we flush it, otherwise we might end up with an
38 // enqueued buffer with refs into the CSet which breaks our invariants.
39 filter();
40 flush_impl();
41 }
42
43 // This method removes entries from an SATB buffer that will not be
44 // useful to the concurrent marking threads. An entry is removed if it
45 // satisfies one of the following conditions:
46 //
47 // * it points to an object outside the G1 heap (G1's concurrent
48 // marking only visits objects inside the G1 heap),
49 // * it points to an object that has been allocated since marking
|