Closed GoogleCodeExporter closed 9 years ago
Two more patches for pprof --interactive
a) do not use readline, when STDIN is not a terminal
Original comment by weidenri...@gmx.de
on 7 Mar 2010 at 10:49
Attachments:
b) write comments and (pprof) to stderr, not to disturb output generated by
echo "
top50
callgrind /tmp/callgrind
quit
" | pprof --interactive
Original comment by weidenri...@gmx.de
on 7 Mar 2010 at 10:51
Attachments:
I guess I don't totally understand the motivation for these patches. Why not
just do
pprof --callgrind
and
pprof --text
? It seems weird to have a non-interactive --interactive mode.
Original comment by csilv...@gmail.com
on 7 Mar 2010 at 11:26
The reason for the weird non-interactive --interactive mode is speed:
The symbol detection is only done once, and sometimes this can save me more
than 15
minutes.
Original comment by weidenri...@gmx.de
on 7 Mar 2010 at 11:44
Isn't that what --raw mode is supposed to address? What happens if you use
--raw to
create a raw profile, and then try to call --callgrind and --text on that?
Original comment by csilv...@gmail.com
on 8 Mar 2010 at 7:41
I fully agree, --raw would be the canonical way for this, but see
http://code.google.com/p/google-perftools/issues/detail?id=219 ... it does not
support lines. :-)
Original comment by weidenri...@gmx.de
on 9 Mar 2010 at 7:59
I wonder if it's better to fix that bug instead. It will make --raw more
useful for
all kinds of things, and then obviate the need to abuse --interactive mode like
this.
Another alternative would be to change pprof to allow multiple flags at once.
That
idea's been suggested before as well. It's a bit tricky since sometimes
different
flags want to output to the same place, but maybe we could figure out a way.
But I
bet augmenting --raw support will be easier and work just as well.
Original comment by csilv...@gmail.com
on 9 Mar 2010 at 7:00
Again, I agree. Additionally I think that the two patches,
a) do not use "readline" when stdin is not a tty and
b) write diagnostic output to STDERR as it is done in the rest of pprof, are an
improvement in their own right.
Original comment by weidenri...@gmx.de
on 10 Mar 2010 at 8:59
Fair enough. I'll pass them along to the pprof experts here for their
consideration.
Original comment by csilv...@gmail.com
on 10 Mar 2010 at 4:23
OK, everyone's on board with these changes. They'll be in the next release.
Original comment by csilv...@gmail.com
on 10 Mar 2010 at 6:01
This is in perftools 1.6, just released.
Original comment by csilv...@gmail.com
on 5 Aug 2010 at 8:49
Original issue reported on code.google.com by
weidenri...@gmx.de
on 26 Feb 2010 at 1:33Attachments: