blob: e7eab0264b877cad7d794e915895fb67f9718779 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
local profile = require"jit.profile"
local function start(period,file)
local function cb(thread,samples,vmstate)
file:write(profile.dumpstack(thread,"pF l;",-100), vmstate, " ", samples, "\n")
end
profile.start("vli"..tonumber(period), cb)
end
local function stop() profile.stop() end
return {start=start,stop=stop}
|