1041 void frame::oops_interpreted_arguments_do(symbolHandle signature, bool is_static, OopClosure* f) { |
1041 void frame::oops_interpreted_arguments_do(symbolHandle signature, bool is_static, OopClosure* f) { |
1042 InterpretedArgumentOopFinder finder(signature, is_static, this, f); |
1042 InterpretedArgumentOopFinder finder(signature, is_static, this, f); |
1043 finder.oops_do(); |
1043 finder.oops_do(); |
1044 } |
1044 } |
1045 |
1045 |
1046 void frame::oops_code_blob_do(OopClosure* f, const RegisterMap* reg_map) { |
1046 void frame::oops_code_blob_do(OopClosure* f, CodeBlobClosure* cf, const RegisterMap* reg_map) { |
1047 assert(_cb != NULL, "sanity check"); |
1047 assert(_cb != NULL, "sanity check"); |
1048 if (_cb->oop_maps() != NULL) { |
1048 if (_cb->oop_maps() != NULL) { |
1049 OopMapSet::oops_do(this, reg_map, f); |
1049 OopMapSet::oops_do(this, reg_map, f); |
1050 |
1050 |
1051 // Preserve potential arguments for a callee. We handle this by dispatching |
1051 // Preserve potential arguments for a callee. We handle this by dispatching |
1056 } |
1056 } |
1057 // In cases where perm gen is collected, GC will want to mark |
1057 // In cases where perm gen is collected, GC will want to mark |
1058 // oops referenced from nmethods active on thread stacks so as to |
1058 // oops referenced from nmethods active on thread stacks so as to |
1059 // prevent them from being collected. However, this visit should be |
1059 // prevent them from being collected. However, this visit should be |
1060 // restricted to certain phases of the collection only. The |
1060 // restricted to certain phases of the collection only. The |
1061 // closure answers whether it wants nmethods to be traced. |
1061 // closure decides how it wants nmethods to be traced. |
1062 // (All CodeBlob subtypes other than NMethod currently have |
1062 if (cf != NULL) |
1063 // an empty oops_do() method. |
1063 cf->do_code_blob(_cb); |
1064 if (f->do_nmethods()) { |
|
1065 _cb->oops_do(f); |
|
1066 } |
|
1067 } |
|
1068 |
|
1069 void frame::nmethods_code_blob_do() { |
|
1070 assert(_cb != NULL, "sanity check"); |
|
1071 |
|
1072 // If we see an activation belonging to a non_entrant nmethod, we mark it. |
|
1073 if (_cb->is_nmethod() && ((nmethod *)_cb)->is_not_entrant()) { |
|
1074 ((nmethod*)_cb)->mark_as_seen_on_stack(); |
|
1075 } |
|
1076 } |
1064 } |
1077 |
1065 |
1078 class CompiledArgumentOopFinder: public SignatureInfo { |
1066 class CompiledArgumentOopFinder: public SignatureInfo { |
1079 protected: |
1067 protected: |
1080 OopClosure* _f; |
1068 OopClosure* _f; |
1199 // Traverse the Handle Block saved in the entry frame |
1187 // Traverse the Handle Block saved in the entry frame |
1200 entry_frame_call_wrapper()->oops_do(f); |
1188 entry_frame_call_wrapper()->oops_do(f); |
1201 } |
1189 } |
1202 |
1190 |
1203 |
1191 |
1204 void frame::oops_do_internal(OopClosure* f, RegisterMap* map, bool use_interpreter_oop_map_cache) { |
1192 void frame::oops_do_internal(OopClosure* f, CodeBlobClosure* cf, RegisterMap* map, bool use_interpreter_oop_map_cache) { |
1205 if (is_interpreted_frame()) { oops_interpreted_do(f, map, use_interpreter_oop_map_cache); |
1193 if (is_interpreted_frame()) { oops_interpreted_do(f, map, use_interpreter_oop_map_cache); |
1206 } else if (is_entry_frame()) { oops_entry_do (f, map); |
1194 } else if (is_entry_frame()) { oops_entry_do (f, map); |
1207 } else if (CodeCache::contains(pc())) { oops_code_blob_do (f, map); |
1195 } else if (CodeCache::contains(pc())) { oops_code_blob_do (f, cf, map); |
1208 } else { |
1196 } else { |
1209 ShouldNotReachHere(); |
1197 ShouldNotReachHere(); |
1210 } |
1198 } |
1211 } |
1199 } |
1212 |
1200 |
1213 void frame::nmethods_do() { |
1201 void frame::nmethods_do(CodeBlobClosure* cf) { |
1214 if (_cb != NULL && _cb->is_nmethod()) { |
1202 if (_cb != NULL && _cb->is_nmethod()) { |
1215 nmethods_code_blob_do(); |
1203 cf->do_code_blob(_cb); |
1216 } |
1204 } |
1217 } |
1205 } |
1218 |
1206 |
1219 |
1207 |
1220 void frame::gc_prologue() { |
1208 void frame::gc_prologue() { |
1356 oop* p = (oop*) interpreter_frame_local_at(0); |
1344 oop* p = (oop*) interpreter_frame_local_at(0); |
1357 // make sure we have the right receiver type |
1345 // make sure we have the right receiver type |
1358 } |
1346 } |
1359 } |
1347 } |
1360 COMPILER2_PRESENT(assert(DerivedPointerTable::is_empty(), "must be empty before verify");) |
1348 COMPILER2_PRESENT(assert(DerivedPointerTable::is_empty(), "must be empty before verify");) |
1361 oops_do_internal(&VerifyOopClosure::verify_oop, (RegisterMap*)map, false); |
1349 oops_do_internal(&VerifyOopClosure::verify_oop, NULL, (RegisterMap*)map, false); |
1362 } |
1350 } |
1363 |
1351 |
1364 |
1352 |
1365 #ifdef ASSERT |
1353 #ifdef ASSERT |
1366 bool frame::verify_return_pc(address x) { |
1354 bool frame::verify_return_pc(address x) { |