summaryrefslogtreecommitdiff
path: root/client/profile.lua
blob: 47a9806ed4fe9674e7615de097a6c35a1fe19e23 (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}