[Tarantool-patches] [PATCH luajit v2 0/2] memprof: group allocations on traces by trace number

Mikhail Shishatskiy m.shishatskiy at tarantool.org
Wed Jul 28 16:42:57 MSK 2021


New patch series with Sergey's comments in mind.

Changes in v2:
    - Fixed comments as per review by Sergey Kaplun;
    - Trace dump supplemented with info about trace start pc,
      which is stored in the symtab;
    - Added test, checking if allocations in trace reported;
    - Ran an allocation-heavy benchmark on new patches to test the
      behavior.

The benchmark payload code can be found at [1]. It was summoned from
under the wrapper code [2]. The average time of 15 runs in seconds
is presented below. The second field is the standard deviation for 
the found difference:

| -------------------------------------- |
|           JIT-off, memprof-on          |
| -------------------------------------- |
|       BEFORE       |       AFTER       |
| ------------------ | ----------------- |
| 9.6155 (0.0656)    | +0.2951 (0.0742)  |
| -------------------------------------- |
|           JIT-on, memprof-on           |
| -------------------------------------- |
|       BEFORE       |       AFTER       |
| ------------------ | ----------------- |
| 7.0037 (0.2044)    | +0.2842 (0.0662)  |
| -------------------------------------- |

[1]: https://github.com/LuaJIT/LuaJIT-test-cleanup/blob/master/bench/binary-trees.lua
[2]: https://gist.github.com/Shishqa/d8e29f501d72647878b8993a206cea19

Issue: https://github.com/tarantool/tarantool/issues/5814
Branch: https://github.com/tarantool/luajit/tree/shishqa/gh-5814-group-allocations-on-trace-by-trace-number
CI: https://github.com/tarantool/tarantool/tree/shishqa/gh-5814-group-allocations-on-trace-by-trace-number

Mikhail Shishatskiy (2):
  memprof: dump traceno if allocate from trace
  memprof: extend symtab with info about traces

 src/lj_memprof.c                              |  33 ++++-
 src/lj_memprof.h                              |  20 ++-
 .../misclib-memprof-lapi.test.lua             | 121 +++++++++++++-----
 tools/memprof/parse.lua                       |  22 ++--
 tools/utils/symtab.lua                        |  41 +++++-
 5 files changed, 184 insertions(+), 53 deletions(-)

-- 
2.32.0


More information about the Tarantool-patches mailing list