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

@@ -2348,6 +2348,16 @@ static void asm_hiop(ASMState *as, IRIns *ir)
#endif
}
/* -- Profiling ----------------------------------------------------------- */
static void asm_prof(ASMState *as, IRIns *ir)
{
UNUSED(ir);
asm_guardcc(as, CC_NE);
emit_i8(as, HOOK_PROFILE);
emit_rma(as, XO_GROUP3b, XOg_TEST, &J2G(as->J)->hookmask);
}
/* -- Stack handling ------------------------------------------------------ */
/* Check Lua stack size for overflow. Use exit handler as fallback. */