Tarantool discussions archive
 help / color / mirror / Atom feed
From: Maxim Kokryashkin via Tarantool-discussions <tarantool-discussions@dev.tarantool.org>
To: tarantool-discussions@dev.tarantool.org, imun@tarantool.org,
	skaplun@tarantool.org, sergos@tarantool.org
Cc: Maxim Kokryashkin <m.kokryashkin@tarantool.org>
Subject: [Tarantool-discussions] [RFC] add flamegraphs to lua platform profiler doc
Date: Mon, 12 Jul 2021 15:25:32 +0300	[thread overview]
Message-ID: <20210712122532.29086-1-max.kokryashkin@gmail.com> (raw)

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


             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 [this message]
2021-07-12 12:27 ` Maksim Kokryashkin via Tarantool-discussions

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=20210712122532.29086-1-max.kokryashkin@gmail.com \
    --to=tarantool-discussions@dev.tarantool.org \
    --cc=imun@tarantool.org \
    --cc=m.kokryashkin@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