GNU bug report logs - #78367
31.0.50; Eglot: incoming call trees, wrong positions

Previous Next

Package: emacs;

Reported by: Gerd Möllmann <gerd.moellmann <at> gmail.com>

Date: Sun, 11 May 2025 05:30:02 UTC

Severity: normal

Found in version 31.0.50

Done: João Távora <joaotavora <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 78367 in the body.
You can then email your comments to 78367 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#78367; Package emacs. (Sun, 11 May 2025 05:30:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Gerd Möllmann <gerd.moellmann <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 11 May 2025 05:30:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Gerd Möllmann <gerd.moellmann <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 31.0.50; Eglot: incoming call trees, wrong positions
Date: Sun, 11 May 2025 07:29:30 +0200
I am using Eglot/clangd on emcas.git again.

Navigate to insdel.c, function insert_and_inherit, C-u M-x
eglot-show-call-hierarchy RET and choose incoming call trees. The
resulting buffer looks like

[-]  ∘ insert_and_inherit
 ├─[+]  ◀ Finsert_and_inherit
 ├─[+]  ◀ Finsert_char
 └─[+]  ◀ internal_self_insert

Clicking on Finsert_and_inherit takes me here:

insdel.c:
 1389   if (run_mod_hooks)
 1390     {
 1391       ptrdiff_t range_length = to - from;
 1392       prepare_to_modify_buffer (from, to, &from);
 1393       to = from + range_length;
 1394     }

Clicking on internal_self_insert

insdel.c:
  469      * amount at least proportional to the size of the buffer.
  470      * On my test (a 223.9MB zip file on a Thinkpad T61):
  471      * With /5    =>  24s
  472      * With /32   =>  25s
  473      * With /64   =>  26s
  474      * With /128  =>  28s
  475      * With /1024 =>  51s

and so on.

(BTW, eglot-supplements' call trees list all call sites, both in
incoming and outgoing call trees. I find that pretty useful.

- insert_and_inherit insdel.c:582
  + internal_self_insert internal_self_insert:471
  + internal_self_insert internal_self_insert:475
  + Finsert_and_inherit Finsert_and_inherit:1392
  + Finsert_char Finsert_char:1503
  + Finsert_char Finsert_char:1509
)

In GNU Emacs 31.0.50 (build 1, aarch64-apple-darwin24.4.0) of 2025-05-10
 built on pro2




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#78367; Package emacs. (Sun, 11 May 2025 06:03:02 GMT) Full text and rfc822 format available.

Message #8 received at 78367 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Gerd Möllmann <gerd.moellmann <at> gmail.com>,
 João Távora <joaotavora <at> gmail.com>
Cc: 78367 <at> debbugs.gnu.org
Subject: Re: bug#78367: 31.0.50; Eglot: incoming call trees, wrong positions
Date: Sun, 11 May 2025 09:02:04 +0300
> From: Gerd Möllmann <gerd.moellmann <at> gmail.com>
> Date: Sun, 11 May 2025 07:29:30 +0200
> 
> I am using Eglot/clangd on emcas.git again.
> 
> Navigate to insdel.c, function insert_and_inherit, C-u M-x
> eglot-show-call-hierarchy RET and choose incoming call trees. The
> resulting buffer looks like
> 
> [-]  ∘ insert_and_inherit
>  ├─[+]  ◀ Finsert_and_inherit
>  ├─[+]  ◀ Finsert_char
>  └─[+]  ◀ internal_self_insert
> 
> Clicking on Finsert_and_inherit takes me here:
> 
> insdel.c:
>  1389   if (run_mod_hooks)
>  1390     {
>  1391       ptrdiff_t range_length = to - from;
>  1392       prepare_to_modify_buffer (from, to, &from);
>  1393       to = from + range_length;
>  1394     }
> 
> Clicking on internal_self_insert
> 
> insdel.c:
>   469      * amount at least proportional to the size of the buffer.
>   470      * On my test (a 223.9MB zip file on a Thinkpad T61):
>   471      * With /5    =>  24s
>   472      * With /32   =>  25s
>   473      * With /64   =>  26s
>   474      * With /128  =>  28s
>   475      * With /1024 =>  51s
> 
> and so on.
> 
> (BTW, eglot-supplements' call trees list all call sites, both in
> incoming and outgoing call trees. I find that pretty useful.
> 
> - insert_and_inherit insdel.c:582
>   + internal_self_insert internal_self_insert:471
>   + internal_self_insert internal_self_insert:475
>   + Finsert_and_inherit Finsert_and_inherit:1392
>   + Finsert_char Finsert_char:1503
>   + Finsert_char Finsert_char:1509
> )
> 
> In GNU Emacs 31.0.50 (build 1, aarch64-apple-darwin24.4.0) of 2025-05-10
>  built on pro2

