Created
August 24, 2021 14:22
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local table_new = require "table.new" | |
local function payload() | |
local _ = table_new(10, 0) | |
for i = 1, 10 do | |
_[i] = "memprof-str-"..i | |
end | |
_ = nil | |
collectgarbage() | |
end | |
-- 5 allocations from interp and 5 allocations | |
-- from the trace. | |
jit.opt.start(3, "hotloop=4") | |
jit.flush() | |
for _ = 1, 100500 do | |
payload() | |
-- Force JIT to regenerate the trace and create | |
-- new symtab entry. | |
jit.flush() | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment