Tarantool development patches archive
 help / color / mirror / Atom feed
From: Maxim Kokryashkin via Tarantool-patches <tarantool-patches@dev.tarantool.org>
To: tarantool-patches@dev.tarantool.org, imun@tarantool.org,
	skaplun@tarantool.org
Subject: [Tarantool-patches] [PATCH luajit 0/7] misc: introduce sysprof
Date: Wed,  8 Sep 2021 20:50:43 +0300	[thread overview]
Message-ID: <cover.1631122521.git.m.kokryashkin@tarantool.org> (raw)

Currently, available options for profiling LuaJIT are not fine enough
to get an understanding of performance. For example, perf only able to
show host stack, so all the Lua calls are seen as single pcall.
Oppositely, jit.p module provided with LuaJIT is not able to give any
information about the host stack.

To get a detailed perspective of platform performance, a more advanced
profiler is needed. Sysprof is able to capture both guest and host stacks
simultaneously, along with virtual machine states.

Maxim Kokryashkin (4):
  memprof: move symtab to a separate module
  memprof: add profile common section
  sysprof: introduce Lua API
  tools: introduce parsers for sysprof

Mikhail Shishatskiy (3):
  core: save current frame top to lj_obj
  core: separate the profiling timer from lj_profile
  core: introduce lua and platform profiler

 .gitignore                                    |   1 +
 CMakeLists.txt                                |   6 +
 src/CMakeLists.txt                            |   3 +
 src/Makefile.dep.original                     |  17 +-
 src/lib_misc.c                                | 239 ++++++++-
 src/lj_arch.h                                 |  11 +
 src/lj_errmsg.h                               |   2 +-
 src/lj_mapi.c                                 |  26 +
 src/lj_memprof.c                              |  37 +-
 src/lj_memprof.h                              |  36 --
 src/lj_obj.h                                  |  12 +
 src/lj_profile.c                              | 178 +------
 src/lj_profile_timer.c                        | 126 +++++
 src/lj_profile_timer.h                        |  83 +++
 src/lj_state.c                                |   7 +
 src/lj_symtab.c                               |  36 ++
 src/lj_symtab.h                               |  46 ++
 src/lj_sysprof.c                              | 483 ++++++++++++++++++
 src/lj_sysprof.h                              |  94 ++++
 src/lmisclib.h                                |  93 ++++
 src/vm_x64.dasc                               |  52 +-
 src/vm_x86.dasc                               |  52 +-
 test/tarantool-tests/CMakeLists.txt           |   1 +
 .../misclib-sysprof-capi.test.lua             |  53 ++
 .../misclib-sysprof-capi/CMakeLists.txt       |   1 +
 .../misclib-sysprof-capi/testsysprof.c        | 269 ++++++++++
 .../misclib-sysprof-lapi.test.lua             | 107 ++++
 tools/CMakeLists.txt                          |  83 +++
 tools/luajit-parse-sysprof.in                 |   6 +
 tools/sysprof.lua                             | 119 +++++
 tools/sysprof/collapse.lua                    | 110 ++++
 tools/sysprof/parse.lua                       | 188 +++++++
 32 files changed, 2309 insertions(+), 268 deletions(-)
 create mode 100644 src/lj_profile_timer.c
 create mode 100644 src/lj_profile_timer.h
 create mode 100644 src/lj_symtab.c
 create mode 100644 src/lj_symtab.h
 create mode 100644 src/lj_sysprof.c
 create mode 100644 src/lj_sysprof.h
 create mode 100644 test/tarantool-tests/misclib-sysprof-capi.test.lua
 create mode 100644 test/tarantool-tests/misclib-sysprof-capi/CMakeLists.txt
 create mode 100644 test/tarantool-tests/misclib-sysprof-capi/testsysprof.c
 create mode 100644 test/tarantool-tests/misclib-sysprof-lapi.test.lua
 create mode 100644 tools/luajit-parse-sysprof.in
 create mode 100644 tools/sysprof.lua
 create mode 100755 tools/sysprof/collapse.lua
 create mode 100755 tools/sysprof/parse.lua

---
GitHub branch:
https://github.com/tarantool/luajit/tree/shishqa/gh-781-platform-and-lua-profiler

RFC:
https://hackmd.io/g-o4f21RRkChYTyVgN1AnQ

Original issue:
https://github.com/tarantool/tarantool/issues/781

2.33.0


             reply	other threads:[~2021-09-08 17:50 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-08 17:50 Maxim Kokryashkin via Tarantool-patches [this message]
2021-09-08 17:50 ` [Tarantool-patches] [PATCH luajit 1/7] core: save current frame top to lj_obj Maxim Kokryashkin via Tarantool-patches
2021-09-20 17:21   ` Sergey Kaplun via Tarantool-patches
2021-09-08 17:50 ` [Tarantool-patches] [PATCH luajit 2/7] core: separate the profiling timer from lj_profile Maxim Kokryashkin via Tarantool-patches
2021-09-21 11:13   ` Sergey Kaplun via Tarantool-patches
2021-09-23 11:37     ` Mikhail Shishatskiy via Tarantool-patches
2021-09-08 17:50 ` [Tarantool-patches] [PATCH luajit 3/7] memprof: move symtab to a separate module Maxim Kokryashkin via Tarantool-patches
2021-09-22  7:51   ` Sergey Kaplun via Tarantool-patches
2021-09-22  8:14     ` Sergey Kaplun via Tarantool-patches
2021-09-23 14:51   ` [Tarantool-patches] [PATCH luajit v2] " Maxim Kokryashkin via Tarantool-patches
2021-09-08 17:50 ` [Tarantool-patches] [PATCH luajit 4/7] core: introduce lua and platform profiler Maxim Kokryashkin via Tarantool-patches
2021-09-29  6:53   ` Sergey Kaplun via Tarantool-patches
2021-09-08 17:50 ` [Tarantool-patches] [PATCH luajit 5/7] memprof: add profile common section Maxim Kokryashkin via Tarantool-patches
2021-10-05 10:48   ` Sergey Kaplun via Tarantool-patches
2021-10-06 19:15     ` [Tarantool-patches] [PATCH luajit v2] " Maxim Kokryashkin via Tarantool-patches
2021-09-08 17:50 ` [Tarantool-patches] [PATCH luajit 6/7] sysprof: introduce Lua API Maxim Kokryashkin via Tarantool-patches
2021-10-05 15:36   ` Sergey Kaplun via Tarantool-patches
2021-09-08 17:50 ` [Tarantool-patches] [PATCH luajit 7/7] tools: introduce parsers for sysprof Maxim Kokryashkin via Tarantool-patches
2021-10-07 11:28   ` Sergey Kaplun via Tarantool-patches
2022-04-07 12:15 ` [Tarantool-patches] [PATCH luajit 0/7] misc: introduce sysprof Sergey Kaplun via Tarantool-patches

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=cover.1631122521.git.m.kokryashkin@tarantool.org \
    --to=tarantool-patches@dev.tarantool.org \
    --cc=imun@tarantool.org \
    --cc=max.kokryashkin@gmail.com \
    --cc=skaplun@tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH luajit 0/7] misc: introduce sysprof' \
    /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