From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id oURfBpYQ8WlWjwEAWB0awg (envelope-from ) for ; Tue, 28 Apr 2026 15:55:02 -0400 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=UshwUSUB; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id AE8271E0BA; Tue, 28 Apr 2026 15:55:01 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_BL_SPAMCOP_NET,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H2, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id C08011E093 for ; Tue, 28 Apr 2026 15:55:00 -0400 (EDT) Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id 3B2524BBC0A8 for ; Tue, 28 Apr 2026 19:55:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3B2524BBC0A8 Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=UshwUSUB Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTP id 20CE14B99F5F for ; Tue, 28 Apr 2026 19:54:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 20CE14B99F5F Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 20CE14B99F5F Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1777406074; cv=none; b=cOlhrKFnHpEqAnNhLzATMvXaaf16EkzrRZ4eVtZfSpPgaGe9MdUfTw84k7h4yMI2JlIOF4rJVaNGVwt0eO5MasCM2DfmU/2QlKMphAcGlW3l8mZT+j9B5d0ZHQeVzpu+2Sl0KDw5SxeSdwZivnelMG/6ZOTRgxAKEKZuXSmzecE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1777406074; c=relaxed/simple; bh=IFuNcn87vqS1b1HH/Nw7cm2KMOvFP7LkrhXZBGN8OOU=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=OleVGAsruMgZIeYb71R+vcEpD8GtmoHFCbyHDaFH5jL8oQVKTKEhXwFlCg+Xcedku9kL7S9+N6baTqkr/0zjuOYAmEs1BQqoIZj0U4ilmaXVfhl+0QgNIhU9AiFayHMJ9a46RTGehbajBoM44a0agC46iKl9If4bfav2Mh4yoaw= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 20CE14B99F5F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1777406073; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=QSICJOFtgcGlZ2gl3GYWfFmfThQUfCrbeK3oQyjwTXY=; b=UshwUSUBD2prO+jK9FCUDyyxFKH7kN8cRb0F0KSdM98GOrr6BjH4248S0VmgjWPL+UU7Lo kAU5FSheRXZ/7lV3ujEY/EgN2DSR4CGlqeyD4M/3nZWnLrYy5BdmJfjYrsD/Dba4CYhlEy FeK0rxX4TX2Z7/iyaq4IPHJe17c7oDI= Received: from mail-yx1-f71.google.com (mail-yx1-f71.google.com [74.125.224.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-13-bLhHLzMcNRS3g9TqtXNrqQ-1; Tue, 28 Apr 2026 15:54:30 -0400 X-MC-Unique: bLhHLzMcNRS3g9TqtXNrqQ-1 X-Mimecast-MFC-AGG-ID: bLhHLzMcNRS3g9TqtXNrqQ_1777406070 Received: by mail-yx1-f71.google.com with SMTP id 956f58d0204a3-651bd9b4bccso21164446d50.3 for ; Tue, 28 Apr 2026 12:54:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777406070; x=1778010870; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=QSICJOFtgcGlZ2gl3GYWfFmfThQUfCrbeK3oQyjwTXY=; b=stob+3JR11lOXY7bX5aMVf2AkU69IitMFInPMZFVVXvUPVUqUyztWPzsSS23kUe7TJ /0kk9q1i3ny3I/hu/otEt2SC1L4NcBXcPj1mTPdO+3ipgHkWODS0TBdvSjQixSsLeVG8 UYBeUonpGjkyCWsqNjuU1nP7469Hn6s3SQvhRFOX+Pp8bnsWIMvKU4hdNmNQt0dIDj2x 6PbrM6OEd2T52TCLE9Z9pJKG3nrzHBisnuexVZkM1pSMg1freUK5YRLRFYXfHbIPZxzW y9sHD+8O7vSbU2UtAjtSdFArgqwNMDzH3qi2ql6g63Vo8x1KesO57zk3NwszG0nws5RR H0PA== X-Gm-Message-State: AOJu0YwM/v30weyng4OQTf1rxPXYiwrHi6XXW3ADMjTOQE+zSt0GLQmR jNRKaxj3AKho5aVFBmEyNaLiPUfPu5R6MZO5WC8ZwWXVmFZa9A7Q0yLzl1qsr1AEgJ9y6eVLFAh hhh/qtFrSalJ8WLp+pbBE1nhStWreI6imacrCSsRpP4rEEVd/PBbLgbg2y0W/F/A= X-Gm-Gg: AeBDievxEtxxiABAFa+cChG8XVuj0iQaRohKxVMrSfsigqGyn9acQ/+A3zPdTxjvi9S k88Yf7OQOT7G8QfVarE5dDAV92Ct/4AT7DpHx4mnU00g3maRz6tbfSsQAAEcR7LJo3jsy/03vHe 6snL08FaS9c4wspD6b5WMO1reLXVvf5M5jb4Mr/nd7WmXywQhOSM1WPAs3EWNZnkAlvopWukd+j LDJ0K3+4NmLnfxbp4IR1VlaxjyxgIkhDHilSy0rKC8cwQbj2HXRw62cE2N+agFK6PRzDNj1z6m5 H/Re1+sXdyCITM9WOrexvk2xCpnN88gdss9Sa3D+WAoxTzaOeokA7mF+x3NqQRFqdC12lJ3nN5S 3Tqkf8rT262K9gBqQLqKYzwi6Lxlp4VcnCd2Ut3bjVQ== X-Received: by 2002:a05:690e:4847:b0:651:d199:51f3 with SMTP id 956f58d0204a3-65beed81ca8mr3041373d50.25.1777406070274; Tue, 28 Apr 2026 12:54:30 -0700 (PDT) X-Received: by 2002:a05:690e:4847:b0:651:d199:51f3 with SMTP id 956f58d0204a3-65beed81ca8mr3041349d50.25.1777406069825; Tue, 28 Apr 2026 12:54:29 -0700 (PDT) Received: from ?IPV6:2804:14d:8084:993e::75d? ([2804:14d:8084:993e::75d]) by smtp.gmail.com with ESMTPSA id 956f58d0204a3-65bee46362bsm2637893d50.15.2026.04.28.12.54.27 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 28 Apr 2026 12:54:29 -0700 (PDT) Message-ID: Date: Tue, 28 Apr 2026 16:54:24 -0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 1/6] gdb/record: Refactor record history To: Thiago Jung Bauermann Cc: gdb-patches@sourceware.org References: <20260423152604.171356-1-guinevere@redhat.com> <20260423152604.171356-2-guinevere@redhat.com> <87bjf3lq4m.fsf@linaro.org> From: Guinevere Larsen In-Reply-To: <87bjf3lq4m.fsf@linaro.org> X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: cOaKemwnp63aTqtgiJ4-h__u2KznxvN2Ap4kZOkXqjE_1777406070 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org On 4/28/26 12:28 AM, Thiago Jung Bauermann wrote: > Hello Guinevere, > > Thanks! It all looks good to me now. > > Guinevere Larsen 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 > 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