[9] RFR(S): 8130309: need to bailout cleanly if CompiledStaticCall::emit_to_interp_stub fails when codecache is out of space

Tobias Hartmann tobias.hartmann at oracle.com
Mon Jul 27 05:58:14 UTC 2015

On 24.07.2015 23:21, Dean Long wrote:
> If TraceJumps causes problems on Sparc, then I think the Sparc version of to_interp_stub_size() needs to be adjusted to take TraceJumps into account.

No, the Sparc version of to_interp_stub_size() already takes TraceJumps into account:

  90 int CompiledStaticCall::to_interp_stub_size() {
  91   // This doesn't need to be accurate but it must be larger or equal to
  92   // the real size of the stub.
  93   return (NativeMovConstReg::instruction_size +  // sethi/setlo;
  94           NativeJump::instruction_size + // sethi; jmp; nop
  95           (TraceJumps ? 20 * BytesPerInstWord : 0) );
  96 }

The problem is that the additional code needed for TraceJumps does not fit into the scratch buffer because we only allocate 'MAX_stubs_size' for stubs and cannot expand the buffer (see Compile::scratch_emit_size()).

Other solutions would be to increase 'MAX_stubs_size' (which does not make sense because this is only a debug case) or to not emit the stub if we are 'in_scratch_emit_size()'. I saw you filed JDK-8132344 which should take care of this issue in general.


> dl

More information about the hotspot-compiler-dev mailing list