Skip to content

Instantly share code, notes, and snippets.

@jnthn
Created July 9, 2014 10:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jnthn/71d9084a495494f5bf2f to your computer and use it in GitHub Desktop.
Save jnthn/71d9084a495494f5bf2f to your computer and use it in GitHub Desktop.
diff --git a/src/core/interp.c b/src/core/interp.c
index 9a84b61..6c3bc73 100644
--- a/src/core/interp.c
+++ b/src/core/interp.c
@@ -4372,6 +4372,7 @@ void MVM_interp_run(MVMThreadContext *tc, void (*initial_invoke)(MVMThreadContex
goto NEXT;
OP(sp_log):
if (tc->cur_frame->spesh_log_idx >= 0) {
+printf("logging at %d\n", (int)(GET_UI16(cur_op, 2) * MVM_SPESH_LOG_RUNS + tc->cur_frame->spesh_log_idx));
MVM_ASSIGN_REF(tc, &(tc->cur_frame->static_info->common.header),
tc->cur_frame->spesh_log_slots[
GET_UI16(cur_op, 2) * MVM_SPESH_LOG_RUNS + tc->cur_frame->spesh_log_idx
diff --git a/src/spesh/osr.c b/src/spesh/osr.c
index 2b03a7d..f93825d 100644
--- a/src/spesh/osr.c
+++ b/src/spesh/osr.c
@@ -55,6 +55,7 @@ void MVM_spesh_osr(MVMThreadContext *tc) {
tc->cur_frame->effective_handlers = specialized->handlers;
tc->cur_frame->effective_spesh_slots = specialized->spesh_slots;
tc->cur_frame->spesh_log_slots = specialized->log_slots;
+printf("OSR set up with %d log slots\n", specialized->num_log_slots);
tc->cur_frame->spesh_cand = specialized;
tc->cur_frame->spesh_log_idx = 0;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment