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

@@ -1738,6 +1738,17 @@ 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_asi(as, PPCI_ANDIDOT, RID_TMP, RID_TMP, HOOK_PROFILE);
emit_lsglptr(as, PPCI_LBZ, RID_TMP,
(int32_t)offsetof(global_State, hookmask));
}
/* -- Stack handling ------------------------------------------------------ */
/* Check Lua stack size for overflow. Use exit handler as fallback. */