emacs-devel
[Top][All Lists]
Advanced

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

Re: Elisp native profiler


From: Eli Zaretskii
Subject: Re: Elisp native profiler
Date: Sat, 29 Sep 2012 17:24:32 +0200

> From: Stefan Monnier <address@hidden>
> Cc: address@hidden
> Date: Wed, 26 Sep 2012 13:49:57 -0400
> 
> 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.

Is the cpu profile below (obtained with the above recipe) reasonable?

Why do functions like scroll-up-command and jit-lock-function appear
twice or three times, once under call-interactively, the other time by
themselves or under scroll-up?

(Should we rename "Automatic GC" like we did with redisplay?)

 - call-interactively                                               83  47%
   - scroll-up-command                                              43  24%
     - scroll-up                                                    43  24%
       - jit-lock-function                                          40  22%
         - jit-lock-fontify-now                                     40  22%
           - byte-code                                              40  22%
             - run-hook-with-args                                   40  22%
               - font-lock-fontify-region                           40  22%
                 - c-font-lock-fontify-region                       40  22%
                   - font-lock-default-fontify-region               38  21%
                     - font-lock-fontify-keywords-region            37  21%
                       - c-font-lock-declarations                   28  16%
                         - c-find-decl-spots                        28  16%
                           - #<compiled 0xd66b09>                   25  14%
                             + c-determine-limit                    16   9%
                               looking-at                            2   1%
                             + c-parse-state                         2   1%
                             + c-forward-decl-or-cast-1              1   0%
                             + c-font-lock-declarators               1   0%
                             + c-cheap-inside-bracelist-p            1   0%
                             + c-backward-sws                        1   0%
                             looking-at                              2   1%
                           + c-forward-sws                           1   0%
                         re-search-forward                           3   1%
                       + c-font-lock-enclosing-decls                 2   1%
                       + c-font-lock-enum-tail                       1   0%
                       + #<compiled 0xd6756d>                        1   0%
                       + c-font-lock-complex-decl-prepare            1   0%
                       + #<compiled 0xd67523>                        1   0%
                     + font-lock-fontify-syntactically-region        1   0%
                   - mapc                                            2   1%
                     + #<compiled 0xd36357>                          2   1%
   - list                                                           40  22%
     - read-extended-command                                        40  22%
       - completing-read                                            40  22%
         - completing-read-default                                  40  22%
             read-from-minibuffer                                   40  22%
 - scroll-up                                                        20  11%
   - jit-lock-function                                              20  11%
     - jit-lock-fontify-now                                         20  11%
       - byte-code                                                  20  11%
         + run-hook-with-args                                       20  11%
   Automatic GC                                                     17   9%
 + redisplay_internal (C function)                                  16   9%
 - scroll-up-command                                                14   8%
   + scroll-up                                                      14   8%
 + jit-lock-function                                                14   8%
 + byte-code                                                         6   3%
 + jit-lock-fontify-now                                              4   2%
 + font-lock-fontify-region                                          1   0%



reply via email to

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