Tarantool development patches archive
 help / color / mirror / Atom feed
From: Maxim Kokryashkin via Tarantool-patches <tarantool-patches@dev.tarantool.org>
To: Igor Munkin <imun@tarantool.org>
Cc: Maksim Kokryashkin <max.kokryashkin@gmail.com>,
	tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH luajit v7] memprof: introduce cli flag to run dump parser
Date: Wed, 2 Aug 2023 11:32:57 +0300	[thread overview]
Message-ID: <nyj3ruhbvg6i43cx27rrlxwu32y3wndfead6mt6lgo4xhwltb6@tupk2pmug7ze> (raw)
In-Reply-To: <ZMoQAgY8PW1GpcAt@tarantool.org>

Igor,

On Wed, Aug 02, 2023 at 08:12:50AM +0000, Igor Munkin wrote:
> Max,
> 
> On 02.08.23, Maxim Kokryashkin wrote:
> > Hi, Igor!
> > 
> > Well, I see no obstacles with flag handling in Tarantool.
> > For instance, the -j flag proxy can do exactly what you want.
> > 
> > | review/tarantool/build  fckxorg/gh-5688-cli-for-memprof-parse ✔                                                                                                                                   239d16h
> > | ▶ ./src/tarantool -j on -e 'print(jit.status())'
> > | true	fold	cse	dce	fwd	dse	narrow	loop	abc	sink	fuse
> > |
> > | review/tarantool/build  fckxorg/gh-5688-cli-for-memprof-parse ✔                                                                                                                                   239d16h
> > | ▶ ./src/tarantool -j off -e 'print(jit.status())'
> > | false	fold	cse	dce	fwd	dse	narrow	loop	abc	sink	fuse
> > 
> 
> My bad, I'm concerted rather about this difference and its effect in
> Tarantool flags processing:
> | $ ./luajit -bl -e 'print("qq")'
> | -- BYTECODE -- "print("qq")":0-1
> | 0001    GGET     0   0      ; "print"
> | 0002    KSTR     1   1      ; "qq"
> | 0003    CALL     0   1   2
> | 0004    RET0     0   1
> | 
> | $ cd ../src/tools
> | $ ../src/luajit -tm -e 'print("qq")'
> | luajit-parse-memprof.lua: ERROR: unrecognized option `-e'. Try `--help'.
> | 
> 
> In other words, I wonder
> * whether flags in Tarantool are position independent (i.e. the result
>   of -j + -e combination equals to -e + -j);

| review/tarantool/build  fckxorg/gh-5688-cli-for-memprof-parse ✔                                                                                                                                   239d17h
| ▶ ./src/tarantool -e 'print(jit.status())' -jon
| false	fold	cse	dce	fwd	dse	narrow	loop	abc	sink	fuse
|
| review/tarantool/build  fckxorg/gh-5688-cli-for-memprof-parse ✔                                                                                                                                   239d17h
| ▶ ./src/tarantool -jon  -e 'print(jit.status())'
| true	fold	cse	dce	fwd	dse	narrow	loop	abc	sink	fuse
So no, they are not position-independent.

> * how --leak-only will be handled in this case.
I can just pass further args after the -tm right to the memprof parser module then.

> 
> BTW, I have a thought regarding introducing kinda "mode" for memprof, so
> we can use it like -tm=leak-only (as an alternative to the original
> proposal in the first message).
> 
> Besides, I see no tests for --leak-only (have no idea, why everyone
> missed this on review). Could you add them?
Yep, sure.
> 
> > Tarantool's flag handling is not pleasant to say the least,
> > but we should try to do the same as with -j.
> > 
> > Best regards,
> > Maxim Kokryashkin
> > 
> > 
> > On Wed, Aug 02, 2023 at 07:23:03AM +0000, Igor Munkin wrote:
> > > Max,
> > > 
> > > We've discussed with Sergey K. how to run -tm with --leak-only today.
> > > Fortunately, it works fine in LuaJIT, however, I'm afraid such flag
> > > handling in incompatible in Tarantool. Hence, I suggest to glue this
> > > flag with comma to -tm, like jdump does[1]. Thoughts?
> > > 
> > > [1]: https://github.com/tarantool/luajit/blob/tarantool/master/src/jit/dump.lua#L18
> > > 
> > > -- 
> > > Best regards,
> > > IM
> 
> -- 
> Best regards,
> IM

      reply	other threads:[~2023-08-02  8:33 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-10 11:24 Maksim Kokryashkin via Tarantool-patches
2023-07-11 13:06 ` Sergey Bronnikov via Tarantool-patches
2023-07-14 12:41   ` Maxim Kokryashkin via Tarantool-patches
2023-07-28 15:30     ` Sergey Bronnikov via Tarantool-patches
2023-07-29 16:24       ` Igor Munkin via Tarantool-patches
2023-07-15 11:35 ` Sergey Kaplun via Tarantool-patches
2023-08-01 15:45 ` Igor Munkin via Tarantool-patches
2023-08-02  7:23 ` Igor Munkin via Tarantool-patches
2023-08-02  7:59   ` Maxim Kokryashkin via Tarantool-patches
2023-08-02  8:12     ` Igor Munkin via Tarantool-patches
2023-08-02  8:32       ` Maxim Kokryashkin via Tarantool-patches [this message]

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=nyj3ruhbvg6i43cx27rrlxwu32y3wndfead6mt6lgo4xhwltb6@tupk2pmug7ze \
    --to=tarantool-patches@dev.tarantool.org \
    --cc=imun@tarantool.org \
    --cc=m.kokryashkin@tarantool.org \
    --cc=max.kokryashkin@gmail.com \
    --subject='Re: [Tarantool-patches] [PATCH luajit v7] memprof: introduce cli flag to run dump parser' \
    /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