---------------------------------------------------------------------------- -- LuaJIT profiler zones. -- -- Copyright (C) 2005-2022 Mike Pall. All rights reserved. -- Released under the MIT license. See Copyright Notice in luajit.h ---------------------------------------------------------------------------- -- -- This module implements a simple hierarchical zone model. -- -- Example usage: -- -- local zone = require("jit.zone") -- zone("AI") -- ... -- zone("A*") -- ... -- print(zone:get()) --> "A*" -- ... -- zone() -- ... -- print(zone:get()) --> "AI" -- ... -- zone() -- ---------------------------------------------------------------------------- local remove = table.remove return setmetatable({ flush = function(t) for i=#t,1,-1 do t[i] = nil end end, get = function(t) return t[#t] end }, { __call = function(t, zone) if zone then t[#t+1] = zone else return (assert(remove(t), "empty zone stack")) end end })
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
bc.lua | File | 6.5 KB | 0644 |
|
bcsave.lua | File | 19.29 KB | 0644 |
|
dis_arm.lua | File | 18.89 KB | 0644 |
|
dis_arm64.lua | File | 30.16 KB | 0644 |
|
dis_arm64be.lua | File | 619 B | 0644 |
|
dis_mips.lua | File | 21.49 KB | 0644 |
|
dis_mips64.lua | File | 706 B | 0644 |
|
dis_mips64el.lua | File | 717 B | 0644 |
|
dis_mipsel.lua | File | 715 B | 0644 |
|
dis_ppc.lua | File | 19.83 KB | 0644 |
|
dis_x64.lua | File | 712 B | 0644 |
|
dis_x86.lua | File | 33.03 KB | 0644 |
|
dump.lua | File | 20.3 KB | 0644 |
|
p.lua | File | 8.96 KB | 0644 |
|
v.lua | File | 5.65 KB | 0644 |
|
vmdef.lua | File | 8.1 KB | 0644 |
|
zone.lua | File | 1002 B | 0644 |
|