public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug tdep/29738] New: Arm v8 M-profile secure extension dwarf2 unwinder performance
@ 2022-10-31 18:18 tomas.vanek at fbl dot cz
  2022-11-02  8:16 ` [Bug tdep/29738] " luis.machado at arm dot com
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: tomas.vanek at fbl dot cz @ 2022-10-31 18:18 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=29738

            Bug ID: 29738
           Summary: Arm v8 M-profile secure extension dwarf2 unwinder
                    performance
           Product: gdb
           Version: HEAD
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: tdep
          Assignee: unassigned at sourceware dot org
          Reporter: tomas.vanek at fbl dot cz
  Target Milestone: ---

Commit a6e4a48c02acf29d6bec2ff63fc909b57cf4bc78
introduced synchronization sp with other xsp_x registers.
Unfortunately the code reads all four xsp_x registers by
get_frame_register_unsigned(). dwarf2 unwinder just passes this
request to the next inner frame. If the next inner frame is also
serviced by dwarf2, each of 4 xsp_x requests generates another 4 requests.

So e.g. 'backtrace' command on the chain of dwarf2 frames (normal debugging)
needs
  4 ^ number_of_frame
calls of arm_dwarf2_prev_register() just for stack unwinding!!!
The number of calls gets to very insane high values very soon,
8th and 9th frame unwinding is noticeable slow and 10 and more frames
looks as if gdb hangs.

Empirically tested with a counter added to the beginning of
arm_dwarf2_prev_register():

'bt' frames   total arm_dwarf2_prev_register() calls
        2       42
        3       181
        4       828
        5       3909
        6       18652
        7       89271
        8       427608
        9       2048659

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

end of thread, other threads:[~2023-02-02  3:43 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-31 18:18 [Bug tdep/29738] New: Arm v8 M-profile secure extension dwarf2 unwinder performance tomas.vanek at fbl dot cz
2022-11-02  8:16 ` [Bug tdep/29738] " luis.machado at arm dot com
2022-11-02 16:26 ` luis.machado at arm dot com
2022-11-03  8:20 ` luis.machado at arm dot com
2022-11-03  8:43 ` [Bug tdep/29738] Arm M-profile dwarf2 unwinder performance suffers from exponential grows tomas.vanek at fbl dot cz
2022-11-03  8:44 ` [Bug tdep/29738] Arm M-profile dwarf2 unwinder performance suffers from exponential growth tomas.vanek at fbl dot cz
2022-11-04 11:04 ` tomas.vanek at fbl dot cz
2022-11-04 15:27 ` torbjorn.svensson at st dot com
2023-02-02  3:43 ` brobecker at gnat dot com

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