Tarantool discussions archive
 help / color / mirror / Atom feed
* [Tarantool-discussions] [RFC] add flamegraphs to lua platform profiler doc
@ 2021-07-12 12:25 Maxim Kokryashkin via Tarantool-discussions
  2021-07-12 12:27 ` Maksim Kokryashkin via Tarantool-discussions
  0 siblings, 1 reply; 2+ messages in thread
From: Maxim Kokryashkin via Tarantool-discussions @ 2021-07-12 12:25 UTC (permalink / raw)
  To: tarantool-discussions, imun, skaplun, sergos; +Cc: Maxim Kokryashkin

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Tarantool-discussions] [RFC] add flamegraphs to lua platform profiler doc
  2021-07-12 12:25 [Tarantool-discussions] [RFC] add flamegraphs to lua platform profiler doc Maxim Kokryashkin via Tarantool-discussions
@ 2021-07-12 12:27 ` Maksim Kokryashkin via Tarantool-discussions
  0 siblings, 0 replies; 2+ messages in thread
From: Maksim Kokryashkin via Tarantool-discussions @ 2021-07-12 12:27 UTC (permalink / raw)
  To: tarantool-discussions, imun, skaplun, sergos

[-- 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 --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-07-12 12:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-12 12:25 [Tarantool-discussions] [RFC] add flamegraphs to lua platform profiler doc Maxim Kokryashkin via Tarantool-discussions
2021-07-12 12:27 ` Maksim Kokryashkin via Tarantool-discussions

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