[2pt] Report all JIT-related allocations as internal
Nobody has claimed this yet.
- Dominant language
- CSS
- Stars
- 15
- Forks
- 49
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 3
Description
Product: Tarantool
Since: 2.10
Root document: https://www.tarantool.io/en/doc/latest/book/app_server/luajit_memprof/
Dev issue: https://github.com/tarantool/tarantool/issues/5679
SME: @ igormunkin , @ Buristan
Details
The memory profiler reports the source line as 0 if a trace or other JIT-related stuff is allocated inside some Lua chunk.
For example, if we have the <test.lua> file with the following code
local f1, msg1, errno1 = misc.memprof.start("/tmp/tmp_memprofile.bin")
for _ = 1, 100 do
local _ = {_, _}
end
we get the following output from the profiler parser.
ALLOCATIONS
@test.lua:0, line 3: 57 3192 0
@test.lua:0, line 0: 4 640 0 <- JIT-related allocations
INTERNAL: 2 438 0
REALLOCATIONS
DEALLOCATIONS
INTERNAL: 24 0 1177
Overrides:
@test.lua:0, line 3
INTERNAL
It can confuse the users, so it's better to report all JIT-related allocations as INTERNAL.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the root document on LuaJIT memory profiling and the linked development issue 5679, then reproduce the example using misc.memprof.start and inspect the reported output. Done means every trace or other JIT-related allocation is reported as INTERNAL rather than with a source line of 0.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua
- Domain
- documentation
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100