1.1 --- a/src/share/vm/opto/output.cpp Thu Aug 06 00:08:57 2015 -0700 1.2 +++ b/src/share/vm/opto/output.cpp Tue Oct 17 12:58:25 2017 +0800 1.3 @@ -22,6 +22,12 @@ 1.4 * 1.5 */ 1.6 1.7 +/* 1.8 + * This file has been modified by Loongson Technology in 2015. These 1.9 + * modifications are Copyright (c) 2015 Loongson Technology, and are made 1.10 + * available on the same license terms set forth above. 1.11 + */ 1.12 + 1.13 #include "precompiled.hpp" 1.14 #include "asm/assembler.inline.hpp" 1.15 #include "code/compiledIC.hpp" 1.16 @@ -843,6 +849,29 @@ 1.17 // Add the safepoint in the DebugInfoRecorder 1.18 if( !mach->is_MachCall() ) { 1.19 mcall = NULL; 1.20 +#ifdef MIPS64 1.21 +/* 1.22 + 2013/10/30 Jin: safepoint_pc_offset should point to tha last instruction in safePoint. 1.23 + In X86 and sparc, their safePoints only contain one instruction. 1.24 + However, we should add current_offset with the size of safePoint in MIPS. 1.25 + 0x2d6ff22c: lw s2, 0x14(s2) 1.26 + last_pd->pc_offset()=308, pc_offset=304, bci=64 1.27 + last_pd->pc_offset()=312, pc_offset=312, bci=64 1.28 + /mnt/openjdk6/hotspot/src/share/vm/code/debugInfoRec.cpp, 289 , assert(last_pd->pc_offset() == pc_offset,"must be last pc") 1.29 + 1.30 + ;; Safepoint: 1.31 + ---> pc_offset=304 1.32 + 0x2d6ff230: lui at, 0x2b7a ; OopMap{s2=Oop s5=Oop t4=Oop off=308} 1.33 + ;*goto 1.34 + ; - java.util.Hashtable::get@64 (line 353) 1.35 + ---> last_pd(308) 1.36 + 0x2d6ff234: lw at, 0xffffc100(at) ;*goto 1.37 + ; - java.util.Hashtable::get@64 (line 353) 1.38 + ; {poll} 1.39 + 0x2d6ff238: addiu s0, zero, 0x0 1.40 +*/ 1.41 + safepoint_pc_offset += sfn->size(_regalloc) - 4; 1.42 +#endif 1.43 debug_info()->add_safepoint(safepoint_pc_offset, sfn->_oop_map); 1.44 } else { 1.45 mcall = mach->as_MachCall();