Skip to content

Commit

Permalink
Fix traces where we attempt to get downrec but don't.
Browse files Browse the repository at this point in the history
  • Loading branch information
djwatson committed Sep 18, 2024
1 parent 3a15690 commit 3bf0606
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions src/record.c
Original file line number Diff line number Diff line change
Expand Up @@ -1964,12 +1964,19 @@ bool record_instr(uint32_t *pc, gc_obj *frame, int64_t argcnt) {
return record_instr(pc, frame, argcnt);
}

if (verbose) {
printf("Record stop JFUNC %s\n", ins_names[INS_OP(link_trace->startpc)]);
if (true && arrlen(downrec) <= 1 && INS_OP(*pc_start) == RET1 && side_exit == nullptr) {
if (verbose) {
printf("Record abort DOWNREC JFUNC %s\n", ins_names[INS_OP(link_trace->startpc)]);
}
record_abort();
} else {
if (verbose) {
printf("Record stop JFUNC %s\n", ins_names[INS_OP(link_trace->startpc)]);
}
check_emit_funcv(link_trace->startpc, pc, frame, argcnt);
record_stop(pc, link_trace->num);
// No stack top tracking
}
check_emit_funcv(link_trace->startpc, pc, frame, argcnt);
record_stop(pc, link_trace->num);
// No stack top tracking
return true;
}
case JLOOP: {
Expand Down

0 comments on commit 3bf0606

Please sign in to comment.