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 "classfile/systemDictionary.hpp"
27 #include "classfile/vmSymbols.hpp"
28 #include "gc_implementation/shared/liveRange.hpp"
29 #include "gc_implementation/shared/spaceDecorator.hpp"
30 #include "gc_interface/collectedHeap.inline.hpp"
31 #include "memory/blockOffsetTable.inline.hpp"
32 #include "memory/defNewGeneration.hpp"
33 #include "memory/genCollectedHeap.hpp"
34 #include "memory/genOopClosures.inline.hpp"
35 #include "memory/space.hpp"
36 #include "memory/space.inline.hpp"
37 #include "memory/universe.inline.hpp"
38 #include "oops/oop.inline.hpp"
39 #include "runtime/java.hpp"
40 #include "runtime/atomic.inline.hpp"
41 #include "runtime/prefetch.inline.hpp"
42 #include "runtime/orderAccess.inline.hpp"
43 #include "runtime/safepoint.hpp"
44 #include "utilities/copy.hpp"
45 #include "utilities/globalDefinitions.hpp"
46 #include "utilities/macros.hpp"
47
48 HeapWord* DirtyCardToOopClosure::get_actual_top(HeapWord* top,
49 HeapWord* top_obj) {
50 if (top_obj != NULL) {
51 if (_sp->block_is_obj(top_obj)) {
52 if (_precision == CardTableModRefBS::ObjHeadPreciseArray) {
53 if (oop(top_obj)->is_objArray() || oop(top_obj)->is_typeArray()) {
54 // An arrayOop is starting on the dirty card - since we do exact
55 // store checks for objArrays we are done.
56 } else {
57 // Otherwise, it is possible that the object starting on the dirty
58 // card spans the entire card, and that the store happened on a
59 // later card. Figure out where the object ends.
60 // Use the block_size() method of the space over which
61 // the iteration is being done. That space (e.g. CMS) may have
62 // specific requirements on object sizes which will
|
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 "classfile/systemDictionary.hpp"
27 #include "classfile/vmSymbols.hpp"
28 #include "gc/serial/defNewGeneration.hpp"
29 #include "gc/shared/blockOffsetTable.inline.hpp"
30 #include "gc/shared/collectedHeap.inline.hpp"
31 #include "gc/shared/genCollectedHeap.hpp"
32 #include "gc/shared/genOopClosures.inline.hpp"
33 #include "gc/shared/liveRange.hpp"
34 #include "gc/shared/space.hpp"
35 #include "gc/shared/space.inline.hpp"
36 #include "gc/shared/spaceDecorator.hpp"
37 #include "memory/universe.inline.hpp"
38 #include "oops/oop.inline.hpp"
39 #include "runtime/atomic.inline.hpp"
40 #include "runtime/java.hpp"
41 #include "runtime/orderAccess.inline.hpp"
42 #include "runtime/prefetch.inline.hpp"
43 #include "runtime/safepoint.hpp"
44 #include "utilities/copy.hpp"
45 #include "utilities/globalDefinitions.hpp"
46 #include "utilities/macros.hpp"
47
48 HeapWord* DirtyCardToOopClosure::get_actual_top(HeapWord* top,
49 HeapWord* top_obj) {
50 if (top_obj != NULL) {
51 if (_sp->block_is_obj(top_obj)) {
52 if (_precision == CardTableModRefBS::ObjHeadPreciseArray) {
53 if (oop(top_obj)->is_objArray() || oop(top_obj)->is_typeArray()) {
54 // An arrayOop is starting on the dirty card - since we do exact
55 // store checks for objArrays we are done.
56 } else {
57 // Otherwise, it is possible that the object starting on the dirty
58 // card spans the entire card, and that the store happened on a
59 // later card. Figure out where the object ends.
60 // Use the block_size() method of the space over which
61 // the iteration is being done. That space (e.g. CMS) may have
62 // specific requirements on object sizes which will
|