[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Elisp native profiler

From: Stefan Monnier
Subject: Re: Elisp native profiler
Date: Wed, 26 Sep 2012 13:49:57 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux)

>> I didn't say we should prevent users of other platforms from enjoying
>> this feature.  But if this will be in 24.3, someone, probably myself,
>> will need to add the missing pieces to get it working on Windows.

> Btw, is it possible to have a simple test case, starting from "emacs -Q",
> to check that the profiling (both cpu and memory) works?  That would
> simplify testing of this on MS-Windows.

I typically do:

   emacs -Q
   M-x profiler-start RET
   C-x C-f src/regexp.c RET
   page-down until I get to the end of the buffer, then page-up to the beginning
   M-x profiler-report RET

Verifying that the resulting profile is accurate is rather difficult,
of course, so as long as it looks credible, I assume it's more or
less correct.  Note that the sampler truncates the backtraces it records
if they're too deep and profiler.el doesn't know yet how to make up for it
(it assumes the backtraces aren't truncated), so "deep" backtraces lead
to profiles where some internal functions appear to be called at
top-level.  It would be nice to fix this, but it's probably going to
take more time, so the workaround is to increase
profiler-max-stack-depth if it turns out to be a problem.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]