Low-overhead profiler, part 4: JIT compiler support.

This commit is contained in:
Mike Pall
2013-09-08 02:53:23 +02:00
parent d3d30d389b
commit d1194a82eb
12 changed files with 151 additions and 12 deletions

View File

@@ -1562,6 +1562,17 @@ static void asm_hiop(ASMState *as, IRIns *ir)
#endif
}
/* -- Profiling ----------------------------------------------------------- */
static void asm_prof(ASMState *as, IRIns *ir)
{
UNUSED(ir);
asm_guard(as, MIPSI_BNE, RID_TMP, RID_ZERO);
emit_tsi(as, MIPSI_ANDI, RID_TMP, RID_TMP, HOOK_PROFILE);
emit_lsglptr(as, MIPSI_LBU, RID_TMP,
(int32_t)offsetof(global_State, hookmask));
}
/* -- Stack handling ------------------------------------------------------ */
/* Check Lua stack size for overflow. Use exit handler as fallback. */