Tarantool development patches archive
 help / color / mirror / Atom feed
From: Igor Munkin via Tarantool-patches <tarantool-patches@dev.tarantool.org>
To: Mikhail Shishatskiy <m.shishatskiy@tarantool.org>
Cc: tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH luajit v4 4/4] memprof: add info about trace start to symtab
Date: Wed, 24 Nov 2021 19:44:58 +0300	[thread overview]
Message-ID: <YZ5sCu+BM4N/6lfP@tarantool.org> (raw)
In-Reply-To: <20211122151119.ilbfcxcux4kpzrqy@surf.localdomain>

Misha,

Thanks for the fixes! Considering your next reply with reverting the
remaining excess changes, LGTM.

On 22.11.21, Mikhail Shishatskiy wrote:
> Igor,
> Thank you for the review! Hope, I got your comments right :)

Yes, everything is fine now :)

> 

<snipped>

> >> >> +  -- recording started.
> >> >> +  if trace and trace.addr == loc.addr then
> >> >> +    return symtab.demangle(symbols, loc).." started at "..
> >> >> +           symtab.demangle(symbols, trace.start)
> >> >
> >> >Finally, I got the thing that bothers me the most. Why do you make
> >> ><describe_location> so complex? It looks that you can move all these
> >> >if-else branching to <symtab.demangle> and concatenation to
> >> ><demangle_trace> function, doesn't it? AFAICS, you can remove
> >> ><describe_location> as a result and trace demangling will be
> >> >encapsulated in scope of <demangle_trace> function. Feel free to correct
> >> >me if I'm wrong.
> >>
> >> Initially it was implemented, as you suggest now. But Sergey in his
> >> review led me to believe, that "started at" part should ideologically
> >> relate to the humanizer module. And I agree with that point, but maybe
> >> I decomposed things not in a very good way.
> >
> >Em... In that way all other types (such as "INTERNAL" and "CFUNC %#x")
> >should also be in the humanizer module, since this representation is
> >specific for a particular output format. All in all nobody stops you
> >from moving <symtab.demangle> to the humanize module, since it's used
> >only there (and need to be used only there).
> >
> >BTW, Sergey is also in Cc, so he can also drop a few words regarding it.
> >
> >>
> >> Another way to implement this is to demangle without "started at" and
> >> then insert it to the demangled name. What do you think?
> >
> >My point is to have the whole "stringification" mess encapsulated in a
> >single function (like it's almost done within <symtab.demangle>). And
> >the only thing remaining outside of this function is "started at" tail.
> >I hope this fits your vision regarding decomposition :)
> 
> So, I decided to decompose things, as you suggested initially. Now
> traces are demangled separately inside the <demangle_trace> function.
> The "started at" string also moved to that function in order not to
> spout some convoluted logic of injecting this string inside the
> demangled string outside the demangler module. The only nuance is
> a possibility of recursion calls:
> 
> | symtab.demangle -> demangle_trace -> symtab.demangle -> demangle_trace -> ...
> 
> But I inserted asserts to prevent such cases.

Neato, thanks a lot!

> 

<snipped>

> 
> --
> Best regards,
> Mikhail Shishatskiy

-- 
Best regards,
IM

  parent reply	other threads:[~2021-11-24 16:45 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-20  7:05 [Tarantool-patches] [PATCH luajit v3 0/4] memprof: group allocations on traces by trace number Mikhail Shishatskiy via Tarantool-patches
2021-08-20  7:05 ` [Tarantool-patches] [PATCH luajit v3 1/5] core: add const to lj_debug_line proto parameter Mikhail Shishatskiy via Tarantool-patches
2021-09-16 15:29   ` Igor Munkin via Tarantool-patches
2021-08-20  7:05 ` [Tarantool-patches] [PATCH luajit v3 2/5] test: separate memprof Lua API tests into subtests Mikhail Shishatskiy via Tarantool-patches
2021-09-16 15:29   ` Igor Munkin via Tarantool-patches
2021-08-20  7:05 ` [Tarantool-patches] [PATCH luajit v3 3/5] memprof: dump traceno if allocate from trace Mikhail Shishatskiy via Tarantool-patches
2021-09-16 15:32   ` Igor Munkin via Tarantool-patches
2021-09-29 19:21     ` Mikhail Shishatskiy via Tarantool-patches
2021-08-20  7:05 ` [Tarantool-patches] [PATCH luajit v3 4/5] memprof: extend symtab with info about traces Mikhail Shishatskiy via Tarantool-patches
2021-09-16 15:32   ` Igor Munkin via Tarantool-patches
2021-09-29 19:21     ` Mikhail Shishatskiy via Tarantool-patches
2021-08-20  7:05 ` [Tarantool-patches] [PATCH luajit v3 5/5] luajit: change order of modules Mikhail Shishatskiy via Tarantool-patches
2021-09-16 15:32   ` Igor Munkin via Tarantool-patches
2021-09-29 20:07 ` [Tarantool-patches] [PATCH luajit v4 0/4] memprof: group allocations on traces by traceno Mikhail Shishatskiy via Tarantool-patches
2021-09-29 20:07   ` [Tarantool-patches] [PATCH luajit v4 1/4] test: separate memprof Lua API tests into subtests Mikhail Shishatskiy via Tarantool-patches
2021-10-27 13:56     ` Igor Munkin via Tarantool-patches
2021-10-27 15:07     ` Sergey Kaplun via Tarantool-patches
2021-09-29 20:07   ` [Tarantool-patches] [PATCH luajit v4 2/4] memprof: refactor location parsing Mikhail Shishatskiy via Tarantool-patches
2021-10-27 13:56     ` Igor Munkin via Tarantool-patches
     [not found]       ` <20211104130010.mcvnra6e4yl5moo2@surf.localdomain>
2021-11-10 15:38         ` Igor Munkin via Tarantool-patches
2021-09-29 20:07   ` [Tarantool-patches] [PATCH luajit v4 3/4] memprof: group allocations on traces by traceno Mikhail Shishatskiy via Tarantool-patches
2021-10-27 13:56     ` Igor Munkin via Tarantool-patches
     [not found]       ` <20211104130156.f2botlihlfhwd3yh@surf.localdomain>
2021-11-11 15:34         ` Igor Munkin via Tarantool-patches
2021-09-29 20:07   ` [Tarantool-patches] [PATCH luajit v4 4/4] memprof: add info about trace start to symtab Mikhail Shishatskiy via Tarantool-patches
2021-11-01 16:31     ` Igor Munkin via Tarantool-patches
     [not found]       ` <20211104130228.x6qcne5xeh544hm7@surf.localdomain>
2021-11-12 13:34         ` Igor Munkin via Tarantool-patches
2021-11-17  8:17           ` Sergey Kaplun via Tarantool-patches
2021-11-22 15:11           ` Mikhail Shishatskiy via Tarantool-patches
2021-11-24 12:42             ` Mikhail Shishatskiy via Tarantool-patches
2021-11-24 16:44             ` Igor Munkin via Tarantool-patches [this message]
2022-01-27 23:29   ` [Tarantool-patches] [PATCH luajit v4 0/4] memprof: group allocations on traces by traceno Igor Munkin via Tarantool-patches

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YZ5sCu+BM4N/6lfP@tarantool.org \
    --to=tarantool-patches@dev.tarantool.org \
    --cc=imun@tarantool.org \
    --cc=m.shishatskiy@tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH luajit v4 4/4] memprof: add info about trace start to symtab' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox