tfzxyinhao / gperftools

Automatically exported from code.google.com/p/gperftools
BSD 3-Clause "New" or "Revised" License
1 stars 0 forks source link

Documentation is confusing #391

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I found the documentation at 

http://google-perftools.googlecode.com/svn/trunk/doc/cpuprofile.html

to be quite confusing. You write:

env CPUPROFILE=/tmp/mybin.prof 
/usr/local/bin/my_binary_compiled_with_libprofiler_so

pprof --text /bin/ls ls.prof

What you mean is:

env CPUPROFILE=/tmp/mybin.prof /path/to/mybin

pprof --text /path/to/mybin mybin.prof

As a new and quite busy user of your tool, I spent half an hour reading your 
and other pages until I figured this out. It would be very much appreciated if 
the documentation is made more consistent and more clear. 

Original issue reported on code.google.com by oleg.ale...@gmail.com on 10 Jan 2012 at 6:36

GoogleCodeExporter commented 9 years ago
Correction:

env CPUPROFILE=/tmp/mybin.prof /path/to/mybin

pprof --text /path/to/mybin /tmp/mybin.prof

Original comment by oleg.ale...@gmail.com on 10 Jan 2012 at 6:37

GoogleCodeExporter commented 9 years ago
Hmm, I'm not sure I agree the old wording was confusing, but it's easy enough 
to change. I've changed it to use /bin/ls as the example binary everywhere in 
the cpu-profile doc.

The other docs, for heap-profile and leak-checker, did not seem to have the 
same issue, so I've left them unchanged.

This will all be in the next release.

Original comment by csilv...@gmail.com on 13 Jan 2012 at 6:59

GoogleCodeExporter commented 9 years ago
Thank you. I do not see any updates in
http://google-perftools.googlecode.com/svn/trunk/doc/cpuprofile.html

Consistency is great.

However, using /bin/ls as an example may be unfortunate, since of
course it is not linked with -lprof so if the user tries to literally
profile /bin/ls it won't work.

I like more the use of "path/to/mybin mybin.conf" as opposed to
"/bin/ls ls.conf", but what's more important is of course consistency.

Original comment by oleg.ale...@gmail.com on 13 Jan 2012 at 10:06

GoogleCodeExporter commented 9 years ago
Yes, sorry, I haven't pushed the changes to svn yet.  Will do so when I get a 
chance, though it may be a few days (or weeks...)

Original comment by csilv...@gmail.com on 13 Jan 2012 at 10:33

GoogleCodeExporter commented 9 years ago
This should be improved in perftools 1.10, just released.

Original comment by csilv...@gmail.com on 31 Jan 2012 at 7:18

GoogleCodeExporter commented 9 years ago
The documentation  at

http://google-perftools.googlecode.com/svn/trunk/doc/cpuprofile.html

did not change.

Original comment by oleg.ale...@gmail.com on 1 Feb 2012 at 4:29

GoogleCodeExporter commented 9 years ago
Sorry, such urls are obsolete (I don't know how to get google code to redirect 
them).  Everything now lives at gperftools.googlecode.com, and the changes are 
reflected at
   http://gperftools.googlecode.com/svn/trunk/doc/cpuprofile.html

Original comment by csilv...@gmail.com on 1 Feb 2012 at 6:33

GoogleCodeExporter commented 9 years ago
Thanks, it is much better.

It is still a bit funny that one would ever link the system /bin/ls
with gperf, but at least things are now consistent.

On Tue, Jan 31, 2012 at 8:28 PM, Oleg Alexandrov
<oleg.alexandrov@gmail.com> wrote:

Original comment by oleg.ale...@gmail.com on 2 Feb 2012 at 12:36