@@ -116,15 +116,13 @@ template<typename OopClosureType>
116
116
class StackChunkOopIterateFilterClosure : public OopClosure {
117
117
private:
118
118
OopClosureType* const _closure;
119
- stackChunkOop _chunk;
120
119
MemRegion _bound;
121
120
122
121
public:
123
122
int _num_oops;
124
123
125
- StackChunkOopIterateFilterClosure (OopClosureType* closure, stackChunkOop chunk, MemRegion bound)
124
+ StackChunkOopIterateFilterClosure (OopClosureType* closure, MemRegion bound)
126
125
: _closure(closure),
127
- _chunk (chunk),
128
126
_bound (bound),
129
127
_num_oops(0 ) {}
130
128
@@ -134,7 +132,6 @@ class StackChunkOopIterateFilterClosure: public OopClosure {
134
132
template <typename T>
135
133
void do_oop_work (T* p) {
136
134
if (_bound.contains (p)) {
137
- T before = *p;
138
135
Devirtualizer::do_oop (_closure, p);
139
136
_num_oops++;
140
137
}
@@ -168,7 +165,7 @@ void InstanceStackChunkKlass::mark_methods(stackChunkOop chunk, OopIterateClosur
168
165
chunk->iterate_stack (&closure);
169
166
}
170
167
171
- class OopOopIterateStackClosure {
168
+ class OopIterateStackChunkFrameClosure {
172
169
stackChunkOop _chunk;
173
170
OopIterateClosure* const _closure;
174
171
MemRegion _bound;
@@ -178,7 +175,7 @@ class OopOopIterateStackClosure {
178
175
int _num_frames;
179
176
int _num_oops;
180
177
181
- OopOopIterateStackClosure (stackChunkOop chunk, OopIterateClosure* closure, MemRegion mr)
178
+ OopIterateStackChunkFrameClosure (stackChunkOop chunk, OopIterateClosure* closure, MemRegion mr)
182
179
: _chunk(chunk),
183
180
_closure (closure),
184
181
_bound(mr),
@@ -195,7 +192,7 @@ class OopOopIterateStackClosure {
195
192
MarkMethodsStackClosure (_closure).do_frame (f, map);
196
193
}
197
194
198
- StackChunkOopIterateFilterClosure<OopIterateClosure> cl (_closure, _chunk, _bound);
195
+ StackChunkOopIterateFilterClosure<OopIterateClosure> cl (_closure, _bound);
199
196
f.iterate_oops (&cl, map);
200
197
_num_oops += cl._num_oops ;
201
198
@@ -204,7 +201,7 @@ class OopOopIterateStackClosure {
204
201
};
205
202
206
203
void InstanceStackChunkKlass::oop_oop_iterate_stack_slow (stackChunkOop chunk, OopIterateClosure* closure, MemRegion mr) {
207
- OopOopIterateStackClosure frame_closure (chunk, closure, mr);
204
+ OopIterateStackChunkFrameClosure frame_closure (chunk, closure, mr);
208
205
chunk->iterate_stack (&frame_closure);
209
206
210
207
assert (frame_closure._num_frames >= 0 , " " );
0 commit comments