equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1997, 2018, 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. |
21 * questions. |
21 * questions. |
22 * |
22 * |
23 */ |
23 */ |
24 |
24 |
25 #include "precompiled.hpp" |
25 #include "precompiled.hpp" |
26 #include "gc/shared/barrierSet.inline.hpp" |
26 #include "gc/shared/barrierSet.hpp" |
27 #include "gc/shared/collectedHeap.hpp" |
|
28 #include "memory/universe.hpp" |
|
29 |
27 |
30 BarrierSet* BarrierSet::_bs = NULL; |
28 BarrierSet* BarrierSet::_bs = NULL; |
31 |
|
32 // count is number of array elements being written |
|
33 void BarrierSet::static_write_ref_array_pre(HeapWord* start, size_t count) { |
|
34 assert(count <= (size_t)max_intx, "count too large"); |
|
35 if (UseCompressedOops) { |
|
36 Universe::heap()->barrier_set()->write_ref_array_pre((narrowOop*)start, (int)count, false); |
|
37 } else { |
|
38 Universe::heap()->barrier_set()->write_ref_array_pre( (oop*)start, (int)count, false); |
|
39 } |
|
40 } |
|
41 |
|
42 // count is number of array elements being written |
|
43 void BarrierSet::static_write_ref_array_post(HeapWord* start, size_t count) { |
|
44 // simply delegate to instance method |
|
45 Universe::heap()->barrier_set()->write_ref_array(start, count); |
|
46 } |
|