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 "aot/aotLoader.hpp"
27 #include "classfile/classLoader.hpp"
28 #include "classfile/classLoaderDataGraph.hpp"
29 #include "classfile/javaClasses.hpp"
30 #include "classfile/stringTable.hpp"
31 #include "classfile/systemDictionary.hpp"
32 #include "classfile/vmSymbols.hpp"
33 #include "code/codeCache.hpp"
34 #include "code/dependencies.hpp"
35 #include "gc/shared/collectedHeap.inline.hpp"
36 #include "gc/shared/gcArguments.hpp"
37 #include "gc/shared/gcConfig.hpp"
38 #include "gc/shared/gcTraceTime.inline.hpp"
39 #include "interpreter/interpreter.hpp"
40 #include "logging/log.hpp"
41 #include "logging/logStream.hpp"
42 #include "memory/heapShared.hpp"
43 #include "memory/filemap.hpp"
44 #include "memory/metadataFactory.hpp"
45 #include "memory/metaspaceClosure.hpp"
46 #include "memory/metaspaceCounters.hpp"
47 #include "memory/metaspaceShared.hpp"
48 #include "memory/oopFactory.hpp"
49 #include "memory/resourceArea.hpp"
50 #include "memory/universe.hpp"
51 #include "memory/universe.hpp"
52 #include "oops/constantPool.hpp"
53 #include "oops/instanceClassLoaderKlass.hpp"
54 #include "oops/instanceKlass.hpp"
55 #include "oops/instanceMirrorKlass.hpp"
1215 }
1216 if (should_verify_subset(Verify_JNIHandles)) {
1217 log_debug(gc, verify)("JNIHandles");
1218 JNIHandles::verify();
1219 }
1220 if (should_verify_subset(Verify_CodeCacheOops)) {
1221 log_debug(gc, verify)("CodeCache Oops");
1222 CodeCache::verify_oops();
1223 }
1224
1225 _verify_in_progress = false;
1226 }
1227
1228
1229 #ifndef PRODUCT
1230 void Universe::calculate_verify_data(HeapWord* low_boundary, HeapWord* high_boundary) {
1231 assert(low_boundary < high_boundary, "bad interval");
1232
1233 // decide which low-order bits we require to be clear:
1234 size_t alignSize = MinObjAlignmentInBytes;
1235 size_t min_object_size = CollectedHeap::min_fill_size();
1236
1237 // make an inclusive limit:
1238 uintptr_t max = (uintptr_t)high_boundary - min_object_size*wordSize;
1239 uintptr_t min = (uintptr_t)low_boundary;
1240 assert(min < max, "bad interval");
1241 uintptr_t diff = max ^ min;
1242
1243 // throw away enough low-order bits to make the diff vanish
1244 uintptr_t mask = (uintptr_t)(-1);
1245 while ((mask & diff) != 0)
1246 mask <<= 1;
1247 uintptr_t bits = (min & mask);
1248 assert(bits == (max & mask), "correct mask");
1249 // check an intermediate value between min and max, just to make sure:
1250 assert(bits == ((min + (max-min)/2) & mask), "correct mask");
1251
1252 // require address alignment, too:
1253 mask |= (alignSize - 1);
1254
1255 if (!(_verify_oop_mask == 0 && _verify_oop_bits == (uintptr_t)-1)) {
|
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 "aot/aotLoader.hpp"
27 #include "classfile/classLoader.hpp"
28 #include "classfile/classLoaderDataGraph.hpp"
29 #include "classfile/javaClasses.hpp"
30 #include "classfile/stringTable.hpp"
31 #include "classfile/systemDictionary.hpp"
32 #include "classfile/vmSymbols.hpp"
33 #include "code/codeCache.hpp"
34 #include "code/dependencies.hpp"
35 #include "gc/shared/collectedHeap.inline.hpp"
36 #include "gc/shared/fill.hpp"
37 #include "gc/shared/gcArguments.hpp"
38 #include "gc/shared/gcConfig.hpp"
39 #include "gc/shared/gcTraceTime.inline.hpp"
40 #include "interpreter/interpreter.hpp"
41 #include "logging/log.hpp"
42 #include "logging/logStream.hpp"
43 #include "memory/heapShared.hpp"
44 #include "memory/filemap.hpp"
45 #include "memory/metadataFactory.hpp"
46 #include "memory/metaspaceClosure.hpp"
47 #include "memory/metaspaceCounters.hpp"
48 #include "memory/metaspaceShared.hpp"
49 #include "memory/oopFactory.hpp"
50 #include "memory/resourceArea.hpp"
51 #include "memory/universe.hpp"
52 #include "memory/universe.hpp"
53 #include "oops/constantPool.hpp"
54 #include "oops/instanceClassLoaderKlass.hpp"
55 #include "oops/instanceKlass.hpp"
56 #include "oops/instanceMirrorKlass.hpp"
1216 }
1217 if (should_verify_subset(Verify_JNIHandles)) {
1218 log_debug(gc, verify)("JNIHandles");
1219 JNIHandles::verify();
1220 }
1221 if (should_verify_subset(Verify_CodeCacheOops)) {
1222 log_debug(gc, verify)("CodeCache Oops");
1223 CodeCache::verify_oops();
1224 }
1225
1226 _verify_in_progress = false;
1227 }
1228
1229
1230 #ifndef PRODUCT
1231 void Universe::calculate_verify_data(HeapWord* low_boundary, HeapWord* high_boundary) {
1232 assert(low_boundary < high_boundary, "bad interval");
1233
1234 // decide which low-order bits we require to be clear:
1235 size_t alignSize = MinObjAlignmentInBytes;
1236 size_t min_object_size = Fill::min_size();
1237
1238 // make an inclusive limit:
1239 uintptr_t max = (uintptr_t)high_boundary - min_object_size*wordSize;
1240 uintptr_t min = (uintptr_t)low_boundary;
1241 assert(min < max, "bad interval");
1242 uintptr_t diff = max ^ min;
1243
1244 // throw away enough low-order bits to make the diff vanish
1245 uintptr_t mask = (uintptr_t)(-1);
1246 while ((mask & diff) != 0)
1247 mask <<= 1;
1248 uintptr_t bits = (min & mask);
1249 assert(bits == (max & mask), "correct mask");
1250 // check an intermediate value between min and max, just to make sure:
1251 assert(bits == ((min + (max-min)/2) & mask), "correct mask");
1252
1253 // require address alignment, too:
1254 mask |= (alignSize - 1);
1255
1256 if (!(_verify_oop_mask == 0 && _verify_oop_bits == (uintptr_t)-1)) {
|