Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

should top10 listing shows file names? #106

Closed
rsc opened this issue Mar 7, 2017 · 2 comments · Fixed by #110
Closed

should top10 listing shows file names? #106

rsc opened this issue Mar 7, 2017 · 2 comments · Fixed by #110

Comments

@rsc
Copy link
Contributor

rsc commented Mar 7, 2017

$ go tool pprof x.prof
Type: cpu
Time: Mar 7, 2017 at 10:22am (EST)
Duration: 45.82s, Total samples = 400.50ms ( 0.87%)
Entering interactive mode (type "help" for commands, "o" for options)
(pprof) top10
Showing nodes accounting for 399.40ms, 99.73% of 400.50ms total
Dropped 42 nodes (cum <= 2ms)
Showing top 10 nodes out of 24
      flat  flat%   sum%        cum   cum%
  110.70ms 27.64% 27.64%   110.70ms 27.64%  rsc.io/tmp/gammabench.Lgamma17 /Users/rsc/src/rsc.io/tmp/gammabench/lgamma17.s
  107.90ms 26.94% 54.58%   107.90ms 26.94%  rsc.io/tmp/gammabench.LgammaZZZ /Users/rsc/src/rsc.io/tmp/gammabench/lgammazzz.s
   96.70ms 24.14% 78.73%    96.70ms 24.14%  rsc.io/tmp/gammabench.Lgamma16 /Users/rsc/src/rsc.io/tmp/gammabench/lgamma16.s
   60.60ms 15.13% 93.86%    60.60ms 15.13%  runtime.usleep /Users/rsc/go/src/runtime/sys_darwin_amd64.s
    9.60ms  2.40% 96.25%   106.30ms 26.54%  rsc.io/tmp/gammabench.BenchmarkLgamma16 /Users/rsc/src/rsc.io/tmp/gammabench/g_test.go
    5.50ms  1.37% 97.63%   113.40ms 28.31%  rsc.io/tmp/gammabench.BenchmarkLgammaZZZ /Users/rsc/src/rsc.io/tmp/gammabench/g_test.go
    4.20ms  1.05% 98.68%   114.90ms 28.69%  rsc.io/tmp/gammabench.BenchmarkLgamma17 /Users/rsc/src/rsc.io/tmp/gammabench/g_test.go
    4.20ms  1.05% 99.73%     4.20ms  1.05%  runtime.mach_semaphore_signal /Users/rsc/go/src/runtime/sys_darwin_amd64.s
         0     0% 99.73%     3.90ms  0.97%  runtime.goready /Users/rsc/go/src/runtime/proc.go
         0     0% 99.73%     3.90ms  0.97%  runtime.goready.func1 /Users/rsc/go/src/runtime/proc.go
(pprof) 

These file names didn't used to be there, and they make the output pretty wide and noisy. Are they intended to be there? Am I doing something wrong in the profile generation?

Thanks.

@rauls5382
Copy link
Contributor

The go version of pprof has always printed the source filenames with the function names.
We didn't see them with Go before because the filenames weren't available with offline symbolization.

I can change this so that we only print the function names for text reports at function granularity.

@rsc
Copy link
Contributor Author

rsc commented Mar 7, 2017

That sounds good, thanks.

rauls5382 added a commit to rauls5382/pprof that referenced this issue Mar 10, 2017
Previously we were showing filenames together with function names
when generating reports at function granularity. This was an attempt
to provide more information to the user but it can clutter the output.

Also, in cases where functions may be associated to multiple files
(eg different template instantiations in C++) keeping the filename
may prevent us from combining nodes from the same function.

Will stop keeping filenames at the default function granularity, and will
remove the "functionnameonly" option which was previously prividing this
functionality.

This fixes google#106
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 a pull request may close this issue.

2 participants