Tarantool development patches archive
 help / color / mirror / Atom feed
* [Tarantool-patches] [PATCH 0/3] memprof: add demangling capabilities for C functions
@ 2021-07-23 12:39 Maxim Kokryashkin via Tarantool-patches
  2021-07-23 12:39 ` [Tarantool-patches] [PATCH 1/3] memprof: extend memprof symbol table Maxim Kokryashkin via Tarantool-patches
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Maxim Kokryashkin via Tarantool-patches @ 2021-07-23 12:39 UTC (permalink / raw)
  To: tarantool-patches, imun, skaplun

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


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

end of thread, other threads:[~2021-07-28  8:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-23 12:39 [Tarantool-patches] [PATCH 0/3] memprof: add demangling capabilities for C functions Maxim Kokryashkin via Tarantool-patches
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

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