From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 9/REMJcp8GlSyz8AWB0awg (envelope-from ) for ; Mon, 27 Apr 2026 23:29:27 -0400 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=t9Wmk8NK; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id A82FE1E093; Mon, 27 Apr 2026 23:29:27 -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.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,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 A2F0F1E093 for ; Mon, 27 Apr 2026 23:29:26 -0400 (EDT) Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id 16EE24B9DB64 for ; Tue, 28 Apr 2026 03:29:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 16EE24B9DB64 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=t9Wmk8NK Received: from mail-yw1-x1136.google.com (mail-yw1-x1136.google.com [IPv6:2607:f8b0:4864:20::1136]) by sourceware.org (Postfix) with ESMTPS id 3676C4B9DB49 for ; Tue, 28 Apr 2026 03:29:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3676C4B9DB49 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 3676C4B9DB49 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::1136 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1777346941; cv=none; b=OOze+OwHjSwLS1iknMjFosCYt9wiHB89i6aZNGZVxY4i8hxGcUDV+yQJ/r+qAtwrCU2Ad/fClOf1LUcLetORqhJYdlUR1TwVQHPEgNHGSfYC7n+6jUMJ7ybXyMSPumcOTkPsVAaHiZXNoggKlAcqR41fBBX2Q0s4quiYsW6aYsI= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1777346941; c=relaxed/simple; bh=B2wgsvJ+/k6u0nCyhUSt1JepJq9dz26ybSJpbigNVyI=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=l0q28OsDrL+W/kAhmiLsCAKxQZUIGevfcglzLKb/2cCZaam+/EyBt9oR5NJDvy/rOcZLLN2iXIWXO837EyNYTF2xQ2Eg4ZPSCU9ZB9SVH5+J69JospyJX1iHc7KXV4j6stKUmvaF49IWClceQ1V2kmrafffpyPNb3KLiF0Whmpc= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3676C4B9DB49 Received: by mail-yw1-x1136.google.com with SMTP id 00721157ae682-7947cf097c1so101530047b3.2 for ; Mon, 27 Apr 2026 20:29:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1777346940; x=1777951740; darn=sourceware.org; h=mime-version:message-id:date:user-agent:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=Mp+ZH6ZQbmxdc9kFQxl1CWggbuaRhqsL5Agr10RMXL4=; b=t9Wmk8NKwcyEMxreeNVgIopb4AnwWD8vpGrtIyA5w8y0sHv4yZtxi6FjSE2WA9NwR/ BA4eTEcSEATl3C86I4gzPsAal52YKqPX3HyTtzgt/gLGQgIwfk5XuI+LamWm6KTyS2AS 7sGWk6ssHr5cVu6Ew/SSFR2OHcPZHh7yU7sgpjkSjphpDEGIzf8yG3P44tZ0d25PNyEF RqADjbN5vTHziW6ZrG/4G3ki5ZORBS0vVicMAvaRVQh7LYD+5PGO5k2OijjqE3hqzLEq 0ZNcS3k93ilMXXx87POA9ZGlxKLf5IGRO4tyPyjt4f7yAUIjuxldybQ0yFfHEHyfVQFh lh+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777346940; x=1777951740; h=mime-version:message-id:date:user-agent:references:in-reply-to :subject:cc:to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=Mp+ZH6ZQbmxdc9kFQxl1CWggbuaRhqsL5Agr10RMXL4=; b=MAfqpMwFcKA7gj18knLxhg3GkX6+BJv8BNtMNzCyw5aIQkygoz3dpe3kTq7TYsd/FH o8rpTORKeOl8PJqKMVsEeLBp0N0tFF6L4LoVPjFKNg2BKVfhIaRy3wyey584IanAtjN3 vwoQvWASPL42RwlJE1mhemuMSD1TQVQJaWISBuDfgtsZP7ar2Y/rRBB2HjTdtO72mZyw llTCo4/wfLBIwjLV+3OXY3mw7Gyw14qIEshH5QOP4YGcqWKL3tvnPE7S6Gl0wSXD1tL2 8F+3hUCiEh6v84mpGvscWmRv4jRk/IRNMvyMptkQAHqWtkCWh16ir4c81PGZmi8sJIUw 1YCg== X-Gm-Message-State: AOJu0YwXXFStXfsUAM62UBSTDK65bHRS7mz5hXqY8LAOKyE0wOwlTJy/ kgJitElriDwbjsOC2pvEErhECS5BXAD/2xyoZJtlSPmTrTBZAp45RFo54EVcBozCzyk= X-Gm-Gg: AeBDiesGnUPpW8RqrwsZAWDB2ocOZ+GQtt4Aesr3a/EnS/Cinv5IgbpCo6So0XeftJ3 m2gDYiWG2ahbv/vfUPMoVF0QOVP6C3He9fyrm0yfv+o1aur7CAsu48kA+VgdVJS9Bn44lAPdJtU qxPvR3LH00WMHFn4/oOX1jIWBC9A1PzpsteyDf0dx4h6qn0xtl/IKeoaJew9gRF0FLh+rYDjM4p 1AUcOpVaFPqvLURXNTBMftE7cbRMzVS99B6N1OnltFaljoFvkLyqEyijjh7C2EPM3yjSmlfmw2j 6hUh+BHUh712WBHonLbN29iwuR09Jqh5RSAIeaoBIgRXJe4CtOSbQ8YsVWDUzcg2OgBxYT71/X3 ZgT1dIYo/B95wsl9C45MERHa9mjj7XvASrnCF4LfHPEo3MwkFFGwQVVPWId3jRY2sriljUVroiU 0QLd/JXfhoqHkGyctWo8QfItG7VZcCtHSBhqrmMSNDPFNU X-Received: by 2002:a05:690e:118a:b0:654:c2b5:b77c with SMTP id 956f58d0204a3-65beed3af9cmr1115910d50.7.1777346940367; Mon, 27 Apr 2026 20:29:00 -0700 (PDT) Received: from localhost ([2804:14d:7e39:8083:f04c:42e3:5943:38f6]) by smtp.gmail.com with ESMTPSA id 956f58d0204a3-65bee4a6a1dsm760737d50.20.2026.04.27.20.28.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Apr 2026 20:28:59 -0700 (PDT) From: Thiago Jung Bauermann To: Guinevere Larsen Cc: gdb-patches@sourceware.org Subject: Re: [PATCH v2 1/6] gdb/record: Refactor record history In-Reply-To: <20260423152604.171356-2-guinevere@redhat.com> (Guinevere Larsen's message of "Thu, 23 Apr 2026 12:25:59 -0300") References: <20260423152604.171356-1-guinevere@redhat.com> <20260423152604.171356-2-guinevere@redhat.com> User-Agent: mu4e 1.14.0; emacs 30.2 Date: Tue, 28 Apr 2026 00:28:57 -0300 Message-ID: <87bjf3lq4m.fsf@linaro.org> MIME-Version: 1.0 Content-Type: text/plain 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 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 -- Thiago