Skip to content

Conversation

@slicklash
Copy link

@slicklash slicklash commented Oct 21, 2024

Problem

We want to parse and convert perf script output into pprof format. It's not possible without original binary and external tooling to derive Function.StartLine easily.

Solution

Implement symline option which outputs symbol in following format <symbol name>+<src line>+<symbol start line>

my_go_app   74083 20742.814623:     250000 cpu-clock:u: 
  4af76b main.cpuIntensiveWork+bar.go:21+bar.go:14 (/home/slicklash/tmp/perf/my_go_app)
  4af838 main.bar+bar.go:42+bar.go:40 (/home/slicklash/tmp/perf/my_go_app)
  4af7e9 main.foo+bar.go:35+bar.go:33 (/home/slicklash/tmp/perf/my_go_app)
  4afb87 main.main+bar.go:62+bar.go:48 (/home/slicklash/tmp/perf/my_go_app)
  436f5d runtime.main+types.go:194+proc.go:146 (/home/slicklash/tmp/perf/my_go_app)
  4652c1 runtime.goexit.abi0+asm_amd64.s:1696+asm_amd64.s:1695 (/home/slicklash/tmp/perf/my_go_app)

Copy link

@Jongy Jongy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Output looks good. I have some minor comments

@slicklash slicklash requested a review from Jongy October 22, 2024 13:27
@slicklash slicklash marked this pull request as ready for review October 22, 2024 13:41
@Jongy
Copy link

Jongy commented Oct 22, 2024

lgtm, can I merge @slicklash ?

@slicklash
Copy link
Author

lgtm, can I merge @slicklash ?

sure

@Jongy Jongy merged commit 9909d73 into granulate-perf Oct 22, 2024
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.

3 participants