Tarantool discussions archive
 help / color / mirror / Atom feed
From: Maksim Kokryashkin via Tarantool-discussions <tarantool-discussions@dev.tarantool.org>
To: tarantool-discussions@dev.tarantool.org, imun@tarantool.org,
	 skaplun@tarantool.org, sergos@tarantool.org
Subject: Re: [Tarantool-discussions] [RFC] add flamegraphs to lua platform profiler doc
Date: Mon, 12 Jul 2021 15:27:35 +0300	[thread overview]
Message-ID: <CAFifnwnVFC9m1uuLKozW=G9YGVanFeVLk5cEGAnAQoja_+eqKQ@mail.gmail.com> (raw)
In-Reply-To: <20210712122532.29086-1-max.kokryashkin@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2352 bytes --]

I forgot to provide github link to branch:
https://github.com/tarantool/tarantool/tree/fckxorg/rfc-platform-profiler

пн, 12 июл. 2021 г. в 15:25, Maxim Kokryashkin <max.kokryashkin@gmail.com>:

> From: Maxim Kokryashkin <m.kokryashkin@tarantool.org>
>
> ---
>  doc/rfc/781-luajit-platform-profiler.md | 13 ++++++++++++-
>  1 file changed, 12 insertions(+), 1 deletion(-)
>
> diff --git a/doc/rfc/781-luajit-platform-profiler.md
> b/doc/rfc/781-luajit-platform-profiler.md
> index fda3d535b..74132c2d4 100644
> --- a/doc/rfc/781-luajit-platform-profiler.md
> +++ b/doc/rfc/781-luajit-platform-profiler.md
> @@ -14,6 +14,17 @@ Currently, available options for profiling LuaJIT are
> not fine enough to get an
>
>  To get a detailed perspective of platform performance, a more advanced
> profiler is needed. The desired profiler must be able to capture both guest
> and host stacks simultaneously, along with virtual machine states.
>
> +To get the difference, you can take a look at flamegraphs generated by
> pref, jit.p, and PoC for the proposed profiler below.
> +### jit.p
> +![jit.p](https://i.imgur.com/sDZZDZx.png)
> +
> +### perf
> +![perf](https://i.imgur.com/DlKbFpo.png)
> +
> +### sysprof
> +![sysprof](https://i.imgur.com/Yf80MDE.png)
> +
> +
>  ## Detailed design
>
>  The proposed approach is to extend existing profiler embedded into
> LuaJIT, so it will be able to capture host stack too.
> @@ -69,4 +80,4 @@ Another way to implement such a thing is to make perf to
> see guest stack. To do
>  Stack unwinding from outside of the LuaJIT is the problem we didn’t
> manage to solve for today. There are different approaches to do this:
>  - *Save rsp register value to rbp and preserve rbp.* However, LuaJIT uses
> rbp as a general-purpose register, and it is hard not to break everything
> trying to use it only for stack frames.
>  - *Coordinated work of `jit.p` and perf.* This approach requires
> modifying perf the way it will send LuaJIT suspension signal, and after
> getting info about the host stack, it will receive information about the
> guest stack and join them. This solution is quite possible, but modified
> perf doesn't seem like a production-ready solution.
> -- *Dwarf unwinding*
> \ No newline at end of file
> +- *Dwarf unwinding*
> --
> 2.32.0
>
>

[-- Attachment #2: Type: text/html, Size: 3093 bytes --]

      reply	other threads:[~2021-07-12 12:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-12 12:25 Maxim Kokryashkin via Tarantool-discussions
2021-07-12 12:27 ` Maksim Kokryashkin via Tarantool-discussions [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='CAFifnwnVFC9m1uuLKozW=G9YGVanFeVLk5cEGAnAQoja_+eqKQ@mail.gmail.com' \
    --to=tarantool-discussions@dev.tarantool.org \
    --cc=imun@tarantool.org \
    --cc=max.kokryashkin@gmail.com \
    --cc=sergos@tarantool.org \
    --cc=skaplun@tarantool.org \
    --subject='Re: [Tarantool-discussions] [RFC] add flamegraphs to lua platform profiler doc' \
    /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