unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* How to debug high CPU usage -> hang
@ 2023-01-10 14:58 Ken Goldman
  2023-01-10 15:21 ` Eli Zaretskii
  0 siblings, 1 reply; 5+ messages in thread
From: Ken Goldman @ 2023-01-10 14:58 UTC (permalink / raw)
  To: help-gnu-emacs

I'm editing in ReST mode, Windows 11, emacs 28.1.

Occasionally, I want to jump (search, etc.) and the CPU usage jumps and 
emacs hangs. I suspect a font-lock issue.

I fixed one by bisecting the text, then changing a table type.  Now I 
have another.

Is there a general way to debug?




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

* Re: How to debug high CPU usage -> hang
  2023-01-10 14:58 How to debug high CPU usage -> hang Ken Goldman
@ 2023-01-10 15:21 ` Eli Zaretskii
  2023-01-11 20:24   ` Ken Goldman
  0 siblings, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2023-01-10 15:21 UTC (permalink / raw)
  To: help-gnu-emacs

> From: Ken Goldman <kgoldman@us.ibm.com>
> Date: Tue, 10 Jan 2023 09:58:58 -0500
> 
> I'm editing in ReST mode, Windows 11, emacs 28.1.
> 
> Occasionally, I want to jump (search, etc.) and the CPU usage jumps and 
> emacs hangs. I suspect a font-lock issue.
> 
> I fixed one by bisecting the text, then changing a table type.  Now I 
> have another.
> 
> Is there a general way to debug?

I can suggest profiling and/or attaching a debugger.



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

* Re: How to debug high CPU usage -> hang
  2023-01-10 15:21 ` Eli Zaretskii
@ 2023-01-11 20:24   ` Ken Goldman
  2023-01-12  7:36     ` Eli Zaretskii
  0 siblings, 1 reply; 5+ messages in thread
From: Ken Goldman @ 2023-01-11 20:24 UTC (permalink / raw)
  To: help-gnu-emacs

On 1/10/2023 10:21 AM, Eli Zaretskii wrote:
>> From: Ken Goldman <kgoldman@us.ibm.com>
>> Date: Tue, 10 Jan 2023 09:58:58 -0500
>>
>> I'm editing in ReST mode, Windows 11, emacs 28.1.
>>
>> Occasionally, I want to jump (search, etc.) and the CPU usage jumps and
>> emacs hangs. I suspect a font-lock issue.
>>
>> I fixed one by bisecting the text, then changing a table type.  Now I
>> have another.
>>
>> Is there a general way to debug?
> 
> I can suggest profiling and/or attaching a debugger.
> 

Attaching a debugger to the lisp major mode, or building emacs from
source?





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

* Re: How to debug high CPU usage -> hang
  2023-01-11 20:24   ` Ken Goldman
@ 2023-01-12  7:36     ` Eli Zaretskii
  2023-01-12 10:36       ` Manuel Giraud
  0 siblings, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2023-01-12  7:36 UTC (permalink / raw)
  To: help-gnu-emacs

> From: Ken Goldman <kgoldman@us.ibm.com>
> Date: Wed, 11 Jan 2023 15:24:53 -0500
> 
> On 1/10/2023 10:21 AM, Eli Zaretskii wrote:
> >> From: Ken Goldman <kgoldman@us.ibm.com>
> >> Date: Tue, 10 Jan 2023 09:58:58 -0500
> >>
> >> I'm editing in ReST mode, Windows 11, emacs 28.1.
> >>
> >> Occasionally, I want to jump (search, etc.) and the CPU usage jumps and
> >> emacs hangs. I suspect a font-lock issue.
> >>
> >> I fixed one by bisecting the text, then changing a table type.  Now I
> >> have another.
> >>
> >> Is there a general way to debug?
> > 
> > I can suggest profiling and/or attaching a debugger.
> > 
> 
> Attaching a debugger to the lisp major mode, or building emacs from
> source?

Attaching a debugger (GDB) to Emacs when its CPU usage jumps.  This
requires Emacs built with debug info, or installing the separate debug
info from your distro.



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

* Re: How to debug high CPU usage -> hang
  2023-01-12  7:36     ` Eli Zaretskii
@ 2023-01-12 10:36       ` Manuel Giraud
  0 siblings, 0 replies; 5+ messages in thread
From: Manuel Giraud @ 2023-01-12 10:36 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: help-gnu-emacs

Eli Zaretskii <eliz@gnu.org> writes:

[...]

>> Attaching a debugger to the lisp major mode, or building emacs from
>> source?
>
> Attaching a debugger (GDB) to Emacs when its CPU usage jumps.  This
> requires Emacs built with debug info, or installing the separate debug
> info from your distro.

And if you get the Emacs source tree, you should read etc/DEBUG that
contains most of the informations you need to do this.
-- 
Manuel Giraud



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

end of thread, other threads:[~2023-01-12 10:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-10 14:58 How to debug high CPU usage -> hang Ken Goldman
2023-01-10 15:21 ` Eli Zaretskii
2023-01-11 20:24   ` Ken Goldman
2023-01-12  7:36     ` Eli Zaretskii
2023-01-12 10:36       ` Manuel Giraud

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