580 // biasable prototype for instanceKlasses. There is no technical 581 // reason why it could not be done for arrayKlasses aside from 582 // wanting to reduce the initial scope of this optimization. There 583 // are potential problems in setting the bias pattern for 584 // JVM-internal oops. 585 inline void set_prototype_header(markOop header); 586 static ByteSize prototype_header_offset() { return in_ByteSize(offset_of(Klass, _prototype_header)); } 587 588 int biased_lock_revocation_count() const { return (int) _biased_lock_revocation_count; } 589 // Atomically increments biased_lock_revocation_count and returns updated value 590 int atomic_incr_biased_lock_revocation_count(); 591 void set_biased_lock_revocation_count(int val) { _biased_lock_revocation_count = (jint) val; } 592 jlong last_biased_lock_bulk_revocation_time() { return _last_biased_lock_bulk_revocation_time; } 593 void set_last_biased_lock_bulk_revocation_time(jlong cur_time) { _last_biased_lock_bulk_revocation_time = cur_time; } 594 595 TRACE_DEFINE_TRACE_ID_METHODS; 596 597 // garbage collection support 598 void oops_do(OopClosure* cl); 599 600 // Iff the class loader (or mirror for anonymous classes) is alive the 601 // Klass is considered alive. 602 // The is_alive closure passed in depends on the Garbage Collector used. 603 bool is_loader_alive(BoolObjectClosure* is_alive); 604 605 static void clean_weak_klass_links(BoolObjectClosure* is_alive, bool clean_alive_klasses = true); 606 static void clean_subklass_tree(BoolObjectClosure* is_alive) { 607 clean_weak_klass_links(is_alive, false /* clean_alive_klasses */); 608 } 609 610 // GC specific object visitors 611 // 612 #if INCLUDE_ALL_GCS 613 // Parallel Scavenge 614 virtual void oop_ps_push_contents( oop obj, PSPromotionManager* pm) = 0; 615 // Parallel Compact 616 virtual void oop_pc_follow_contents(oop obj, ParCompactionManager* cm) = 0; 617 virtual void oop_pc_update_pointers(oop obj, ParCompactionManager* cm) = 0; 618 #endif 619 | 580 // biasable prototype for instanceKlasses. There is no technical 581 // reason why it could not be done for arrayKlasses aside from 582 // wanting to reduce the initial scope of this optimization. There 583 // are potential problems in setting the bias pattern for 584 // JVM-internal oops. 585 inline void set_prototype_header(markOop header); 586 static ByteSize prototype_header_offset() { return in_ByteSize(offset_of(Klass, _prototype_header)); } 587 588 int biased_lock_revocation_count() const { return (int) _biased_lock_revocation_count; } 589 // Atomically increments biased_lock_revocation_count and returns updated value 590 int atomic_incr_biased_lock_revocation_count(); 591 void set_biased_lock_revocation_count(int val) { _biased_lock_revocation_count = (jint) val; } 592 jlong last_biased_lock_bulk_revocation_time() { return _last_biased_lock_bulk_revocation_time; } 593 void set_last_biased_lock_bulk_revocation_time(jlong cur_time) { _last_biased_lock_bulk_revocation_time = cur_time; } 594 595 TRACE_DEFINE_TRACE_ID_METHODS; 596 597 // garbage collection support 598 void oops_do(OopClosure* cl); 599 600 virtual void metaspace_pointers_do(MetaspaceClosure* iter); 601 virtual MetaspaceObj::Type type() const { return ClassType; } 602 603 // Iff the class loader (or mirror for anonymous classes) is alive the 604 // Klass is considered alive. 605 // The is_alive closure passed in depends on the Garbage Collector used. 606 bool is_loader_alive(BoolObjectClosure* is_alive); 607 608 static void clean_weak_klass_links(BoolObjectClosure* is_alive, bool clean_alive_klasses = true); 609 static void clean_subklass_tree(BoolObjectClosure* is_alive) { 610 clean_weak_klass_links(is_alive, false /* clean_alive_klasses */); 611 } 612 613 // GC specific object visitors 614 // 615 #if INCLUDE_ALL_GCS 616 // Parallel Scavenge 617 virtual void oop_ps_push_contents( oop obj, PSPromotionManager* pm) = 0; 618 // Parallel Compact 619 virtual void oop_pc_follow_contents(oop obj, ParCompactionManager* cm) = 0; 620 virtual void oop_pc_update_pointers(oop obj, ParCompactionManager* cm) = 0; 621 #endif 622 |