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 "classfile/metadataOnStackMark.hpp"
27 #include "classfile/symbolTable.hpp"
28 #include "code/codeCache.hpp"
29 #include "gc_implementation/g1/concurrentMark.inline.hpp"
30 #include "gc_implementation/g1/concurrentMarkThread.inline.hpp"
31 #include "gc_implementation/g1/g1CollectedHeap.inline.hpp"
32 #include "gc_implementation/g1/g1CollectorPolicy.hpp"
33 #include "gc_implementation/g1/g1ErgoVerbose.hpp"
34 #include "gc_implementation/g1/g1Log.hpp"
35 #include "gc_implementation/g1/g1OopClosures.inline.hpp"
36 #include "gc_implementation/g1/g1RemSet.hpp"
37 #include "gc_implementation/g1/g1StringDedup.hpp"
38 #include "gc_implementation/g1/heapRegion.inline.hpp"
39 #include "gc_implementation/g1/heapRegionManager.inline.hpp"
40 #include "gc_implementation/g1/heapRegionRemSet.hpp"
41 #include "gc_implementation/g1/heapRegionSet.inline.hpp"
42 #include "gc_implementation/shared/vmGCOperations.hpp"
43 #include "gc_implementation/shared/gcTimer.hpp"
44 #include "gc_implementation/shared/gcTrace.hpp"
45 #include "gc_implementation/shared/gcTraceTime.hpp"
46 #include "memory/allocation.hpp"
47 #include "memory/genOopClosures.inline.hpp"
48 #include "memory/referencePolicy.hpp"
49 #include "memory/resourceArea.hpp"
50 #include "memory/strongRootsScope.hpp"
51 #include "oops/oop.inline.hpp"
52 #include "runtime/handles.inline.hpp"
53 #include "runtime/java.hpp"
54 #include "runtime/atomic.inline.hpp"
55 #include "runtime/prefetch.inline.hpp"
56 #include "services/memTracker.hpp"
57 #include "utilities/taskqueue.inline.hpp"
58
59 // Concurrent marking bit map wrapper
60
61 CMBitMapRO::CMBitMapRO(int shifter) :
62 _bm(),
63 _shifter(shifter) {
64 _bmStartWord = 0;
65 _bmWordSize = 0;
66 }
67
68 HeapWord* CMBitMapRO::getNextMarkedWordAddress(const HeapWord* addr,
69 const HeapWord* limit) const {
70 // First we must round addr *up* to a possible object boundary.
71 addr = (HeapWord*)align_size_up((intptr_t)addr,
72 HeapWordSize << _shifter);
73 size_t addrOffset = heapWordToOffset(addr);
74 if (limit == NULL) {
75 limit = _bmStartWord + _bmWordSize;
76 }
77 size_t limitOffset = heapWordToOffset(limit);
|
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 "classfile/metadataOnStackMark.hpp"
27 #include "classfile/symbolTable.hpp"
28 #include "code/codeCache.hpp"
29 #include "gc/g1/concurrentMark.inline.hpp"
30 #include "gc/g1/concurrentMarkThread.inline.hpp"
31 #include "gc/g1/g1CollectedHeap.inline.hpp"
32 #include "gc/g1/g1CollectorPolicy.hpp"
33 #include "gc/g1/g1ErgoVerbose.hpp"
34 #include "gc/g1/g1Log.hpp"
35 #include "gc/g1/g1OopClosures.inline.hpp"
36 #include "gc/g1/g1RemSet.hpp"
37 #include "gc/g1/g1StringDedup.hpp"
38 #include "gc/g1/heapRegion.inline.hpp"
39 #include "gc/g1/heapRegionManager.inline.hpp"
40 #include "gc/g1/heapRegionRemSet.hpp"
41 #include "gc/g1/heapRegionSet.inline.hpp"
42 #include "gc/shared/gcTimer.hpp"
43 #include "gc/shared/gcTrace.hpp"
44 #include "gc/shared/gcTraceTime.hpp"
45 #include "gc/shared/genOopClosures.inline.hpp"
46 #include "gc/shared/referencePolicy.hpp"
47 #include "gc/shared/strongRootsScope.hpp"
48 #include "gc/shared/taskqueue.inline.hpp"
49 #include "gc/shared/vmGCOperations.hpp"
50 #include "memory/allocation.hpp"
51 #include "memory/resourceArea.hpp"
52 #include "oops/oop.inline.hpp"
53 #include "runtime/atomic.inline.hpp"
54 #include "runtime/handles.inline.hpp"
55 #include "runtime/java.hpp"
56 #include "runtime/prefetch.inline.hpp"
57 #include "services/memTracker.hpp"
58
59 // Concurrent marking bit map wrapper
60
61 CMBitMapRO::CMBitMapRO(int shifter) :
62 _bm(),
63 _shifter(shifter) {
64 _bmStartWord = 0;
65 _bmWordSize = 0;
66 }
67
68 HeapWord* CMBitMapRO::getNextMarkedWordAddress(const HeapWord* addr,
69 const HeapWord* limit) const {
70 // First we must round addr *up* to a possible object boundary.
71 addr = (HeapWord*)align_size_up((intptr_t)addr,
72 HeapWordSize << _shifter);
73 size_t addrOffset = heapWordToOffset(addr);
74 if (limit == NULL) {
75 limit = _bmStartWord + _bmWordSize;
76 }
77 size_t limitOffset = heapWordToOffset(limit);
|