Subject: bug#78367: closed (Re: bug#78367: 31.0.50; Eglot: incoming call trees, wrong positions)

From: [email-masked] (GNU bug Tracking System)
Date: Sun, 11 May 2025 10:21:02 +0000

Your bug report

#78367: 31.0.50; Eglot: incoming call trees, wrong positions

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
78367: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=78367
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#78367: 31.0.50; Eglot: incoming call trees, wrong positions
From: João Távora <[email-masked]>
To: Eli Zaretskii <[email-masked]>
Cc: Gerd Möllmann <[email-masked]>, [email-masked]
Date: Sun, 11 May 2025 11:21:16 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

Eli Zaretskii <[email-masked]> writes:

>> From: Gerd Möllmann <[email-masked]>
>> 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

Subject: 31.0.50; Eglot: incoming call trees, wrong positions
From: Gerd Möllmann <[email-masked]>
To: [email-masked]
Date: Sun, 11 May 2025 07:29:30 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

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