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: Wed, 26 Sep 2012 21:31:55 +0200

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

(I presume that was regex.c, not regexp.c.)

Thanks for the recipe.

> 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.

Can you show your results, for the reference?

The first lines in what I got (still only the memory profiler, the
itimer code is in the works and not ready yet) look suspicious to me
in the last column:

  + call-interactively                                       46,352,691   2%
  + Automatic Redisplay                                      30,389,586  -1%
  + scroll-up-command                                        24,834,342   2%
  + jit-lock-function                                        20,082,147   0%
  + scroll-up                                                15,687,351   3%
  + jit-lock-fontify-now                                      2,196,032   1%
  + byte-code                                                 1,426,989   1%
  + read-from-minibuffer                                        312,804   0%
  + run-hook-with-args                                          237,005   0%

(Overflow?)

Here's the same with the + signs expanded:

  - call-interactively                                       46,352,691   2%
    - scroll-up-command                                      43,373,729   0%
      - scroll-up                                            43,373,729   0%
        - jit-lock-function                                  41,648,995   0%
          - jit-lock-fontify-now                             41,648,995   0%
            - byte-code                                      41,619,059   0%
              - run-hook-with-args                           41,619,059   0%
                - font-lock-fontify-region                   41,619,059   0%
                  - c-font-lock-fontify-region               41,619,059   0%
                    - font-lock-default-fontify-region       40,842,125  -1%
                      - font-lock-fontify-keywords-region    39,963,822  -2%
                        - c-font-lock-declarations           34,602,780   1%
                          - c-find-decl-spots                34,602,780   1%
                            + #<compiled 0x40567bf>          28,867,024  -2%
                              looking-at                      2,817,588   1%
                              re-search-forward               1,791,738   1%
                            - c-forward-sws                     413,348   0%
                                looking-at                      355,304   0%
                                put-text-property                26,844   0%
                            - c-beginning-of-current-toke       150,676   0%
                                looking-at                      150,676   0%
                            - c-beginning-of-macro               66,408   0%
                                looking-at                       66,408   0%
                            - c-backward-sws                     39,468   0%
                                c-beginning-of-macro             12,480   0%




reply via email to

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