238 }
239
240 static void set_narrow_oop_base(address base) {
241 assert(UseCompressedOops, "no compressed oops?");
242 _narrow_oop._base = base;
243 }
244 static void set_narrow_klass_base(address base) {
245 assert(UseCompressedClassPointers, "no compressed klass ptrs?");
246 _narrow_klass._base = base;
247 }
248 static void set_narrow_oop_use_implicit_null_checks(bool use) {
249 assert(UseCompressedOops, "no compressed ptrs?");
250 _narrow_oop._use_implicit_null_checks = use;
251 }
252
253 // Debugging
254 static int _verify_count; // number of verifies done
255
256 // True during call to verify(). Should only be set/cleared in verify().
257 static bool _verify_in_progress;
258
259 static uintptr_t _verify_oop_mask;
260 static uintptr_t _verify_oop_bits;
261
262 static void calculate_verify_data(HeapWord* low_boundary, HeapWord* high_boundary) PRODUCT_RETURN;
263 static void compute_verify_oop_data();
264
265 public:
266 // Known classes in the VM
267 static Klass* boolArrayKlassObj() { return _boolArrayKlassObj; }
268 static Klass* byteArrayKlassObj() { return _byteArrayKlassObj; }
269 static Klass* charArrayKlassObj() { return _charArrayKlassObj; }
270 static Klass* intArrayKlassObj() { return _intArrayKlassObj; }
271 static Klass* shortArrayKlassObj() { return _shortArrayKlassObj; }
272 static Klass* longArrayKlassObj() { return _longArrayKlassObj; }
273 static Klass* singleArrayKlassObj() { return _singleArrayKlassObj; }
274 static Klass* doubleArrayKlassObj() { return _doubleArrayKlassObj; }
275
276 static Klass* objectArrayKlassObj() {
277 return _objectArrayKlassObj;
446 // Finalizer support.
447 static void run_finalizers_on_exit();
448
449 // Iteration
450
451 // Apply "f" to the addresses of all the direct heap pointers maintained
452 // as static fields of "Universe".
453 static void oops_do(OopClosure* f, bool do_all = false);
454
455 // CDS support
456 static void serialize(SerializeClosure* f, bool do_all = false);
457
458 // Apply "f" to all klasses for basic types (classes not present in
459 // SystemDictionary).
460 static void basic_type_classes_do(void f(Klass*));
461
462 // For sharing -- fill in a list of known vtable pointers.
463 static void init_self_patching_vtbl_list(void** list, int count);
464
465 // Debugging
466 static bool verify_in_progress() { return _verify_in_progress; }
467 static void verify(VerifyOption option, const char* prefix);
468 static void verify(const char* prefix) {
469 verify(VerifyOption_Default, prefix);
470 }
471 static void verify() {
472 verify("");
473 }
474
475 static int verify_count() { return _verify_count; }
476 static void print_on(outputStream* st);
477 static void print_heap_at_SIGBREAK();
478 static void print_heap_before_gc();
479 static void print_heap_after_gc();
480
481 // Change the number of dummy objects kept reachable by the full gc dummy
482 // array; this should trigger relocation in a sliding compaction collector.
483 debug_only(static bool release_fullgc_alot_dummy();)
484 // The non-oop pattern (see compiledIC.hpp, etc)
485 static void* non_oop_word();
|
238 }
239
240 static void set_narrow_oop_base(address base) {
241 assert(UseCompressedOops, "no compressed oops?");
242 _narrow_oop._base = base;
243 }
244 static void set_narrow_klass_base(address base) {
245 assert(UseCompressedClassPointers, "no compressed klass ptrs?");
246 _narrow_klass._base = base;
247 }
248 static void set_narrow_oop_use_implicit_null_checks(bool use) {
249 assert(UseCompressedOops, "no compressed ptrs?");
250 _narrow_oop._use_implicit_null_checks = use;
251 }
252
253 // Debugging
254 static int _verify_count; // number of verifies done
255
256 // True during call to verify(). Should only be set/cleared in verify().
257 static bool _verify_in_progress;
258 static long verify_flags;
259
260 static uintptr_t _verify_oop_mask;
261 static uintptr_t _verify_oop_bits;
262
263 static void calculate_verify_data(HeapWord* low_boundary, HeapWord* high_boundary) PRODUCT_RETURN;
264 static void compute_verify_oop_data();
265
266 public:
267 // Known classes in the VM
268 static Klass* boolArrayKlassObj() { return _boolArrayKlassObj; }
269 static Klass* byteArrayKlassObj() { return _byteArrayKlassObj; }
270 static Klass* charArrayKlassObj() { return _charArrayKlassObj; }
271 static Klass* intArrayKlassObj() { return _intArrayKlassObj; }
272 static Klass* shortArrayKlassObj() { return _shortArrayKlassObj; }
273 static Klass* longArrayKlassObj() { return _longArrayKlassObj; }
274 static Klass* singleArrayKlassObj() { return _singleArrayKlassObj; }
275 static Klass* doubleArrayKlassObj() { return _doubleArrayKlassObj; }
276
277 static Klass* objectArrayKlassObj() {
278 return _objectArrayKlassObj;
447 // Finalizer support.
448 static void run_finalizers_on_exit();
449
450 // Iteration
451
452 // Apply "f" to the addresses of all the direct heap pointers maintained
453 // as static fields of "Universe".
454 static void oops_do(OopClosure* f, bool do_all = false);
455
456 // CDS support
457 static void serialize(SerializeClosure* f, bool do_all = false);
458
459 // Apply "f" to all klasses for basic types (classes not present in
460 // SystemDictionary).
461 static void basic_type_classes_do(void f(Klass*));
462
463 // For sharing -- fill in a list of known vtable pointers.
464 static void init_self_patching_vtbl_list(void** list, int count);
465
466 // Debugging
467 enum VERIFY_FLAGS {
468 Verify_Threads = 1,
469 Verify_Heap = 2,
470 Verify_SymbolTable = 4,
471 Verify_StringTable = 8,
472 Verify_CodeCache = 16,
473 Verify_SystemDictionary = 32,
474 Verify_ClassLoaderDataGraph = 64,
475 Verify_MetaspaceAux = 128,
476 Verify_JNIHandles = 256,
477 Verify_CHeap = 512,
478 Verify_CodeCacheOops = 1024,
479 Verify_All = -1
480 };
481 static void initialize_verify_flags();
482 static bool should_verify_subset(uint subset);
483 static bool verify_in_progress() { return _verify_in_progress; }
484 static void verify(VerifyOption option, const char* prefix);
485 static void verify(const char* prefix) {
486 verify(VerifyOption_Default, prefix);
487 }
488 static void verify() {
489 verify("");
490 }
491
492 static int verify_count() { return _verify_count; }
493 static void print_on(outputStream* st);
494 static void print_heap_at_SIGBREAK();
495 static void print_heap_before_gc();
496 static void print_heap_after_gc();
497
498 // Change the number of dummy objects kept reachable by the full gc dummy
499 // array; this should trigger relocation in a sliding compaction collector.
500 debug_only(static bool release_fullgc_alot_dummy();)
501 // The non-oop pattern (see compiledIC.hpp, etc)
502 static void* non_oop_word();
|