1 ----------------------------------------------------------------------------
2 -- LuaJIT profiler zones.
4 -- Copyright (C) 2005-2023 Mike Pall. All rights reserved.
5 -- Released under the MIT license. See Copyright Notice in luajit.h
6 ----------------------------------------------------------------------------
8 -- This module implements a simple hierarchical zone model.
12 -- local zone = require("jit.zone")
17 -- print(zone:get()) --> "A*"
21 -- print(zone:get()) --> "AI"
25 ----------------------------------------------------------------------------
27 local remove = table.remove
31 for i
=#t
,1,-1 do t
[i
] = nil end
37 __call
= function(t
, zone
)
41 return (assert(remove(t
), "empty zone stack"))