<HTML><BODY><div>So here are the benchmark results, and they are surprising.</div><div>It turns out that dumping all symbols from all shared objects <span style="font-family: var(--vkui--octavius_font_family_global,var(--vkui--font_family_base,Helvetica,Arial,sans-serif)); letter-spacing: var(--vkui--font_text--letter_spacing--regular,normal);">is </span></div><div><span style="font-family: var(--vkui--octavius_font_family_global,var(--vkui--font_family_base,Helvetica,Arial,sans-serif)); letter-spacing: var(--vkui--font_text--letter_spacing--regular,normal);">actually much faster than dumping only the name and address </span><span style="font-family: var(--vkui--octavius_font_family_global,var(--vkui--font_family_base,Helvetica,Arial,sans-serif)); letter-spacing: var(--vkui--font_text--letter_spacing--regular,normal);">of</span></div><div><span style="font-family: var(--vkui--octavius_font_family_global,var(--vkui--font_family_base,Helvetica,Arial,sans-serif)); letter-spacing: var(--vkui--font_text--letter_spacing--regular,normal);">each shared object.</span></div><div> </div><div>==========================================================</div><div><div>tested script:<br> package.cpath = "./?.so"<br> require "hello"</div><div> for j=1,1e3 do<br> misc.memprof.start('./memprof.test')<br> misc.memprof.stop()<br> end</div><div>----------------------------------------------------------</div><div>vanilla:<br> 0,03s user 0,05s system 50% cpu 0,158 total<br> 0,01s user 0,04s system 88% cpu 0,051 total<br> 0,01s user 0,05s system 79% cpu 0,071 total</div><div> avg total: 0.093<br> avg total per memprof.start/stop: 9.3e-5<br> performance relative to vanilla: x1</div><div>----------------------------------------------------------</div><div>dump only shared objects addresses and names:<br> 18,83s user 0,36s system 99% cpu 19,285 total<br> 19,15s user 0,35s system 99% cpu 19,586 total<br> 18,75s user 0,39s system 99% cpu 19,244 total</div><div> avg total: 19.371<br> avg total per memprof.start/stop: 0.019<br> performance relative to vanilla: x208.29</div><div>----------------------------------------------------------</div><div>dump all symbols:<br> 0,30s user 0,10s system 75% cpu 0,519 total<br> 0,41s user 0,20s system 52% cpu 1,173 total<br> 0,31s user 0,08s system 73% cpu 0,531 total</div><div> avg total: 0.741<br> avg total per memprof.start/stop: 7.4e-4<br> performance relative to vanilla: x7.96<br>==========================================================</div></div><div> </div><div>Best regards,</div><div>Maxim Kokryashkin</div><div> </div><blockquote style="border-left:1px solid #0857A6; margin:10px; padding:0 0 0 10px;">Friday, 20.08.21Maxim Kokryashkin <max.kokryashkin@gmail.com>:<br> <div id=""><div class="js-helper js-readmsg-msg"><div><div id="style_16294578500547674935_BODY">Changes in v2:<br> - Fixed comments as per review by Sergey<br><br><br>Maxim Kokryashkin (3):<br> utils: add CRC32 hash implementation<br> memprof: extend symtab with information about .so libs<br> memprof: update memprof parser<br><br> CMakeLists.txt | 2 +<br> src/CMakeLists.txt | 1 +<br> src/Makefile.dep.original | 3 +-<br> src/Makefile.original | 2 +-<br> src/lj_memprof.c | 60 +++++++++<br> src/lj_memprof.h | 3 +-<br> src/lj_utils.h | 29 +++++<br> src/lj_utils_hash.c | 110 +++++++++++++++++<br> src/ljamalg.c | 1 +<br> .../misclib-memprof-lapi.test.lua | 5 +-<br> tools/CMakeLists.txt | 2 +<br> tools/utils/hash.lua | 99 +++++++++++++++<br> tools/utils/symtab.lua | 114 +++++++++++++++++-<br> 13 files changed, 420 insertions(+), 11 deletions(-)<br> create mode 100644 src/lj_utils_hash.c<br> create mode 100644 tools/utils/hash.lua<br><br>---<br>Github branch: <a href="https://github.com/tarantool/luajit/tree/fckxorg/gh-5813-demangling-of-c-symbols" target="_blank">https://github.com/tarantool/luajit/tree/fckxorg/gh-5813-demangling-of-c-symbols</a><br>Issue: <a href="https://github.com/tarantool/tarantool/issues/5813" target="_blank">https://github.com/tarantool/tarantool/issues/5813</a><br><br>2.32.0<br> </div></div></div></div></blockquote><div> </div></BODY></HTML>