Address fp = VM.traceInterface.skipOwnFramesAndDump(typeRef); if (isImmortal && allocType.EQ(TRACE_EXACT_ALLOC)) trace.push(TRACE_EXACT_IMMORTAL_ALLOC); else if (isImmortal) trace.push(TRACE_IMMORTAL_ALLOC); else trace.push(allocType); trace.push(VM.traceInterface.getOID(ref)); trace.push(Word.fromInt(bytes - VM.traceInterface.getHeaderSize())); trace.push(fp.toWord()); trace.push(Word.fromInt(0 )); trace.push(TRACE_TIB_SET); trace.push(VM.traceInterface.getOID(ref)); trace.push(VM.traceInterface.getOID(typeRef));
if (!MERLIN_ANALYSIS) { Address fp = (TraceBuffer.OMIT_ALLOCS) ? Address.zero() : VM.traceInterface.skipOwnFramesAndDump(typeRef); if (isImmortal && allocType.EQ(TRACE_EXACT_ALLOC)) trace.push(TRACE_EXACT_IMMORTAL_ALLOC); else if (isImmortal) trace.push(TRACE_IMMORTAL_ALLOC); else trace.push(allocType); trace.push(VM.traceInterface.getOID(ref)); trace.push(Word.fromInt(bytes - VM.traceInterface.getHeaderSize())); trace.push(fp.toWord()); trace.push(Word.fromInt(0 )); trace.push(TRACE_TIB_SET); trace.push(VM.traceInterface.getOID(ref)); trace.push(VM.traceInterface.getOID(typeRef)); }
  public static final void traceAlloc(boolean isImmortal, ObjectReference ref,      ObjectReference typeRef, int bytes)      throws LogicallyUninterruptiblePragma, NoInlinePragma {    /* Assert that this isn't the result of tracing */    if (VM.VERIFY_ASSERTIONS) VM.assertions._assert(!traceBusy);    boolean gcAllowed = VM.traceInterface.gcEnabled() && Plan.isInitialized()        && !Plan.gcInProgress();    /* Test if it is time/possible for an exact allocation. */    Word oid = VM.traceInterface.getOID(ref);    Word allocType;    if (gcAllowed        && (oid.GE(lastGC.plus(Word.fromInt(Options.traceRate.getValue())))))      allocType = TRACE_EXACT_ALLOC;    else {      allocType = TRACE_ALLOC;    }    /* Add the allocation into the trace. */    traceBusy = true;    /* Perform the necessary work for death times. */    if (allocType.EQ(TRACE_EXACT_ALLOC)) {      if (MERLIN_ANALYSIS) {        lastGC = VM.traceInterface.getOID(ref);        VM.traceInterface.updateTime(lastGC);        VM.collection.triggerCollectionNow(Collection.INTERNAL_GC_TRIGGER);      } else {        VM.collection.triggerCollectionNow(Collection.RESOURCE_GC_TRIGGER);        lastGC = VM.traceInterface.getOID(ref);      }    }    Address fp = VM.traceInterface.skipOwnFramesAndDump(typeRef);    if (isImmortal && allocType.EQ(TRACE_EXACT_ALLOC))      trace.push(TRACE_EXACT_IMMORTAL_ALLOC);    else if (isImmortal)      trace.push(TRACE_IMMORTAL_ALLOC);    else      trace.push(allocType);    trace.push(VM.traceInterface.getOID(ref));    trace.push(Word.fromInt(bytes - VM.traceInterface.getHeaderSize()));    trace.push(fp.toWord());    trace.push(Word.fromInt(0 /* VM_Magic.getThreadId() */));    trace.push(TRACE_TIB_SET);    trace.push(VM.traceInterface.getOID(ref));    trace.push(VM.traceInterface.getOID(typeRef));    trace.process();    traceBusy = false;  }