Skip to content

fix(flamegraph): use root name index#252

Open
pkurunner wants to merge 1 commit into
ccfos:mainfrom
pkurunner:codex/fix-flamegraph-root-name-20260621
Open

fix(flamegraph): use root name index#252
pkurunner wants to merge 1 commit into
ccfos:mainfrom
pkurunner:codex/fix-flamegraph-root-name-20260621

Conversation

@pkurunner

Copy link
Copy Markdown
Contributor

LevelsToTree was reading the root label from Values[0], but that slot is the start offset. Child nodes already read names from NameOffest; the root should do the same, otherwise a root whose name index is not zero gets labeled incorrectly.

Testing:

  • gofmt -w internal/flamegraph/flamegraph.go internal/flamegraph/flamegraph_test.go
  • GOCACHE=.gocache-flamegraph go test ./internal/flamegraph

Signed-off-by: yeyangyi <2501210756@stu.pku.edu.cn>
@pkurunner pkurunner force-pushed the codex/fix-flamegraph-root-name-20260621 branch from fee78db to 4e0a76c Compare June 20, 2026 17:51
@pkurunner

Copy link
Copy Markdown
Contributor Author

CI note: PR name lint and Build/Lint passed. Ubuntu 22.04 VM failed before tests while installing capnproto: apt-get could not acquire /var/lib/dpkg/lock-frontend because unattended-upgr was holding it, so this looks unrelated to the flamegraph change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant