[Tarantool-discussions] [RFC] add flamegraphs to lua platform profiler doc
max.kokryashkin at gmail.com
Mon Jul 12 15:27:35 MSK 2021
I forgot to provide github link to branch:
пн, 12 июл. 2021 г. в 15:25, Maxim Kokryashkin <max.kokryashkin at gmail.com>:
> From: Maxim Kokryashkin <m.kokryashkin at 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
> 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
> +### perf
> +### sysprof
> ## 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*
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Tarantool-discussions