Fix interaction between profiler hooks and finalizers.
Thanks to Julien Desgats.
This commit is contained in:
@@ -153,7 +153,7 @@ static void profile_trigger(ProfileState *ps)
|
||||
profile_lock(ps);
|
||||
ps->samples++; /* Always increment number of samples. */
|
||||
mask = g->hookmask;
|
||||
if (!(mask & (HOOK_PROFILE|HOOK_VMEVENT))) { /* Set profile hook. */
|
||||
if (!(mask & (HOOK_PROFILE|HOOK_VMEVENT|HOOK_GC))) { /* Set profile hook. */
|
||||
int st = g->vmstate;
|
||||
ps->vmstate = st >= 0 ? 'N' :
|
||||
st == ~LJ_VMST_INTERP ? 'I' :
|
||||
|
||||
Reference in New Issue
Block a user