1 /*
2 * Copyright (c) 2015, 2017, 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 */
66
67 #ifdef ASSERT
68 virtual bool should_verify_oops() {
69 return false;
70 }
71 #endif
72 };
73
74 class ZPhantomIsAliveObjectClosure : public BoolObjectClosure {
75 public:
76 virtual bool do_object_b(oop o);
77 };
78
79 class ZPhantomKeepAliveOopClosure : public OopClosure {
80 public:
81 virtual void do_oop(oop* p);
82 virtual void do_oop(narrowOop* p);
83 };
84
85 class ZPhantomCleanOopClosure : public OopClosure {
86 private:
87 void clean(volatile oop* p);
88
89 public:
90 virtual void do_oop(oop* p);
91 virtual void do_oop(narrowOop* p);
92 };
93
94 class ZVerifyHeapOopClosure : public ExtendedOopClosure {
95 private:
96 const oop _base;
97
98 public:
99 ZVerifyHeapOopClosure(oop base);
100
101 virtual void do_oop(oop* p);
102 virtual void do_oop(narrowOop* p);
103
104 #ifdef ASSERT
105 // Verification handled by the closure itself.
106 virtual bool should_verify_oops() {
107 return false;
108 }
|
1 /*
2 * Copyright (c) 2015, 2018, 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 */
66
67 #ifdef ASSERT
68 virtual bool should_verify_oops() {
69 return false;
70 }
71 #endif
72 };
73
74 class ZPhantomIsAliveObjectClosure : public BoolObjectClosure {
75 public:
76 virtual bool do_object_b(oop o);
77 };
78
79 class ZPhantomKeepAliveOopClosure : public OopClosure {
80 public:
81 virtual void do_oop(oop* p);
82 virtual void do_oop(narrowOop* p);
83 };
84
85 class ZPhantomCleanOopClosure : public OopClosure {
86 public:
87 virtual void do_oop(oop* p);
88 virtual void do_oop(narrowOop* p);
89 };
90
91 class ZVerifyHeapOopClosure : public ExtendedOopClosure {
92 private:
93 const oop _base;
94
95 public:
96 ZVerifyHeapOopClosure(oop base);
97
98 virtual void do_oop(oop* p);
99 virtual void do_oop(narrowOop* p);
100
101 #ifdef ASSERT
102 // Verification handled by the closure itself.
103 virtual bool should_verify_oops() {
104 return false;
105 }
|