[Tarantool-patches] [PATCH luajit 1/2] memprof: refactor symbol resolution

Maxim Kokryashkin m.kokryashkin at tarantool.org
Mon Sep 4 08:44:58 MSK 2023


Hi, Sergey!
Thanks for the review!
Fixed your comment, the branch is force pushed.

On Sun, Sep 03, 2023 at 01:14:37PM +0300, Sergey Kaplun wrote:
> Hi, Maxim!
> Thanks for the patch!
> LGTM, with a minor nit below.
> 
> On 28.08.23, Maxim Kokryashkin wrote:
> > This patch refactors symbol resolution in memprof, so
> > now they are resolved during the process of parsing.
> > This makes the generation mechanism excessive since
> > symtab updates are no longer affecting the previous events.
> > 
> > Follows up tarantool/tarantool#8700
> > ---
> >  .../misclib-memprof-lapi.test.lua             | 73 +++++--------------
> >  tools/memprof/humanize.lua                    | 16 ++--
> >  tools/memprof/parse.lua                       |  2 +-
> >  tools/memprof/process.lua                     |  8 +-
> >  4 files changed, 31 insertions(+), 68 deletions(-)
> > 
> > diff --git a/test/tarantool-tests/misclib-memprof-lapi.test.lua b/test/tarantool-tests/misclib-memprof-lapi.test.lua
> > index 3cb5c8be..0eee4e21 100644
> > --- a/test/tarantool-tests/misclib-memprof-lapi.test.lua
> > +++ b/test/tarantool-tests/misclib-memprof-lapi.test.lua
> 
> <snipped>
> 
> > @@ -86,44 +86,13 @@ local function form_source_line(line, source)
> >  end
> >  
> >  local function form_trace_line(traceno, line, source)
> > -  return ("TRACE [%d] %s:%d"):format(traceno, source or SRC_PATH, line)
> > +  return ("TRACE [%d] started at %s:%d"):format(traceno, source or SRC_PATH, line)
> 
> Nit: Line width is more than 80 symbols.

Here is the diff:
==========================================================================
diff --git a/test/tarantool-tests/misclib-memprof-lapi.test.lua b/test/tarantool-tests/misclib-memprof-lapi.test.lua
index 0eee4e21..b97462a5 100644
--- a/test/tarantool-tests/misclib-memprof-lapi.test.lua
+++ b/test/tarantool-tests/misclib-memprof-lapi.test.lua
@@ -86,7 +86,11 @@ local function form_source_line(line, source)
 end
 
 local function form_trace_line(traceno, line, source)
-  return ("TRACE [%d] started at %s:%d"):format(traceno, source or SRC_PATH, line)
+  return ("TRACE [%d] started at %s:%d"):format(
+    traceno,
+    source or SRC_PATH,
+    line
+  )
 end
 
 local function fill_ev_type(events, event_type)
==========================================================================
> 
> >  end
> >  
> > -local function fill_ev_type(events, symbols, event_type)
> 
> <snipped>
> 
> > diff --git a/tools/memprof/humanize.lua b/tools/memprof/humanize.lua
> > index 267baa91..5b289ce3 100644
> > --- a/tools/memprof/humanize.lua
> > +++ b/tools/memprof/humanize.lua
> 
> <snipped>
> 
> > diff --git a/tools/memprof/parse.lua b/tools/memprof/parse.lua
> > index d865267b..1b6eceb4 100644
> > --- a/tools/memprof/parse.lua
> > +++ b/tools/memprof/parse.lua
> 
> <snipped>
> 
> > diff --git a/tools/memprof/process.lua b/tools/memprof/process.lua
> > index 0bcb965b..faf4be4e 100644
> > --- a/tools/memprof/process.lua
> > +++ b/tools/memprof/process.lua
> 
> <snipped>
> 
> > -- 
> > 2.41.0
> > 
> 
> -- 
> Best regards,
> Sergey Kaplun


More information about the Tarantool-patches mailing list