[Top][All Lists]
[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: |
Mon, 01 Oct 2012 19:59:46 +0200 |
> Date: Mon, 01 Oct 2012 19:52:39 +0200
> From: Eli Zaretskii <address@hidden>
> Cc: address@hidden, address@hidden, address@hidden
>
> > It's quite worrisome that a simple counting operation, done every 15 ms,
> > should nearly peg a core. Something seems amiss.
>
> I think this is because with the minimal sampling period I allow, the
> timer thread almost never sleeps, and I think the signal handler does
> quite a lot.
Actually, I take this back: I'm quite sure the problem is that the
handler is quite expensive. The proof: when the user types
"M-x profiler-stop RET", the timer thread does not exit, it continues
to run, sleeping 30 ms at a time, then awakens, sees that the timer is
disabled, and goes back to sleep. So almost the whole thread loop is
executed, except suspending/resuming the main thread and calling the
handler. The difference in terms of CPU usage is tremendous, though:
zero CPU usage.
So either suspending/resuming a thread takes a lot of time, or the
handler, or both.
Re: Elisp native profiler, Stefan Monnier, 2012/10/01
Re: Elisp native profiler, Paul Eggert, 2012/10/01
Re: Elisp native profiler, Stefan Monnier, 2012/10/01
Re: Elisp native profiler, Eli Zaretskii, 2012/10/02
Re: Elisp native profiler, Stefan Monnier, 2012/10/02
Re: Elisp native profiler, Eli Zaretskii, 2012/10/02
Re: Elisp native profiler, Stefan Monnier, 2012/10/02
Re: Elisp native profiler, Paul Eggert, 2012/10/02
Re: Elisp native profiler, Stefan Monnier, 2012/10/02
Re: Elisp native profiler, Paul Eggert, 2012/10/02