From: Guinevere Larsen <guinevere@redhat.com>
To: Thiago Jung Bauermann <thiago.bauermann@linaro.org>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH v2 1/6] gdb/record: Refactor record history
Date: Tue, 28 Apr 2026 16:54:24 -0300 [thread overview]
Message-ID: <fcc46fb0-2020-4fca-8bdd-ab1236568def@redhat.com> (raw)
In-Reply-To: <87bjf3lq4m.fsf@linaro.org>
On 4/28/26 12:28 AM, Thiago Jung Bauermann wrote:
> Hello Guinevere,
>
> Thanks! It all looks good to me now.
>
> Guinevere Larsen <guinevere@redhat.com> writes:
>
>> This is the first step in a large refactor in how GDB keeps execution
>> history. Rather than using a linked list where multiple entries can
>> describe a single instruction, the history will now be stored in an
>> std::deque, each instruction being one entry in the deque.
>>
>> The choice was initially to use an std::vector, but it would become
>> unwieldy because it needs all the memory to be consecutive, which is
>> hard for 200 thousand entries. Deque was picked because it was a nice
>> midpoint between vector (maximum cache cohesion) and linked list
>> (maximum ease of finding space to store more).
>>
>> Each instruction in memory will be now one record_full_instruction
>> entry, which for this commit just contains a vector of
>> record_full_entry for the effects of the instruction, and the data that
>> was stored in the record_full_end entry (that is, the instruction number
>> and the signal, if any).
>>
>> This change introduced a minimal performance improvement (what's
>> important is that it isn't a degradation) and a reduction in the total
>> memory footprint of roughly 20% if the entire history is used.
>> ---
>> gdb/aarch64-tdep.c | 2 -
>> gdb/amd64-linux-tdep.c | 3 -
>> gdb/arm-tdep.c | 2 -
>> gdb/i386-linux-tdep.c | 3 -
>> gdb/i386-tdep.c | 4 -
>> gdb/loongarch-tdep.c | 2 -
>> gdb/moxie-tdep.c | 2 -
>> gdb/ppc-linux-tdep.c | 3 -
>> gdb/record-full.c | 1180 ++++++++++++++++------------------------
>> gdb/record-full.h | 1 -
>> gdb/riscv-tdep.c | 3 -
>> gdb/rs6000-tdep.c | 4 -
>> gdb/s390-linux-tdep.c | 3 -
>> gdb/s390-tdep.c | 2 -
>> 14 files changed, 476 insertions(+), 738 deletions(-)
> Reviewed-by: Thiago Jung Bauermann <thiago.bauermann@linaro.org>
>
Thanks for all the reviews! I applied your review tag to all the
patches, but I will wait until next thursday, so that anyone has time to
give thoughts before I self-approve the patch series.
--
Cheers,
Guinevere Larsen
It/she
next prev parent reply other threads:[~2026-04-28 19:55 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-23 15:25 [PATCH v2 0/6] refactor the internals of record-full Guinevere Larsen
2026-04-23 15:25 ` [PATCH v2 1/6] gdb/record: Refactor record history Guinevere Larsen
2026-04-28 3:28 ` Thiago Jung Bauermann
2026-04-28 19:54 ` Guinevere Larsen [this message]
2026-05-06 21:16 ` Schimpe, Christina
2026-05-07 17:38 ` Guinevere Larsen
2026-05-11 15:23 ` Schimpe, Christina
2026-05-12 18:50 ` Guinevere Larsen
2026-05-13 7:54 ` Schimpe, Christina
2026-05-14 15:20 ` Guinevere Larsen
2026-04-23 15:26 ` [PATCH v2 2/6] gdb/record: remove record_full_insn_num Guinevere Larsen
2026-04-23 15:26 ` [PATCH v2 3/6] gdb/record: c++ify internal structures of record-full.c Guinevere Larsen
2026-04-28 3:29 ` Thiago Jung Bauermann
2026-04-23 15:26 ` [PATCH v2 4/6] gdb/record: make record_full_history more c++-like Guinevere Larsen
2026-04-28 3:29 ` Thiago Jung Bauermann
2026-04-23 15:26 ` [PATCH v2 5/6] gdb/record: extract the PC to record_full_instruction Guinevere Larsen
2026-04-28 3:30 ` Thiago Jung Bauermann
2026-04-23 15:26 ` [PATCH v2 6/6] gdb/record: Define new version of the record-save section Guinevere Larsen
2026-04-23 15:45 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=fcc46fb0-2020-4fca-8bdd-ab1236568def@redhat.com \
--to=guinevere@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=thiago.bauermann@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox