Subject: bug#58558: 29.0.50; re-search-forward is slow in some buffers

From: Eli Zaretskii <[email-masked]>
Date: Tue, 18 Oct 2022 17:58:59 +0300

> From: Lars Ingebrigtsen <[email-masked]>
> Cc: Stefan Monnier <[email-masked]>,  [email-masked],  Eli
>  Zaretskii <[email-masked]>
> Date: Tue, 18 Oct 2022 13:50:02 +0200
> 
> The slowdowns are so dramatic that they should show up on a profiler --
> which might give us a clue which parts of Emacs is slowing down.

Right.

> I briefly tried to use "perf" under Linux to connect to a running
> Emacs and get some data out of it, but...  er...  I've never used it
> before, and...
> 
> Does anybody have a recipe for how to do runtime function tracing for a
> running process?

The way I run perf is to start Emacs under perf to begin with.

What did you try?  It was quite simple, AFAIR, last time I tried.