summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbuild-aux/stack.c.gen9
1 files changed, 7 insertions, 2 deletions
diff --git a/build-aux/stack.c.gen b/build-aux/stack.c.gen
index 57191e3..06612ac 100755
--- a/build-aux/stack.c.gen
+++ b/build-aux/stack.c.gen
@@ -195,6 +195,8 @@ def main(ci_fnames: list[str]) -> None:
callee += f":{m.group('obj')}->vtable->{m.group('meth')}"
elif m := re_call_other.fullmatch(callstr):
callee += f":{m.group('func')}"
+ else:
+ callee += f':{elem.attrs.get("label", "")}'
graph[caller].calls.add(callee)
case _:
raise ValueError(f"unknown elem type {repr(elem.typ)}")
@@ -238,12 +240,15 @@ def main(ci_fnames: list[str]) -> None:
[0, *[nstatic(call, chain + [funcname]) for call in node.calls]]
)
- namelen = max(len(name) for name in graph if name.endswith("_cr"))
+ def thread_filter(name: str) -> bool:
+ return name.endswith("_cr") or name == "main"
+
+ namelen = max(len(name) for name in graph if thread_filter(name))
numlen = max(len(str(nstatic(name))) for name in graph if name.endswith("_cr"))
print(("=" * namelen) + " " + "=" * numlen)
for funcname in graph:
- if funcname.endswith("_cr"):
+ if thread_filter(funcname):
# dbg = "dhcp" in funcname
print(f"{funcname.ljust(namelen)} {str(nstatic(funcname)).rjust(numlen)}")