[Tarantool-patches] [PATCH luajit v2] memprof: enrich symtab when new trace is allocated
imun at tarantool.org
Tue Apr 12 17:29:52 MSK 2022
Thanks for the patch!
I've fixed few issues I've found by myself, LGTM otherwise. CI is
green, so I've I've checked the patch into tarantool branch in
tarantool/luajit and bumped a new version in master.
On 08.12.21, Mikhail Shishatskiy wrote:
> Since symtab can be enriched with new prototypes, it
> can be enriched with new traces as well. This feature
> can help to investigate trace-generation-heavy apps
> with memprof.
> This patch introduces the functionality described above by
> adding a `prof_epoch` counter to the `GCtrace` structure.
> If the profiler meets allocation from a trace, it checks if
> the trace was already streamed to the symtab. If not,
> a symtab entry is dumped inside an <event-symtab>:
> | event-symtab := event-header sym?
> | sym := sym-lua | sym-trace
> | sym-trace := trace-no sym-addr line-no
> Since this patch, traces are no longer identified by address,
> as all the name collisions are resolved with symbols epochs.
> Also, the API of <utils/symtab.lua> changed: function `parse_sym_trace`
> is now public in order to use it from the <memrprof/parser.lua> module.
> Follows up tarantool/tarantool#5815
> CI: https://github.com/tarantool/tarantool/tree/shishqa/enrich-symtab-when-trace-is-allocated-v2
> branch: https://github.com/tarantool/luajit/tree/shishqa/enrich-symtab-when-trace-is-allocated-v2
> src/lj_jit.h | 8 +++++++
> src/lj_memprof.c | 22 +++++++++++++------
> src/lj_memprof.h | 5 +++--
> src/lj_trace.c | 3 +++
> .../misclib-memprof-lapi.test.lua | 13 +++++------
> tools/memprof/parse.lua | 3 ++-
> tools/utils/symtab.lua | 14 ++++--------
> 7 files changed, 41 insertions(+), 27 deletions(-)
More information about the Tarantool-patches