<div dir="ltr">I am building numpy from source, python setup.py build --fcompiler=gnu95<div>then installation, python setup.py install --user, on ubuntu 13.04</div><div><br></div><div style>for analysis results </div><div>
pprof --svg /usr/bin/python py.prof <br></div><div><div><br></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Jun 17, 2013 at 10:04 PM, Nathaniel Smith <span dir="ltr"><<a href="mailto:njs@pobox.com" target="_blank">njs@pobox.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Mon, Jun 17, 2013 at 4:29 PM, Arink Verma <<a href="mailto:arinkverma@gmail.com">arinkverma@gmail.com</a>> wrote:<br>

> Hi Nathaniel<br>
><br>
>> It's a probabilistic sampling profiler, so if it doesn't have enough<br>
>> samples then it can miss things. 227 samples is way way too low. You need to<br>
>> run the profiled code for longer (a few seconds at least), and if that's not<br>
>> enough then maybe increase the sampling rate too (though be careful because<br>
>> setting this too high can also add noise).<br>
><br>
><br>
> I ran code '1000000000' times, which record 229115 samples. Callgraph[1]<br>
> generated is converging to PyArray_DESCR, and rest are unconnected.<br>
><br>
> Does it mean anything?<br>
> [1]<a href="https://docs.google.com/file/d/0B3Pqyp8kuQw0MzRoTTNVbmlaNFE/edit?usp=sharing" target="_blank">https://docs.google.com/file/d/0B3Pqyp8kuQw0MzRoTTNVbmlaNFE/edit?usp=sharing</a><br>
<br>
</div></div>I think it means that pprof is failing to walk to the stack to compute<br>
callers. That's consistent with PyArray_DESCR being the only "call"<br>
that it can find, because PyArray_DESCR isn't a real function, it<br>
always gets inlined, so detecting the caller doesn't require walking<br>
the stack.<br>
<br>
Is your numpy compiled with -fomit-frame-pointer or something like<br>
that? Any other weird build options used while building it? Is your<br>
binary stripped? If you're using a distro version, do you have the<br>
debug symbols installed? Did you compile this numpy yourself? (If not,<br>
the simplest thing to do would be to just build it yourself using the<br>
default settings and see if that helps.) What OS are you on?<br>
<br>
When I run your profiling code (but being lazier and only running<br>
12000 samples), then do 'google-pprof --pdf /path/to/python<br>
/path/to/my/profile.prof', then I get the graph attached below.<br>
<span class="HOEnZb"><font color="#888888"><br>
-n<br>
</font></span><br>_______________________________________________<br>
NumPy-Discussion mailing list<br>
<a href="mailto:NumPy-Discussion@scipy.org">NumPy-Discussion@scipy.org</a><br>
<a href="http://mail.scipy.org/mailman/listinfo/numpy-discussion" target="_blank">http://mail.scipy.org/mailman/listinfo/numpy-discussion</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr"><div style="outline-style:none"><br></div><div style="outline-style:none">Arink Verma</div><div style="outline-style:none"><a href="http://www.arinkverma.in" target="_blank">www.arinkverma.in</a><br>
</div><div style="outline-style:none"></div></div>
</div>