emacs-devel
[Top][All Lists]
Advanced

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

Re: Tooltips GC overhead


From: martin rudalics
Subject: Re: Tooltips GC overhead
Date: Wed, 29 Jul 2015 09:18:23 +0200

> You could try M-x profiler-start RET mem RET, tho IIRC it counts all
> allocations rather than only those that affect calling the GC.

This gets me something like the tree below.  Can someone help me to
interpret it?  I am completely lost.  For example from

- timer-event-handler                                      56,501,327   4%
 - apply                                                   56,501,327   4%
  - tooltip-timeout                                        56,500,283   4%
   - run-hook-with-args-until-success                      56,500,283   4%
    - tooltip-help-tips                                    56,500,283   4%
     - tooltip-show                                        56,500,283   4%
      - x-show-tip                                         25,190,423   6%
       - face-set-after-frame-default                      24,981,305   5%
        + face-spec-recalc                                 24,955,421   5%
          face-list                                            19,836   0%
       + frame-set-background-mode                              1,044   0%
         run-at-time                                              996   0%
         frame-windows-min-size                                   996   0%
  + mouse-autoselect-window-select                              1,044   0%
+ command-execute                                           3,441,959   5%
+ redisplay_internal (C function)                             439,724   0%
  mode-line-modified-help-echo                                  8,188   0%
+ tooltip-show-help                                             6,264   0%
  mouse-fixup-help-message                                        512   0%
  ...                                                               0   0%

I deduce that `tooltip-show' is responsible for allocating 56,500,283
bytes (4% of what?).  Apparently, from this amount `x-show-tip' spends
25,190,423 bytes (6% of what?).  Who's responsible for the remaining 30
or so million bytes?  If the percentages are for the total number of
bytes allocated, why do 56 millions contribute 4% and three millions (as
for `command-execute') 5%?

Expanding the tree further gets me

- timer-event-handler                                      56,501,327   4%
 - apply                                                   56,501,327   4%
  - tooltip-timeout                                        56,500,283   4%
   - run-hook-with-args-until-success                      56,500,283   4%
    - tooltip-help-tips                                    56,500,283   4%
     - tooltip-show                                        56,500,283   4%
      - x-show-tip                                         25,190,423   6%
       - face-set-after-frame-default                      24,981,305   5%
        - face-spec-recalc                                 24,955,421   5%
         + face-spec-set-2                                 12,677,521   3%
         - make-face-x-resource-internal                    8,684,863  -3%
          - set-face-attributes-from-resources              8,684,863  -3%
           + set-face-attribute-from-resource               1,401,887   2%
         + face-spec-reset-face                             3,494,237   5%
         + face-spec-choose                                    16,324   0%
          face-list                                            19,836   0%
       + frame-set-background-mode                              1,044   0%
         run-at-time                                              996   0%
         frame-windows-min-size                                   996   0%
  + mouse-autoselect-window-select                              1,044   0%
+ command-execute                                           3,441,959   5%
+ redisplay_internal (C function)                             439,724   0%
  mode-line-modified-help-echo                                  8,188   0%
+ tooltip-show-help                                             6,264   0%
  mouse-fixup-help-message                                        512   0%
  ...                                                               0   0%

Again between `set-face-attributes-from-resources' with its 8,684,863
(why -3%?)  and `set-face-attribute-from-resource' with its 1,401,887 I
have a gap of 7 million bytes.  What am I missing?  Is the tree printing
routine deficient?

Thanks, martin



reply via email to

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