From: Maxim Kokryashkin via Tarantool-patches <tarantool-patches@dev.tarantool.org> To: tarantool-patches@dev.tarantool.org, skaplun@tarantool.org, imun@tarantool.org Subject: [Tarantool-patches] [PATCH luajit v3 2/4] sysprof: remove `split by vmstate` option Date: Mon, 31 Jul 2023 23:30:04 +0300 [thread overview] Message-ID: <2b57c59938395c0e2ce491e7bdf3b8d08a246b8f.1690834846.git.m.kokryashkin@tarantool.org> (raw) In-Reply-To: <cover.1690834846.git.m.kokryashkin@tarantool.org> 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.41.0
next prev parent reply other threads:[~2023-07-31 20:31 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-07-31 20:30 [Tarantool-patches] [PATCH luajit v3 0/4] sysprof: parser refactoring Maxim Kokryashkin via Tarantool-patches 2023-07-31 20:30 ` [Tarantool-patches] [PATCH luajit v3 1/4] utils: remove unnecessary insertion in AVL-tree Maxim Kokryashkin via Tarantool-patches 2023-08-15 18:50 ` Igor Munkin via Tarantool-patches 2023-07-31 20:30 ` Maxim Kokryashkin via Tarantool-patches [this message] 2023-08-15 18:51 ` [Tarantool-patches] [PATCH luajit v3 2/4] sysprof: remove `split by vmstate` option Igor Munkin via Tarantool-patches 2023-07-31 20:30 ` [Tarantool-patches] [PATCH luajit v3 3/4] tools: add execution permission to sysprof parser Maxim Kokryashkin via Tarantool-patches 2023-08-15 18:51 ` Igor Munkin via Tarantool-patches 2023-07-31 20:30 ` [Tarantool-patches] [PATCH luajit v3 4/4] sysprof: improve parser's memory footprint Maxim Kokryashkin via Tarantool-patches 2023-08-15 18:52 ` Igor Munkin via Tarantool-patches 2023-08-15 18:54 ` [Tarantool-patches] [PATCH luajit v3 0/4] 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=2b57c59938395c0e2ce491e7bdf3b8d08a246b8f.1690834846.git.m.kokryashkin@tarantool.org \ --to=tarantool-patches@dev.tarantool.org \ --cc=imun@tarantool.org \ --cc=max.kokryashkin@gmail.com \ --cc=skaplun@tarantool.org \ --subject='Re: [Tarantool-patches] [PATCH luajit v3 2/4] 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