1 /*
2 * Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
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
7 * published by the Free Software Foundation.
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 "code/nmethod.hpp"
27 #include "gc/g1/g1BlockOffsetTable.inline.hpp"
28 #include "gc/g1/g1CollectedHeap.inline.hpp"
29 #include "gc/g1/g1HeapRegionTraceType.hpp"
30 #include "gc/g1/g1OopClosures.inline.hpp"
31 #include "gc/g1/heapRegion.inline.hpp"
32 #include "gc/g1/heapRegionBounds.inline.hpp"
33 #include "gc/g1/heapRegionManager.inline.hpp"
34 #include "gc/g1/heapRegionRemSet.hpp"
35 #include "gc/g1/heapRegionTracer.hpp"
36 #include "gc/shared/genOopClosures.inline.hpp"
37 #include "gc/shared/liveRange.hpp"
38 #include "gc/shared/space.inline.hpp"
39 #include "logging/log.hpp"
40 #include "memory/iterator.hpp"
41 #include "oops/oop.inline.hpp"
42 #include "runtime/atomic.inline.hpp"
43 #include "runtime/orderAccess.inline.hpp"
44
45 int HeapRegion::LogOfHRGrainBytes = 0;
46 int HeapRegion::LogOfHRGrainWords = 0;
47 size_t HeapRegion::GrainBytes = 0;
48 size_t HeapRegion::GrainWords = 0;
49 size_t HeapRegion::CardsPerRegion = 0;
50
51 HeapRegionDCTOC::HeapRegionDCTOC(G1CollectedHeap* g1,
52 HeapRegion* hr,
53 G1ParPushHeapRSClosure* cl,
54 CardTableModRefBS::PrecisionStyle precision) :
55 DirtyCardToOopClosure(hr, cl, precision, NULL),
56 _hr(hr), _rs_scan(cl), _g1(g1) { }
57
58 FilterOutOfRegionClosure::FilterOutOfRegionClosure(HeapRegion* r,
59 OopClosure* oc) :
60 _r_bottom(r->bottom()), _r_end(r->end()), _oc(oc) { }
|
1 /*
2 * Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
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
7 * published by the Free Software Foundation.
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 "code/nmethod.hpp"
27 #include "gc/g1/g1BlockOffsetTable.inline.hpp"
28 #include "gc/g1/g1CollectedHeap.inline.hpp"
29 #include "gc/g1/g1HeapRegionTraceType.hpp"
30 #include "gc/g1/g1OopClosures.inline.hpp"
31 #include "gc/g1/heapRegion.inline.hpp"
32 #include "gc/g1/heapRegionBounds.inline.hpp"
33 #include "gc/g1/heapRegionManager.inline.hpp"
34 #include "gc/g1/heapRegionRemSet.hpp"
35 #include "gc/g1/heapRegionTracer.hpp"
36 #include "gc/shared/genOopClosures.inline.hpp"
37 #include "gc/shared/liveRange.hpp"
38 #include "gc/shared/space.inline.hpp"
39 #include "logging/log.hpp"
40 #include "memory/iterator.hpp"
41 #include "memory/resourceArea.hpp"
42 #include "oops/oop.inline.hpp"
43 #include "runtime/atomic.inline.hpp"
44 #include "runtime/orderAccess.inline.hpp"
45
46 int HeapRegion::LogOfHRGrainBytes = 0;
47 int HeapRegion::LogOfHRGrainWords = 0;
48 size_t HeapRegion::GrainBytes = 0;
49 size_t HeapRegion::GrainWords = 0;
50 size_t HeapRegion::CardsPerRegion = 0;
51
52 HeapRegionDCTOC::HeapRegionDCTOC(G1CollectedHeap* g1,
53 HeapRegion* hr,
54 G1ParPushHeapRSClosure* cl,
55 CardTableModRefBS::PrecisionStyle precision) :
56 DirtyCardToOopClosure(hr, cl, precision, NULL),
57 _hr(hr), _rs_scan(cl), _g1(g1) { }
58
59 FilterOutOfRegionClosure::FilterOutOfRegionClosure(HeapRegion* r,
60 OopClosure* oc) :
61 _r_bottom(r->bottom()), _r_end(r->end()), _oc(oc) { }
|