[Tarantool-patches] [PATCH luajit v2] memprof: report JIT-side allocations as internal
Igor Munkin
imun at tarantool.org
Wed Feb 2 20:29:56 MSK 2022
Misha,
I've checked the patch into tarantool branch in tarantool/luajit and
bumped a new version in master.
On 29.07.21, Mikhail Shishatskiy wrote:
> There are cases when the memory profiler attempts to attribute
> allocations triggered by the JIT engine recording phase
> with a Lua function to be recorded. In this case,
> lj_debug_frameline() may return BC_NOPOS (i.e. a negative value).
>
> Previously, these situations were ignored and the profiler
> reported, that the source line was equal to zero.
>
> This patch adjusts profiler behavior to treat allocations
> described above as internal by dumping ASOURCE_INT if
> lj_debug_frameline() returns a negative value.
>
> Resolves tarantool/tarantool#5679
> ---
>
> Issue: https://github.com/tarantool/tarantool/issues/5679
> Branch: https://github.com/tarantool/luajit/tree/shishqa/gh-5679-report-jit-allocations-as-internal
> CI: https://github.com/tarantool/tarantool/tree/shishqa/gh-5679-report-jit-allocations-as-internal
>
> Changes in v2:
> - Fixed commit title to fit in width of 50 symbols;
> - Rebased to the branch [1];
> - Reused default_payload() as a payload to test patch behavior.
>
> [1]: https://github.com/tarantool/luajit/tree/shishqa/gh-5814-group-allocations-on-trace-by-trace-number
>
> src/lj_memprof.c | 28 ++++++++++++-------
> .../misclib-memprof-lapi.test.lua | 16 ++++++++---
> 2 files changed, 30 insertions(+), 14 deletions(-)
>
<snipped>
> --
> 2.32.0
>
--
Best regards,
IM
More information about the Tarantool-patches
mailing list