Adding João to the discussion.




Reply sent to João Távora <joaotavora <at> gmail.com>:
You have taken responsibility. (Sun, 11 May 2025 10:21:02 GMT) Full text and rfc822 format available.

Notification sent to Gerd Möllmann <gerd.moellmann <at> gmail.com>:
bug acknowledged by developer. (Sun, 11 May 2025 10:21:02 GMT) Full text and rfc822 format available.

Message #13 received at 78367-done <at> debbugs.gnu.org (full text, mbox):

From: João Távora <joaotavora <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Gerd Möllmann <gerd.moellmann <at> gmail.com>,
 78367-done <at> debbugs.gnu.org
Subject: Re: bug#78367: 31.0.50; Eglot: incoming call trees, wrong positions
Date: Sun, 11 May 2025 11:21:16 +0100
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: Gerd Möllmann <gerd.moellmann <at> gmail.com>
>> Date: Sun, 11 May 2025 07:29:30 +0200
>> 
>> I am using Eglot/clangd on emcas.git again.

That's good.  Thanks for the report.

>> insdel.c:
>>   469      * amount at least proportional to the size of the buffer.
>>   470      * On my test (a 223.9MB zip file on a Thinkpad T61):
>>   471      * With /5    =>  24s
>>   472      * With /32   =>  25s
>>   473      * With /64   =>  26s
>>   474      * With /128  =>  28s
>>   475      * With /1024 =>  51s

For good a moment there, I thought you were reporting a performance bug
for a 20yo laptop.

Anyway, the call navigation should be fixed for both outgoing and
incoming cases in master.

>> and so on.
>> 
>> (BTW, eglot-supplements' call trees list all call sites, both in
>> incoming and outgoing call trees.

Patches welcome!

>> I find that pretty useful.)

Maybe.  Depends on the number of calls you make to given function in
another one.

João




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#78367; Package emacs. (Sun, 11 May 2025 10:39:01 GMT) Full text and rfc822 format available.

Message #16 received at 78367-done <at> debbugs.gnu.org (full text, mbox):

From: Gerd Möllmann <gerd.moellmann <at> gmail.com>
To: João Távora <joaotavora <at> gmail.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 78367-done <at> debbugs.gnu.org
Subject: Re: bug#78367: 31.0.50; Eglot: incoming call trees, wrong positions
Date: Sun, 11 May 2025 12:38:09 +0200
João Távora <joaotavora <at> gmail.com> writes:

> Anyway, the call navigation should be fixed for both outgoing and
> incoming cases in master.

Did you try it?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#78367; Package emacs. (Sun, 11 May 2025 12:44:02 GMT) Full text and rfc822 format available.

Message #19 received at 78367-done <at> debbugs.gnu.org (full text, mbox):

From: João Távora <joaotavora <at> gmail.com>
To: Gerd Möllmann <gerd.moellmann <at> gmail.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 78367-done <at> debbugs.gnu.org
Subject: Re: bug#78367: 31.0.50; Eglot: incoming call trees, wrong positions
Date: Sun, 11 May 2025 13:43:39 +0100
Yes, did you? What are you seeing?

On Sun, May 11, 2025 at 11:38 AM Gerd Möllmann <gerd.moellmann <at> gmail.com> wrote:
>
> João Távora <joaotavora <at> gmail.com> writes:
>
> > Anyway, the call navigation should be fixed for both outgoing and
> > incoming cases in master.
>
> Did you try it?



-- 
João Távora




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#78367; Package emacs. (Sun, 11 May 2025 13:12:02 GMT) Full text and rfc822 format available.

Message #22 received at 78367-done <at> debbugs.gnu.org (full text, mbox):

From: Gerd Möllmann <gerd.moellmann <at> gmail.com>
To: João Távora <joaotavora <at> gmail.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 78367-done <at> debbugs.gnu.org
Subject: Re: bug#78367: 31.0.50; Eglot: incoming call trees, wrong positions
Date: Sun, 11 May 2025 15:11:34 +0200
João Távora <joaotavora <at> gmail.com> writes:

> Yes, did you? What are you seeing?

It's working now, thanks. Sorry, it wasn't clear that you pushed
something.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 09 Jun 2025 11:24:11 GMT) Full text and rfc822 format available.

This bug report was last modified 11 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.