From: Maksim Kokryashkin via Tarantool-patches <tarantool-patches@dev.tarantool.org> To: tarantool-patches@dev.tarantool.org, imun@tarantool.org, skaplun@tarantool.org, m.kokryashkin@tarantool.org Subject: [Tarantool-patches] [PATCH luajit v4 1/3] sysprof: remove `split by vmstate` option Date: Mon, 21 Aug 2023 13:06:02 +0300 [thread overview] Message-ID: <20230821100604.61363-2-max.kokryashkin@gmail.com> (raw) In-Reply-To: <20230821100604.61363-1-max.kokryashkin@gmail.com> From: Maxim Kokryashkin <m.kokryashkin@tarantool.org> The option was introduced early into the sysprof's development to provide capabilities for per-VM-state callchain visualization. However, during the sysprof's recent active in-house usage period, it became clear that performance issues associated with specific VM states (such as GC, for example) have a distinct look on a flamegraph itself, thanks to their name prefixes and their surrounding context. This option is unneeded and was never used by anybody. There is no reason to maintain it in the scope of refactoring. Needed for tarantool/tarantool#8700 --- tools/sysprof.lua | 9 +-------- tools/sysprof/collapse.lua | 10 +++------- 2 files changed, 4 insertions(+), 15 deletions(-) diff --git a/tools/sysprof.lua b/tools/sysprof.lua index 1afab195..22c724e9 100644 --- a/tools/sysprof.lua +++ b/tools/sysprof.lua @@ -6,8 +6,6 @@ local misc = require "sysprof.collapse" local stdout, stderr = io.stdout, io.stderr local match, gmatch = string.match, string.gmatch -local split_by_vmstate = false - -- Program options. local opt_map = {} @@ -23,15 +21,10 @@ luajit-parse-sysprof [options] sysprof.bin Supported options are: --help Show this help and exit - --split Split callchains by vmstate ]] os.exit(0) end -function opt_map.split() - split_by_vmstate = true -end - -- Print error and exit with error status. local function opterror(...) stderr:write("luajit-parse-sysprof.lua: ERROR: ", ...) @@ -103,7 +96,7 @@ local function dump(inputfile) local symbols = symtab.parse(reader) local events = sysprof.parse(reader, symbols) - local calltree = misc.collapse(events, symbols, split_by_vmstate) + local calltree = misc.collapse(events, symbols) traverse_calltree(calltree, '') diff --git a/tools/sysprof/collapse.lua b/tools/sysprof/collapse.lua index 3d83d5ea..ac5269ea 100755 --- a/tools/sysprof/collapse.lua +++ b/tools/sysprof/collapse.lua @@ -75,7 +75,7 @@ end -- merge lua and host callchains into one callchain representing -- transfer of control -local function merge(event, symbols, sep_vmst) +local function merge(event, symbols) local cc = {} for _,h_fr in pairs(event.host.callchain) do @@ -98,19 +98,15 @@ local function merge(event, symbols, sep_vmst) end - if sep_vmst == true then - table.insert(cc, { name = VMST_NAMES[event.lua.vmstate] }) - end - return cc end -- Collapse all the events into call tree -function M.collapse(events, symbols, sep_vmst) +function M.collapse(events, symbols) local root = new_node('root', false) for _,ev in pairs(events) do - local callchain = merge(ev, symbols, sep_vmst) + local callchain = merge(ev, symbols) local curr_node = root for i=#callchain,1,-1 do curr_node = insert(callchain[i].name, curr_node, false) -- 2.39.2 (Apple Git-143)
next prev parent reply other threads:[~2023-08-21 10:06 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-08-21 10:06 [Tarantool-patches] [PATCH luajit v4 0/3] sysprof: parser refactoring Maksim Kokryashkin via Tarantool-patches 2023-08-21 10:06 ` Maksim Kokryashkin via Tarantool-patches [this message] 2023-08-21 13:05 ` [Tarantool-patches] [PATCH luajit v4 1/3] sysprof: remove `split by vmstate` option Igor Munkin via Tarantool-patches 2023-08-21 13:37 ` Maxim Kokryashkin via Tarantool-patches 2023-08-21 10:06 ` [Tarantool-patches] [PATCH luajit v4 2/3] tools: add execution permission to sysprof parser Maksim Kokryashkin via Tarantool-patches 2023-08-21 10:06 ` [Tarantool-patches] [PATCH luajit v4 3/3] sysprof: improve parser's memory footprint Maksim Kokryashkin via Tarantool-patches 2023-08-21 13:05 ` Igor Munkin via Tarantool-patches 2023-08-31 15:17 ` [Tarantool-patches] [PATCH luajit v4 0/3] sysprof: parser refactoring Igor Munkin 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=20230821100604.61363-2-max.kokryashkin@gmail.com \ --to=tarantool-patches@dev.tarantool.org \ --cc=imun@tarantool.org \ --cc=m.kokryashkin@tarantool.org \ --cc=max.kokryashkin@gmail.com \ --cc=skaplun@tarantool.org \ --subject='Re: [Tarantool-patches] [PATCH luajit v4 1/3] sysprof: remove `split by vmstate` option' \ /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