40 // of the four lists below, depending on the type of reference.
41 // The linked occurs through the next field in class java/lang/ref/Reference.
42 //
43 // Afterwards, the discovered references are processed in decreasing
44 // order of reachability. Reference objects eligible for notification
45 // are linked to the static pending_list in class java/lang/ref/Reference,
46 // and the pending list lock object in the same class is notified.
47
48
49 class InstanceRefKlass: public InstanceKlass {
50 friend class InstanceKlass;
51 public:
52 static const KlassID ID = InstanceRefKlassID;
53
54 private:
55 InstanceRefKlass(const ClassFileParser& parser) : InstanceKlass(parser, InstanceKlass::_misc_kind_reference, ID) {}
56
57 public:
58 InstanceRefKlass() { assert(DumpSharedSpaces || UseSharedSpaces, "only for CDS"); }
59
60 // GC specific object visitors
61 //
62 #if INCLUDE_PARALLELGC
63 // Parallel Compact
64 void oop_pc_update_pointers(oop obj, ParCompactionManager* cm);
65 #endif
66
67 // Oop fields (and metadata) iterators
68 //
69 // The InstanceRefKlass iterators also support reference processing.
70
71
72 // Forward iteration
73 // Iterate over all oop fields and metadata.
74 template <typename T, class OopClosureType>
75 inline void oop_oop_iterate(oop obj, OopClosureType* closure);
76
77 // Reverse iteration
78 // Iterate over all oop fields and metadata.
79 template <typename T, class OopClosureType>
80 inline void oop_oop_iterate_reverse(oop obj, OopClosureType* closure);
81
82 // Bounded range iteration
83 // Iterate over all oop fields and metadata.
84 template <typename T, class OopClosureType>
85 inline void oop_oop_iterate_bounded(oop obj, OopClosureType* closure, MemRegion mr);
|
40 // of the four lists below, depending on the type of reference.
41 // The linked occurs through the next field in class java/lang/ref/Reference.
42 //
43 // Afterwards, the discovered references are processed in decreasing
44 // order of reachability. Reference objects eligible for notification
45 // are linked to the static pending_list in class java/lang/ref/Reference,
46 // and the pending list lock object in the same class is notified.
47
48
49 class InstanceRefKlass: public InstanceKlass {
50 friend class InstanceKlass;
51 public:
52 static const KlassID ID = InstanceRefKlassID;
53
54 private:
55 InstanceRefKlass(const ClassFileParser& parser) : InstanceKlass(parser, InstanceKlass::_misc_kind_reference, ID) {}
56
57 public:
58 InstanceRefKlass() { assert(DumpSharedSpaces || UseSharedSpaces, "only for CDS"); }
59
60 // Oop fields (and metadata) iterators
61 //
62 // The InstanceRefKlass iterators also support reference processing.
63
64
65 // Forward iteration
66 // Iterate over all oop fields and metadata.
67 template <typename T, class OopClosureType>
68 inline void oop_oop_iterate(oop obj, OopClosureType* closure);
69
70 // Reverse iteration
71 // Iterate over all oop fields and metadata.
72 template <typename T, class OopClosureType>
73 inline void oop_oop_iterate_reverse(oop obj, OopClosureType* closure);
74
75 // Bounded range iteration
76 // Iterate over all oop fields and metadata.
77 template <typename T, class OopClosureType>
78 inline void oop_oop_iterate_bounded(oop obj, OopClosureType* closure, MemRegion mr);
|