From: Sergey Kaplun <skaplun@tarantool.org> To: Igor Munkin <imun@tarantool.org>, Sergey Ostanevich <sergos@tarantool.org> Cc: tarantool-patches@dev.tarantool.org Subject: [Tarantool-patches] [PATCH luajit v2 0/7] LuaJIT memory profiler Date: Fri, 25 Dec 2020 18:26:02 +0300 [thread overview] Message-ID: <cover.1608907726.git.skaplun@tarantool.org> (raw) This patch provides a Lua interface for memory profiler in LuaJIT and the corresponding parser of profiled data. Global changes in v2: - Moved symtab to memprof module. - Added LUA_CORE and `module_name`_c defines - Added LJ_FASTCALL in wbuf and leb128 modules. - Added translation units to amalg build. - Code style fixes and commit message fixes. - Added (gh-5490) to ChangeLog. Issues: https://github.com/tarantool/tarantool/issues/5442 https://github.com/tarantool/tarantool/issues/5490 Branch: https://github.com/tarantool/luajit/tree/skaplun/gh-5442-luajit-memory-profiler CI: https://gitlab.com/tarantool/tarantool/-/pipelines/234430645 RFC: https://lists.tarantool.org/pipermail/tarantool-discussions/2020-December/000147.html @ChangeLog: - Introduce LuaJIT memory profiler (gh-5442). - Introduce LuaJIT memory profiler parser (gh-5490). Sergey Kaplun (7): utils: introduce leb128 reader and writer core: introduce write buffer module vm: introduce VM states for Lua and fast functions core: introduce new mem_L field core: introduce memory profiler misc: add Lua API for memory profiler tools: introduce a memory profile parser Makefile | 39 ++- src/Makefile | 13 +- src/Makefile.dep | 44 +-- src/lib_misc.c | 167 +++++++++++ src/lj_arch.h | 22 ++ src/lj_debug.c | 8 +- src/lj_debug.h | 3 + src/lj_errmsg.h | 6 + src/lj_frame.h | 18 +- src/lj_gc.c | 2 + src/lj_memprof.c | 430 +++++++++++++++++++++++++++++ src/lj_memprof.h | 165 +++++++++++ src/lj_obj.h | 13 +- src/lj_profile.c | 5 +- src/lj_state.c | 8 + src/lj_utils.h | 58 ++++ src/lj_utils_leb128.c | 132 +++++++++ src/lj_wbuf.c | 141 ++++++++++ src/lj_wbuf.h | 87 ++++++ src/ljamalg.c | 3 + src/luajit-gdb.py | 14 +- src/vm_arm.dasc | 6 +- src/vm_arm64.dasc | 6 +- src/vm_mips.dasc | 6 +- src/vm_mips64.dasc | 6 +- src/vm_ppc.dasc | 6 +- src/vm_x64.dasc | 93 +++++-- src/vm_x86.dasc | 131 ++++++--- test/misclib-memprof-lapi.test.lua | 135 +++++++++ tools/luajit-parse-memprof | 9 + tools/memprof.lua | 109 ++++++++ tools/memprof/humanize.lua | 45 +++ tools/memprof/parse.lua | 188 +++++++++++++ tools/utils/bufread.lua | 147 ++++++++++ tools/utils/symtab.lua | 89 ++++++ 35 files changed, 2217 insertions(+), 137 deletions(-) create mode 100644 src/lj_memprof.c create mode 100644 src/lj_memprof.h create mode 100644 src/lj_utils.h create mode 100644 src/lj_utils_leb128.c create mode 100644 src/lj_wbuf.c create mode 100644 src/lj_wbuf.h create mode 100755 test/misclib-memprof-lapi.test.lua create mode 100755 tools/luajit-parse-memprof create mode 100644 tools/memprof.lua create mode 100644 tools/memprof/humanize.lua create mode 100644 tools/memprof/parse.lua create mode 100644 tools/utils/bufread.lua create mode 100644 tools/utils/symtab.lua -- 2.28.0
next reply other threads:[~2020-12-25 15:26 UTC|newest] Thread overview: 52+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-12-25 15:26 Sergey Kaplun [this message] 2020-12-25 15:26 ` [Tarantool-patches] [PATCH luajit v2 1/7] utils: introduce leb128 reader and writer Sergey Kaplun 2020-12-25 21:42 ` Igor Munkin 2020-12-26 9:32 ` Sergey Kaplun 2020-12-26 13:57 ` Sergey Kaplun 2020-12-26 18:47 ` Sergey Ostanevich 2020-12-25 15:26 ` [Tarantool-patches] [PATCH luajit v2 2/7] core: introduce write buffer module Sergey Kaplun 2020-12-26 14:22 ` Igor Munkin 2020-12-26 15:26 ` Sergey Kaplun 2020-12-26 19:03 ` Sergey Ostanevich 2020-12-26 19:37 ` Sergey Kaplun 2020-12-28 1:43 ` Sergey Kaplun 2020-12-25 15:26 ` [Tarantool-patches] [PATCH luajit v2 3/7] vm: introduce VM states for Lua and fast functions Sergey Kaplun 2020-12-26 19:07 ` Sergey Ostanevich 2020-12-27 23:48 ` Igor Munkin 2020-12-28 3:54 ` Sergey Kaplun 2020-12-25 15:26 ` [Tarantool-patches] [PATCH luajit v2 4/7] core: introduce new mem_L field Sergey Kaplun 2020-12-26 19:12 ` Sergey Ostanevich 2020-12-26 19:42 ` Sergey Kaplun 2020-12-27 13:09 ` Igor Munkin 2020-12-27 17:44 ` Sergey Kaplun 2020-12-25 15:26 ` [Tarantool-patches] [PATCH luajit v2 5/7] core: introduce memory profiler Sergey Kaplun 2020-12-27 10:58 ` Sergey Ostanevich 2020-12-27 11:54 ` Sergey Kaplun 2020-12-27 13:27 ` Sergey Ostanevich 2020-12-27 16:44 ` Igor Munkin 2020-12-27 21:47 ` Sergey Kaplun 2020-12-25 15:26 ` [Tarantool-patches] [PATCH luajit v2 6/7] misc: add Lua API for " Sergey Kaplun 2020-12-27 11:54 ` Sergey Ostanevich 2020-12-27 13:42 ` Sergey Kaplun 2020-12-27 15:37 ` Sergey Ostanevich 2020-12-27 18:58 ` Igor Munkin 2020-12-28 0:14 ` Sergey Kaplun 2020-12-25 15:26 ` [Tarantool-patches] [PATCH luajit v2 7/7] tools: introduce a memory profile parser Sergey Kaplun 2020-12-26 22:56 ` Igor Munkin 2020-12-27 7:16 ` Sergey Kaplun 2020-12-28 5:30 ` Sergey Kaplun 2020-12-28 5:33 ` Igor Munkin 2020-12-28 6:28 ` Sergey Kaplun 2020-12-28 6:31 ` Igor Munkin 2020-12-27 13:24 ` Sergey Ostanevich 2020-12-27 16:02 ` Sergey Kaplun 2020-12-27 21:55 ` Sergey Ostanevich 2020-12-28 2:05 ` [Tarantool-patches] [PATCH luajit v3 2/2] misc: add Lua API for memory profiler Sergey Kaplun 2020-12-28 2:49 ` Igor Munkin 2020-12-28 5:19 ` Sergey Kaplun 2020-12-28 2:06 ` [Tarantool-patches] [PATCH luajit v3 1/2] core: introduce " Sergey Kaplun 2020-12-28 3:59 ` Igor Munkin 2020-12-28 4:05 ` [Tarantool-patches] [PATCH luajit v3 3/7] vm: introduce VM states for Lua and fast functions Sergey Kaplun 2020-12-28 5:14 ` Igor Munkin 2020-12-28 6:01 ` [Tarantool-patches] [PATCH luajit v2 0/7] LuaJIT memory profiler Alexander V. Tikhonov 2020-12-28 8:15 ` Igor Munkin
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.1608907726.git.skaplun@tarantool.org \ --to=skaplun@tarantool.org \ --cc=imun@tarantool.org \ --cc=sergos@tarantool.org \ --cc=tarantool-patches@dev.tarantool.org \ --subject='Re: [Tarantool-patches] [PATCH luajit v2 0/7] LuaJIT memory profiler' \ /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