src/cpu/x86/vm/stubGenerator_x86_64.cpp

Print this page
rev 3090 : 7144405: JumbleGC002 assert(m->offset() == pc_offset) failed: oopmap not found
Summary: oop map needs pc stored in frame anchor in StubGenerator::generate_throw_exception()
Reviewed-by:


2980     // Set up last_Java_sp and last_Java_fp
2981     address the_pc = __ pc();
2982     __ set_last_Java_frame(rsp, rbp, the_pc);
2983     __ andptr(rsp, -(StackAlignmentInBytes));    // Align stack
2984 
2985     // Call runtime
2986     if (arg1 != noreg) {
2987       assert(arg2 != c_rarg1, "clobbered");
2988       __ movptr(c_rarg1, arg1);
2989     }
2990     if (arg2 != noreg) {
2991       __ movptr(c_rarg2, arg2);
2992     }
2993     __ movptr(c_rarg0, r15_thread);
2994     BLOCK_COMMENT("call runtime_entry");
2995     __ call(RuntimeAddress(runtime_entry));
2996 
2997     // Generate oop map
2998     OopMap* map = new OopMap(framesize, 0);
2999 
3000     oop_maps->add_gc_map(__ pc() - start, map);
3001 
3002     __ reset_last_Java_frame(true, true);
3003 
3004     __ leave(); // required for proper stackwalking of RuntimeStub frame
3005 
3006     // check for pending exceptions
3007 #ifdef ASSERT
3008     Label L;
3009     __ cmpptr(Address(r15_thread, Thread::pending_exception_offset()),
3010             (int32_t) NULL_WORD);
3011     __ jcc(Assembler::notEqual, L);
3012     __ should_not_reach_here();
3013     __ bind(L);
3014 #endif // ASSERT
3015     __ jump(RuntimeAddress(StubRoutines::forward_exception_entry()));
3016 
3017 
3018     // codeBlob framesize is in words (not VMRegImpl::slot_size)
3019     RuntimeStub* stub =
3020       RuntimeStub::new_runtime_stub(name,




2980     // Set up last_Java_sp and last_Java_fp
2981     address the_pc = __ pc();
2982     __ set_last_Java_frame(rsp, rbp, the_pc);
2983     __ andptr(rsp, -(StackAlignmentInBytes));    // Align stack
2984 
2985     // Call runtime
2986     if (arg1 != noreg) {
2987       assert(arg2 != c_rarg1, "clobbered");
2988       __ movptr(c_rarg1, arg1);
2989     }
2990     if (arg2 != noreg) {
2991       __ movptr(c_rarg2, arg2);
2992     }
2993     __ movptr(c_rarg0, r15_thread);
2994     BLOCK_COMMENT("call runtime_entry");
2995     __ call(RuntimeAddress(runtime_entry));
2996 
2997     // Generate oop map
2998     OopMap* map = new OopMap(framesize, 0);
2999 
3000     oop_maps->add_gc_map(the_pc - start, map);
3001 
3002     __ reset_last_Java_frame(true, true);
3003 
3004     __ leave(); // required for proper stackwalking of RuntimeStub frame
3005 
3006     // check for pending exceptions
3007 #ifdef ASSERT
3008     Label L;
3009     __ cmpptr(Address(r15_thread, Thread::pending_exception_offset()),
3010             (int32_t) NULL_WORD);
3011     __ jcc(Assembler::notEqual, L);
3012     __ should_not_reach_here();
3013     __ bind(L);
3014 #endif // ASSERT
3015     __ jump(RuntimeAddress(StubRoutines::forward_exception_entry()));
3016 
3017 
3018     // codeBlob framesize is in words (not VMRegImpl::slot_size)
3019     RuntimeStub* stub =
3020       RuntimeStub::new_runtime_stub(name,