mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-07 23:24:09 +00:00
Use a different marker for hot calls.
This commit is contained in:
parent
3452bfcf8c
commit
e1905f498a
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -2518,14 +2518,15 @@ static void build_subroutines(BuildCtx *ctx, int cmov, int sse)
|
||||
#endif
|
||||
|
|
||||
|->vm_callhook: // Dispatch target for call hooks.
|
||||
| mov SAVE_PC, PC
|
||||
#if LJ_HASJIT
|
||||
| mov aword [DISPATCH+DISPATCH_J(L)], 0 // Marker for call hook.
|
||||
| jmp >1
|
||||
#endif
|
||||
|
|
||||
|->vm_hotcall: // Hot call counter underflow.
|
||||
#if LJ_HASJIT
|
||||
| mov aword [DISPATCH+DISPATCH_J(L)], L:RBa
|
||||
| mov SAVE_PC, PC
|
||||
| or PC, 1 // Marker for hot call.
|
||||
|1:
|
||||
#endif
|
||||
| lea RD, [BASE+NARGS:RD*8-8]
|
||||
@ -2534,10 +2535,12 @@ static void build_subroutines(BuildCtx *ctx, int cmov, int sse)
|
||||
| mov L:RB->top, RD
|
||||
| mov FCARG2, PC
|
||||
| mov FCARG1, L:RB
|
||||
| mov SAVE_PC, PC
|
||||
| call extern lj_dispatch_call@8 // (lua_State *L, const BCIns *pc)
|
||||
| // ASMFunction returned in eax/rax (RDa).
|
||||
| mov SAVE_PC, 0 // Invalidate for subsequent line hook.
|
||||
#if LJ_HASJIT
|
||||
| and PC, -2
|
||||
#endif
|
||||
| mov BASE, L:RB->base
|
||||
| mov RAa, RDa
|
||||
| mov RD, L:RB->top
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -409,8 +409,9 @@ ASMFunction LJ_FASTCALL lj_dispatch_call(lua_State *L, const BCIns *pc)
|
||||
#endif
|
||||
call_init(L, fn);
|
||||
#if LJ_HASJIT
|
||||
if (J->L) { /* Marker for hot call. */
|
||||
lj_trace_hot(J, pc);
|
||||
if ((uintptr_t)pc & 1) { /* Marker for hot call. */
|
||||
J->L = L;
|
||||
lj_trace_hot(J, (const BCIns *)((uintptr_t)pc & ~(uintptr_t)1));
|
||||
goto out;
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user