Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are "unstacked calls in outer" in Perl's Devel::DProf?

I am profiling a Perl application with perl -d:DProf. When running dprofpp on the resulting tmon.out file, I get warnings like these:

Compress::Zlib::__ANON__ has 5 unstacked calls in outer
Compress::Zlib::AUTOLOAD has -5 unstacked calls in outer
  • What is an unstacked call?
  • Who or what is "outer"?
  • What do the numbers mean? How can there be a negative number of calls?
  • Should I worry?
like image 371
innaM Avatar asked Dec 16 '08 16:12

innaM


1 Answers

I'll give this a shot:

  • Unstacked calls indicate that when DProf was analyzing the profile, it encountered more (or fewer) calls on the stack (in the profile) than it expected to, meaning that the profiling data is incorrect.
  • "outer" refers to the internal variable %outer in DProf, which (apparently) tracks the stack counts when analyzing a profile.
  • The numbers indicate how many calls DProf expected to find versus how many it found. 5 means that there are more calls than it expected, -5 means there are 5 fewer. Again, this is because the profile data is corrupt.
  • I wouldn't worry about your code integrity, because AFAIK this is due to bugs in the implementation of DProf itself. It seems DProf got confused when writing the tmon.out file. However, the rest of the results from dprofpp may be unreliable due to this inaccuracy. So, you should worry (a little) about the accuracy of those results.

You may want to look into alternate profiling module, like Devel::NYTProf

like image 171
Adam Bellaire Avatar answered Nov 15 '22 08:11

Adam Bellaire