Re: statistical vs deterministic profilers



Thibault Langlois <thibault.langlois@xxxxxxxxx> wrote:
I am wondering what are the advantages of a statistical over a
deterministic profiler.
I remember that when I used Lispworks profiler I had to run several
times to get a good idea of the location of the hot spots. By
contrast, I can run a deterministic profiler only once and I know
exactly how many times a function is called, how much time it takes to
compute, how much memory is used and so on.

Am I missing something ?

The SBCL statistical profiler has at least the following advantages
over the deterministic one:

* Has lower overhead, and thus can produce more accurate results;
this is especially important with small functions, where the
profiling overhead can easily be as large as the time spent doing
real work.
* Shows what the hotspots are inside a function, not just which
functions are hotspots
* Collects call graph data
* Profiles anonymous / local functions
* Profiles everything, including the standard CL library functions,
not just the functions in your application that you suspect might
be important
* Has a Slime interface for browsing call graphs (though it's not
included with the standard Slime distribution)

Now, some of these advantages aren't really fundamental: someone could
implement a deterministic profiler with less overhead, or one that's
capable of collecting call graph data, or even one that can handle
anonymous functions. But it's pretty hard to improve one point without
making the situation with others worse. For example adding call graph
support would increase the profiling overhead.

--
Juho Snellman
.



Relevant Pages

  • Re: iteration, recursion, profiling
    ... to estimate the profiling overhead per function call, and adjusts the ... measured times based on those results. ... I'll take a look at the statistical profiler. ...
    (comp.lang.lisp)
  • Re: iteration, recursion, profiling
    ... The SBCL instrumenting profiler tries ... to estimate the profiling overhead per function call, and adjusts the ... measured times based on those results. ...
    (comp.lang.lisp)