Skip to content

feat: record stacktrace with goroutine id for objects allocated in stack#76

Open
Lslightly wants to merge 3 commits into
cloudwego:mainfrom
Lslightly:stackvar-location
Open

feat: record stacktrace with goroutine id for objects allocated in stack#76
Lslightly wants to merge 3 commits into
cloudwego:mainfrom
Lslightly:stackvar-location

Conversation

@Lslightly

Copy link
Copy Markdown

What type of PR is this?

feat

Check the PR title.

  • This PR title match the format: <type>(optional scope): <description>
  • The description of this PR title is user-oriented and clear enough for others to understand.
  • Attach the PR updating the user documentation if the current PR requires user awareness at the usage level. User docs repo

(Optional) Translate the PR title into Chinese.

(Optional) More detailed description for this PR(en: English/zh: Chinese).

en: For local variables in stack, the stacktrace is recorded as pprofIndex and the goroutine id is also recorded at the bottom of the stacktrace, i.e. the top of the pprof flamegraph in the form of G<id>.
zh(optional):

Take test/testdata/manygo/main.go as an example. The flamegraph is as follows. There are 3 groups of goroutines whose members share same stacktrace.

Hope that it supplements goroutine leak profile.

image

(Optional) Which issue(s) this PR fixes:

Fixes #65

(optional) The PR that updates user documentation:

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Record stack trace for root objects which are local variables

1 participant