1.1 --- a/src/cpu/mips/vm/mips_64.ad Tue Apr 10 10:21:49 2018 +0800 1.2 +++ b/src/cpu/mips/vm/mips_64.ad Sat Jan 06 20:01:31 2018 +0800 1.3 @@ -538,9 +538,12 @@ 1.4 // Note that the code buffer's insts_mark is always relative to insts. 1.5 // That's why we must use the macroassembler to generate a handler. 1.6 MacroAssembler _masm(&cbuf); 1.7 - address base = 1.8 - __ start_a_stub(size_exception_handler()); 1.9 - if (base == NULL) return 0; // CodeBuffer::expand failed 1.10 + address base = __ start_a_stub(size_exception_handler()); 1.11 + if (base == NULL) { 1.12 + ciEnv::current()->record_failure("CodeCache is full"); 1.13 + return 0; // CodeBuffer::expand failed 1.14 + } 1.15 + 1.16 int offset = __ offset(); 1.17 1.18 __ block_comment("; emit_exception_handler"); 1.19 @@ -559,11 +562,12 @@ 1.20 // Note that the code buffer's insts_mark is always relative to insts. 1.21 // That's why we must use the macroassembler to generate a handler. 1.22 MacroAssembler _masm(&cbuf); 1.23 - address base = 1.24 - __ start_a_stub(size_deopt_handler()); 1.25 - 1.26 - // FIXME 1.27 - if (base == NULL) return 0; // CodeBuffer::expand failed 1.28 + address base = __ start_a_stub(size_deopt_handler()); 1.29 + if (base == NULL) { 1.30 + ciEnv::current()->record_failure("CodeCache is full"); 1.31 + return 0; // CodeBuffer::expand failed 1.32 + } 1.33 + 1.34 int offset = __ offset(); 1.35 1.36 __ block_comment("; emit_deopt_handler"); 1.37 @@ -613,9 +617,11 @@ 1.38 // That's why we must use the macroassembler to generate a stub. 1.39 MacroAssembler _masm(&cbuf); 1.40 1.41 - address base = 1.42 - __ start_a_stub(Compile::MAX_stubs_size); 1.43 - if (base == NULL) return; // CodeBuffer::expand failed 1.44 + address base = __ start_a_stub(Compile::MAX_stubs_size); 1.45 + if (base == NULL) { // CodeBuffer::expand failed 1.46 + ciEnv::current()->record_failure("CodeCache is full"); 1.47 + } 1.48 + 1.49 // static stub relocation stores the instruction address of the call 1.50 1.51 __ relocate(static_stub_Relocation::spec(mark), 0);