Skip to content

Commit

Permalink
examples/callgraph/func_size.py: a script to print function sizes
Browse files Browse the repository at this point in the history
  • Loading branch information
yamt committed Sep 4, 2024
1 parent fd86709 commit 76a3019
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions examples/callgraph/func_size.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# eg.
# callgraph a.wasm|python3 func_size.py|sort -nr|head -10

import json
import sys


j = json.load(sys.stdin)
funcs = j["funcs"]
for f in funcs:
if "expr_size" not in f:
continue
print(f"{f['expr_size']} {f['name']}")

0 comments on commit 76a3019

Please sign in to comment.