@@ -89,29 +89,6 @@ void InstanceStackChunkKlass::oop_print_on(oop obj, outputStream* st) {
89
89
}
90
90
#endif
91
91
92
- class DerelativizeDerivedOopClosure : public DerivedOopClosure {
93
- public:
94
- virtual void do_derived_oop (oop* base_loc, derived_pointer* derived_loc) override {
95
- // The ordering in the following is crucial
96
- OrderAccess::loadload ();
97
- oop base = Atomic::load (base_loc);
98
- if (base != nullptr ) {
99
- assert (!CompressedOops::is_base (base), " " );
100
- ZGC_ONLY (assert (ZAddress::is_good (cast_from_oop<uintptr_t >(base)), " " );)
101
-
102
- OrderAccess::loadload ();
103
- intptr_t offset = Atomic::load ((intptr_t *)derived_loc); // *derived_loc;
104
-
105
- // at this point, we've seen a non-offset value *after* we've read the base, but we write the offset *before* fixing the base,
106
- // so we are guaranteed that the value in derived_loc is consistent with base (i.e. points into the object).
107
- if (offset <= 0 ) {
108
- offset = -offset;
109
- Atomic::store ((intptr_t *)derived_loc, cast_from_oop<intptr_t >(base) + offset);
110
- }
111
- }
112
- }
113
- };
114
-
115
92
template <typename OopClosureType>
116
93
class StackChunkOopIterateFilterClosure : public OopClosure {
117
94
private:
@@ -218,40 +195,6 @@ static inline oop safe_load(P* addr) {
218
195
}
219
196
#endif
220
197
221
- class UncompressOopsOopClosure : public OopClosure {
222
- public:
223
- void do_oop (oop* p) override {
224
- assert (UseCompressedOops, " Only needed with compressed oops" );
225
- oop obj = CompressedOops::decode (*(narrowOop*)p);
226
- assert (obj == nullptr || dbg_is_good_oop (obj), " p: " INTPTR_FORMAT " obj: " INTPTR_FORMAT, p2i (p), p2i ((oopDesc*)obj));
227
- *p = obj;
228
- }
229
-
230
- void do_oop (narrowOop* p) override {}
231
- };
232
-
233
- template <typename RegisterMapT>
234
- void InstanceStackChunkKlass::fix_thawed_frame (stackChunkOop chunk, const frame& f, const RegisterMapT* map) {
235
- if (chunk->has_bitmap () && UseCompressedOops) {
236
- UncompressOopsOopClosure oop_closure;
237
- if (f.is_interpreted_frame ()) {
238
- f.oops_interpreted_do (&oop_closure, nullptr );
239
- } else {
240
- OopMapDo<UncompressOopsOopClosure, DerivedOopClosure, SkipNullValue> visitor (&oop_closure, nullptr );
241
- visitor.oops_do (&f, map, f.oop_map ());
242
- }
243
- }
244
-
245
- if (f.is_compiled_frame () && f.oop_map ()->has_derived_oops ()) {
246
- DerelativizeDerivedOopClosure derived_closure;
247
- OopMapDo<OopClosure, DerelativizeDerivedOopClosure, SkipNullValue> visitor (nullptr , &derived_closure);
248
- visitor.oops_do (&f, map, f.oop_map ());
249
- }
250
- }
251
-
252
- template void InstanceStackChunkKlass::fix_thawed_frame (stackChunkOop chunk, const frame& f, const RegisterMap* map);
253
- template void InstanceStackChunkKlass::fix_thawed_frame (stackChunkOop chunk, const frame& f, const SmallRegisterMap* map);
254
-
255
198
#ifdef ASSERT
256
199
257
200
template <typename T>
0 commit comments