Closed GoogleCodeExporter closed 9 years ago
0.93 is quite old. Can you try again with perftools 1.3 -- I think the file
format
hasn't changed since 0.93, so just using the newer pprof should probably
suffice --
and see if you have the same problem? I must say this report surprises me. We
use
this functionality a lot within google, on very large binaries with lots of CPU
activity, and have never had a problem running out of space. How big is your
.profile? Do you have a simple use-case -- binary plus command-line to run it
--
that you could share that illustrates the problem?
The fix looks pretty straightforward, and I'm not opposed to applying it, but I
want
to understand first whether this is just a symptom of some other, underlying
problem.
Original comment by csilv...@gmail.com
on 31 Aug 2009 at 5:35
Also, in case this patch does end up being the right solution, can you
(electronically) sign the CLA at
http://code.google.com/legal/individual-cla-v1.0.html
Thanks!
craig
Original comment by csilv...@gmail.com
on 31 Aug 2009 at 5:36
Yes I had the same problem as of 1.2. I took a glance at 1.3 and the code is the
same. I use pprof with just the binary and the profile, no fancy options. The
fundamental problem is this:
my $nbytes = read(PROFILE, $str, (stat PROFILE)[7]); # read entire file
...
my @slots = unpack("L*", $str);
OOM happened when the file size went beyond 300-400 MB. For me that came from a
trace
of 4-5 hours of a particular software. 32-bit Perl went OOM after 3.5+ GB.
64-bit
Perl did better but it needed 30-40 GB total and nearly 30 minutes just to get
pack
the unpack() step.
So my patch is to address both the memory & runtime bloat.
Thanks for considering it.
Original comment by vvv...@gmail.com
on 3 Sep 2009 at 12:25
OK, I'm glad to know it's still in the current versions of pprof.
I understad that the problems you are seeing are because the profile file is
really
big. But what I don't understand is why it's so big. While I'm not the most
expert
at this part of the system, it seems to me these profiles should typically be
small,
even for executables that run for a long time. That's our experience, at least.
Do you have a simple example you can show, that generates such large profile
files?
That would help us understand if there's some other problem causing too-large
profile
files or not. Then we can know if this patch is the best fix, or something
else.
Original comment by csilv...@gmail.com
on 3 Sep 2009 at 1:50
In the meantime, I've tried applying the patch, and are asking other folks here
what
they think about it, so if it is the best solution, we'll be ready to go with
it.
Original comment by csilv...@gmail.com
on 3 Sep 2009 at 3:51
I think the reason for my very large profile file is because of the deep
stack-trace
in my software (at least 20-30 functions deep, up to 100-120). My application
has a
built-in Tcl interpreter and many commands are extended with C++ underneath.
The C++
code can be very deep sometimes. Each Tcl command nesting can introduce several
function layers. So that all adds up to quite a bit of stacking. Huge credit
goes to
tcmalloc and pprof for handling such a large software without hiccup! except
this one :-)
Original comment by vvv...@gmail.com
on 4 Sep 2009 at 3:12
We ended up getting rid of the look-behind, which isn't really needed, and made
a few
other tweaks, but this basic functionality is in perftools 1.4, just released.
Thanks for the patch!
Original comment by csilv...@gmail.com
on 11 Sep 2009 at 6:59
Original issue reported on code.google.com by
vvv...@gmail.com
on 28 Aug 2009 at 7:02