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 0/3] memprof: add demangling capabilities for C functions
Date: Fri, 23 Jul 2021 15:39:49 +0300 [thread overview]
Message-ID: <cover.1627043674.git.m.kokryashkin@tarantool.org> (raw)
Once applied, this patch series will make memprof able to demangle
C fucntions. It means that memprof report will show their names
instead of meaningless address.
That's like memprof report for lua script with C modules looks like now:
```
ALLOCATIONS
@test.lua:0: 4 events +640 bytes -0 bytes
INTERNAL: 3 events +1164 bytes -0 bytes
CFUNC 0x7f939831a119: 1 events +29 bytes -0
bytes
REALLOCATIONS
INTERNAL: 1 events +128 bytes -256 bytes
DEALLOCATIONS
INTERNAL: 254 events +0 bytes -61020 bytes
Overrides:
@test.lua:0
HEAP SUMMARY:
INTERNAL holds 1164 bytes: 3 allocs, 0 frees
@test.lua:0 holds 384 bytes: 4 allocs, 1 frees
CFUNC 0x7f939831a119 holds 29 bytes: 1 allocs, 0 frees
```
Memprof report after applying the patch for the same script:
```
ALLOCATIONS
@test.lua:0: 4 events +640 bytes -0 bytes
INTERNAL: 3 events +1164 bytes -0 bytes
/home/maxim/Programming/memprof-demangling/hello.so:say_hello 0x7f939831a119: 1 events +29 bytes -0
bytes
REALLOCATIONS
INTERNAL: 1 events +128 bytes -256 bytes
DEALLOCATIONS
INTERNAL: 254 events +0 bytes -61020 bytes
Overrides:
@test.lua:0
HEAP SUMMARY:
INTERNAL holds 1164 bytes: 3 allocs, 0 frees
@test.lua:0 holds 384 bytes: 4 allocs, 1 frees
/home/maxim/Programming/memprof-demangling/hello.so:say_hello 0x7f939831a119 holds 29 bytes: 1 allocs, 0 frees
```
Part of tarantool/tarantool#5813
Maxim Kokryashkin (3):
memprof: extend memprof symbol table
memprof: update memprof parser
test: adapt memprof tests to new symbol table format
CMakeLists.txt | 2 +
src/CMakeLists.txt | 1 +
src/lj_hash.c | 136 ++++++++++++++++++
src/lj_hash.h | 28 ++++
src/lj_memprof.c | 27 +++-
src/lj_memprof.h | 1 +
.../misclib-memprof-lapi.test.lua | 5 +-
tools/CMakeLists.txt | 2 +
tools/utils/hash.lua | 99 +++++++++++++
tools/utils/symtab.lua | 112 ++++++++++++++-
10 files changed, 405 insertions(+), 8 deletions(-)
create mode 100644 src/lj_hash.c
create mode 100644 src/lj_hash.h
create mode 100644 tools/utils/hash.lua
---
Github branch in tarantool/tarantool:
https://github.com/tarantool/tarantool/tree/fckxorg/gh-5813-memprof-demangling
Github branch in tarantool/luajit:
https://github.com/tarantool/luajit/tree/fckxorg/gh-5813-demangling-of-c-symbols
2.32.0
next reply other threads:[~2021-07-23 12:39 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-23 12:39 Maxim Kokryashkin via Tarantool-patches [this message]
2021-07-23 12:39 ` [Tarantool-patches] [PATCH 1/3] memprof: extend memprof symbol table Maxim Kokryashkin via Tarantool-patches
2021-07-28 8:16 ` Sergey Kaplun via Tarantool-patches
2021-07-23 12:39 ` [Tarantool-patches] [PATCH 2/3] memprof: update memprof parser Maxim Kokryashkin via Tarantool-patches
2021-07-23 12:39 ` [Tarantool-patches] [PATCH 3/3] test: adapt memprof tests to new symbol table format Maxim Kokryashkin 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.1627043674.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 0/3] memprof: add demangling capabilities for C functions' \
/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