comparison src/share/vm/runtime/frame.cpp @ 7182:c24f778e9401

Merge
author johnc
date Thu, 29 Nov 2012 11:23:15 -0800
parents d0aa87f04bd5
children d2f8c38e543d
comparison
equal deleted inserted replaced
7176:59c790074993 7182:c24f778e9401
877 int size = asc.size(); 877 int size = asc.size();
878 return (oop *)interpreter_frame_tos_at(size); 878 return (oop *)interpreter_frame_tos_at(size);
879 } 879 }
880 880
881 881
882 void frame::oops_interpreted_do(OopClosure* f, const RegisterMap* map, bool query_oop_map_cache) { 882 void frame::oops_interpreted_do(OopClosure* f, CLDToOopClosure* cld_f,
883 const RegisterMap* map, bool query_oop_map_cache) {
883 assert(is_interpreted_frame(), "Not an interpreted frame"); 884 assert(is_interpreted_frame(), "Not an interpreted frame");
884 assert(map != NULL, "map must be set"); 885 assert(map != NULL, "map must be set");
885 Thread *thread = Thread::current(); 886 Thread *thread = Thread::current();
886 methodHandle m (thread, interpreter_frame_method()); 887 methodHandle m (thread, interpreter_frame_method());
887 jint bci = interpreter_frame_bci(); 888 jint bci = interpreter_frame_bci();
904 #endif 905 #endif
905 current->oops_do(f); 906 current->oops_do(f);
906 } 907 }
907 908
908 // process fixed part 909 // process fixed part
910 if (cld_f != NULL) {
911 // The method pointer in the frame might be the only path to the method's
912 // klass, and the klass needs to be kept alive while executing. The GCs
913 // don't trace through method pointers, so typically in similar situations
914 // the mirror or the class loader of the klass are installed as a GC root.
915 // To minimze the overhead of doing that here, we ask the GC to pass down a
916 // closure that knows how to keep klasses alive given a ClassLoaderData.
917 cld_f->do_cld(m->method_holder()->class_loader_data());
918 }
919
909 #if !defined(PPC) || defined(ZERO) 920 #if !defined(PPC) || defined(ZERO)
910 if (m->is_native()) { 921 if (m->is_native()) {
911 #ifdef CC_INTERP 922 #ifdef CC_INTERP
912 interpreterState istate = get_interpreterState(); 923 interpreterState istate = get_interpreterState();
913 f->do_oop((oop*)&istate->_oop_temp); 924 f->do_oop((oop*)&istate->_oop_temp);
1106 // Traverse the Handle Block saved in the entry frame 1117 // Traverse the Handle Block saved in the entry frame
1107 entry_frame_call_wrapper()->oops_do(f); 1118 entry_frame_call_wrapper()->oops_do(f);
1108 } 1119 }
1109 1120
1110 1121
1111 void frame::oops_do_internal(OopClosure* f, CodeBlobClosure* cf, RegisterMap* map, bool use_interpreter_oop_map_cache) { 1122 void frame::oops_do_internal(OopClosure* f, CLDToOopClosure* cld_f, CodeBlobClosure* cf, RegisterMap* map, bool use_interpreter_oop_map_cache) {
1112 #ifndef PRODUCT 1123 #ifndef PRODUCT
1113 // simulate GC crash here to dump java thread in error report 1124 // simulate GC crash here to dump java thread in error report
1114 if (CrashGCForDumpingJavaThread) { 1125 if (CrashGCForDumpingJavaThread) {
1115 char *t = NULL; 1126 char *t = NULL;
1116 *t = 'c'; 1127 *t = 'c';
1117 } 1128 }
1118 #endif 1129 #endif
1119 if (is_interpreted_frame()) { 1130 if (is_interpreted_frame()) {
1120 oops_interpreted_do(f, map, use_interpreter_oop_map_cache); 1131 oops_interpreted_do(f, cld_f, map, use_interpreter_oop_map_cache);
1121 } else if (is_entry_frame()) { 1132 } else if (is_entry_frame()) {
1122 oops_entry_do(f, map); 1133 oops_entry_do(f, map);
1123 } else if (CodeCache::contains(pc())) { 1134 } else if (CodeCache::contains(pc())) {
1124 oops_code_blob_do(f, cf, map); 1135 oops_code_blob_do(f, cf, map);
1125 #ifdef SHARK 1136 #ifdef SHARK
1276 oop* p = (oop*) interpreter_frame_local_at(0); 1287 oop* p = (oop*) interpreter_frame_local_at(0);
1277 // make sure we have the right receiver type 1288 // make sure we have the right receiver type
1278 } 1289 }
1279 } 1290 }
1280 COMPILER2_PRESENT(assert(DerivedPointerTable::is_empty(), "must be empty before verify");) 1291 COMPILER2_PRESENT(assert(DerivedPointerTable::is_empty(), "must be empty before verify");)
1281 oops_do_internal(&VerifyOopClosure::verify_oop, NULL, (RegisterMap*)map, false); 1292 oops_do_internal(&VerifyOopClosure::verify_oop, NULL, NULL, (RegisterMap*)map, false);
1282 } 1293 }
1283 1294
1284 1295
1285 #ifdef ASSERT 1296 #ifdef ASSERT
1286 bool frame::verify_return_pc(address x) { 1297 bool frame::verify_return_pc(address x) {