diff --git a/changelogs/unreleased/gh-5813-resolving-of-c-symbols.md b/changelogs/unreleased/gh-5813-resolving-of-c-symbols.md new file mode 100644 index 0000000000000000000000000000000000000000..e7fab8a7eae200d5171ab54a33e1977e768dd7a0 --- /dev/null +++ b/changelogs/unreleased/gh-5813-resolving-of-c-symbols.md @@ -0,0 +1,6 @@ +## feature/luajit + +* Now memory profiler dumps symbol table for C functions. As a result memory + profiler parser can enrich its symbol table with C symbols (gh-5813). + Furthermore, now memprof dumps special events for symbol table when it + encounters a new C symbol, that hasn't been dumped yet. diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index db14cca7558ff419fc085bedadce6028d7971538..55d42301f3ef3337397b9c47870ee9499d3e3b9d 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -80,6 +80,7 @@ lua_source(lua_sources ${LUAJIT_SOURCE_ROOT}/tools/memprof.lua memprof_lua) lua_source(lua_sources ${LUAJIT_SOURCE_ROOT}/tools/memprof/humanize.lua memprof_humanize_lua) lua_source(lua_sources ${LUAJIT_SOURCE_ROOT}/tools/memprof/parse.lua memprof_parse_lua) lua_source(lua_sources ${LUAJIT_SOURCE_ROOT}/tools/memprof/process.lua memprof_process_lua) +lua_source(lua_sources ${LUAJIT_SOURCE_ROOT}/tools/utils/avl.lua utils_avl_lua) lua_source(lua_sources ${LUAJIT_SOURCE_ROOT}/tools/utils/bufread.lua utils_bufread_lua) lua_source(lua_sources ${LUAJIT_SOURCE_ROOT}/tools/utils/symtab.lua utils_symtab_lua) diff --git a/src/lua/init.c b/src/lua/init.c index fa45df1a006011f0683988d317a05825cb4773c3..2f435a10d5e3a9a3d5d2bc37f6a4c8c62be97c2f 100644 --- a/src/lua/init.c +++ b/src/lua/init.c @@ -137,6 +137,7 @@ extern char strict_lua[], jit_p_lua[], /* LuaJIT 2.1 profiler */ jit_zone_lua[], /* LuaJIT 2.1 profiler */ /* tools.* libraries. */ + utils_avl_lua[], utils_bufread_lua[], utils_symtab_lua[], memprof_parse_lua[], @@ -285,6 +286,7 @@ static const char *lua_modules[] = { "jit.p", jit_p_lua, "jit.zone", jit_zone_lua, /* tools.* libraries. Order is important. */ + "utils.avl", utils_avl_lua, "utils.bufread", utils_bufread_lua, "utils.symtab", utils_symtab_lua, "memprof.parse", memprof_parse_lua, diff --git a/third_party/luajit b/third_party/luajit index 0243fb72b05c7c63481c50151c65bef6b04e3372..0895a342d9d2c401b444edb39b6f70d328232e5a 160000 --- a/third_party/luajit +++ b/third_party/luajit @@ -1 +1 @@ -Subproject commit 0243fb72b05c7c63481c50151c65bef6b04e3372 +Subproject commit 0895a342d9d2c401b444edb39b6f70d328232e5a