unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* How to let `profiler-report` show more info for `redisplay_internal`?
@ 2024-09-02  3:02 Eval EXEC
  2024-09-02 11:51 ` Eli Zaretskii
  2024-09-02 11:52 ` Eli Zaretskii
  0 siblings, 2 replies; 4+ messages in thread
From: Eval EXEC @ 2024-09-02  3:02 UTC (permalink / raw)
  To: emacs-devel

Hello,

I started Emacs, in scratch buffer, I execute `profiler-start`, move 
around, then `profiler-report`.

It show me:

```

          103  94% - redisplay_internal (C function)
            3   2%  - eval
            2   1%   - minions--prominent-modes
            2   1%    - cl-remove-if-not
            2   1%     - cl-remove
            1   0%        cl-ldiff
            1   0%   - mode--line-format-right-align
            1   0%    - eval
            1   0%     - minions--prominent-modes
            1   0%      - cl-remove-if-not
            1   0%         cl-remove
            6   5% - timer-event-handler
            6   5%  - apply
            6   5%   - #<native-comp-function 
F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_23>
            6   5%      jit-lock-context-fontify
            0   0%   ...
```


I noticed that `redisplay_internal` is consuming 94% of the CPU, but the 
sum of the child items below `redisplay_internal` is less than 2%. Where 
is the remaining 92% going? I'd like to see a more detailed CPU profile 
for `redisplay_internal`.

Is it possible to get a detailed CPU profile for `redisplay_internal`?





^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: How to let `profiler-report` show more info for `redisplay_internal`?
  2024-09-02  3:02 How to let `profiler-report` show more info for `redisplay_internal`? Eval EXEC
@ 2024-09-02 11:51 ` Eli Zaretskii
  2024-09-02 11:52 ` Eli Zaretskii
  1 sibling, 0 replies; 4+ messages in thread
From: Eli Zaretskii @ 2024-09-02 11:51 UTC (permalink / raw)
  To: Eval EXEC; +Cc: emacs-devel

> Date: Mon, 2 Sep 2024 11:02:50 +0800
> From: Eval EXEC <execvy@gmail.com>
> 
>           103  94% - redisplay_internal (C function)
>             3   2%  - eval
>             2   1%   - minions--prominent-modes
>             2   1%    - cl-remove-if-not
>             2   1%     - cl-remove
>             1   0%        cl-ldiff
>             1   0%   - mode--line-format-right-align
>             1   0%    - eval
>             1   0%     - minions--prominent-modes
>             1   0%      - cl-remove-if-not
>             1   0%         cl-remove
>             6   5% - timer-event-handler
>             6   5%  - apply
>             6   5%   - #<native-comp-function 
> F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_23>
>             6   5%      jit-lock-context-fontify
>             0   0%   ...
> ```
> 
> 
> I noticed that `redisplay_internal` is consuming 94% of the CPU, but the 
> sum of the child items below `redisplay_internal` is less than 2%. Where 
> is the remaining 92% going? I'd like to see a more detailed CPU profile 
> for `redisplay_internal`.
> 
> Is it possible to get a detailed CPU profile for `redisplay_internal`?

No, you cannot, because redisplay_internal is written in C, and
profiler.el can only analyze profiles of Lisp code.

You need to use a tool like prof for profiling C code.

Sorry.



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: How to let `profiler-report` show more info for `redisplay_internal`?
  2024-09-02  3:02 How to let `profiler-report` show more info for `redisplay_internal`? Eval EXEC
  2024-09-02 11:51 ` Eli Zaretskii
@ 2024-09-02 11:52 ` Eli Zaretskii
  2024-09-02 12:25   ` Eval Exec
  1 sibling, 1 reply; 4+ messages in thread
From: Eli Zaretskii @ 2024-09-02 11:52 UTC (permalink / raw)
  To: Eval EXEC; +Cc: emacs-devel

> Date: Mon, 2 Sep 2024 11:02:50 +0800
> From: Eval EXEC <execvy@gmail.com>
> 
>           103  94% - redisplay_internal (C function)
>             3   2%  - eval
>             2   1%   - minions--prominent-modes
>             2   1%    - cl-remove-if-not
>             2   1%     - cl-remove
>             1   0%        cl-ldiff
>             1   0%   - mode--line-format-right-align
>             1   0%    - eval
>             1   0%     - minions--prominent-modes
>             1   0%      - cl-remove-if-not
>             1   0%         cl-remove
>             6   5% - timer-event-handler
>             6   5%  - apply
>             6   5%   - #<native-comp-function 
> F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_23>
>             6   5%      jit-lock-context-fontify
>             0   0%   ...
> ```
> 
> 
> I noticed that `redisplay_internal` is consuming 94% of the CPU, but the 
> sum of the child items below `redisplay_internal` is less than 2%. Where 
> is the remaining 92% going? I'd like to see a more detailed CPU profile 
> for `redisplay_internal`.
> 
> Is it possible to get a detailed CPU profile for `redisplay_internal`?

No, you cannot, because redisplay_internal is written in C, and
profiler.el can only analyze profiles of Lisp code.

You need to use a tool like perf for profiling C code.

Sorry.



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: How to let `profiler-report` show more info for `redisplay_internal`?
  2024-09-02 11:52 ` Eli Zaretskii
@ 2024-09-02 12:25   ` Eval Exec
  0 siblings, 0 replies; 4+ messages in thread
From: Eval Exec @ 2024-09-02 12:25 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

Thank you!

On Mon, Sep 2, 2024 at 7:52 PM Eli Zaretskii <eliz@gnu.org> wrote:
>
> > Date: Mon, 2 Sep 2024 11:02:50 +0800
> > From: Eval EXEC <execvy@gmail.com>
> >
> >           103  94% - redisplay_internal (C function)
> >             3   2%  - eval
> >             2   1%   - minions--prominent-modes
> >             2   1%    - cl-remove-if-not
> >             2   1%     - cl-remove
> >             1   0%        cl-ldiff
> >             1   0%   - mode--line-format-right-align
> >             1   0%    - eval
> >             1   0%     - minions--prominent-modes
> >             1   0%      - cl-remove-if-not
> >             1   0%         cl-remove
> >             6   5% - timer-event-handler
> >             6   5%  - apply
> >             6   5%   - #<native-comp-function
> > F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_23>
> >             6   5%      jit-lock-context-fontify
> >             0   0%   ...
> > ```
> >
> >
> > I noticed that `redisplay_internal` is consuming 94% of the CPU, but the
> > sum of the child items below `redisplay_internal` is less than 2%. Where
> > is the remaining 92% going? I'd like to see a more detailed CPU profile
> > for `redisplay_internal`.
> >
> > Is it possible to get a detailed CPU profile for `redisplay_internal`?
>
> No, you cannot, because redisplay_internal is written in C, and
> profiler.el can only analyze profiles of Lisp code.
>
> You need to use a tool like perf for profiling C code.
>
> Sorry.



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-09-02 12:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-02  3:02 How to let `profiler-report` show more info for `redisplay_internal`? Eval EXEC
2024-09-02 11:51 ` Eli Zaretskii
2024-09-02 11:52 ` Eli Zaretskii
2024-09-02 12:25   ` Eval Exec

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).