From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id D1565385842D for ; Sun, 31 Mar 2024 10:27:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D1565385842D Authentication-Results: sourceware.org; dmarc=pass (p=none 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 D1565385842D 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=1711880853; cv=none; b=ockQY7jBYNlESSCa1meNZdfIC/6X2e6aoNoCxQzBtC51UEBb81VUWGi//oK7kUKh1MYDB007d+nHgq6SOhInolyxqq/Y0IWqm7RAiMsGV8nTRCsLnrDl+adxkwvKHvOmuzVRniXgT8FMB6dVP4tR2oSH1Not1CEYimZGexk0nu4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711880853; c=relaxed/simple; bh=CewcasFJEEIwelUq06ZlhnMXmoo7EmpWOE+aHsXQjc0=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=Ybz33i8LgaRoGX96LIkgpWEnmB0oEy51JK1/Nba2PN/MrnqXHDGAYqx/P75tRhfViLW0ZAlKYPwLQjNe2ff7CXX6pgMz5ishakYb7He6IDHrzxHFD2HCm1N9MqIcQpVwRgLax5guSK2KqUukyoIXyT4mG+u1x0eUim1q9frRoog= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1711880851; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=TgCfZWf0mlA4X+5jWXBQKByDa/OXth22ZtrtXjvB7mI=; b=ReceoGz11mn179wIrokAIOuHWm1QS66cJvu88CrhoOcj5tUPouy43X9KOUdTtFFee0X/Vo aFci606jRHZOzGRbpnd5nk7YJ2wHn4aEVBJL83/2S5qiLxkKhrQIJa+tp6kKxI6PPSN5Vr cYYdZo46ft35RwWGgNY7X7tC83sU21s= Received: from mail-ej1-f70.google.com (mail-ej1-f70.google.com [209.85.218.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-663-jtDawHNZPPmLCC0wGbKYNw-1; Sun, 31 Mar 2024 06:27:29 -0400 X-MC-Unique: jtDawHNZPPmLCC0wGbKYNw-1 Received: by mail-ej1-f70.google.com with SMTP id a640c23a62f3a-a4e603d68b5so36633566b.1 for ; Sun, 31 Mar 2024 03:27:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711880848; x=1712485648; h=mime-version:message-id:date:references:in-reply-to:subject:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=TgCfZWf0mlA4X+5jWXBQKByDa/OXth22ZtrtXjvB7mI=; b=MYsBTrPZ9EPjhxJbh29jj+Xc0SEYqCBIkc8pIYi9L7Of+zDvMLiMiDPbET70iDe1vO qKKbi4RvtAg9U0cRFp5Hl82ijc8ZDRSASZ9KdoVsx9VscomM3Q3dnZKn+VHxwxOEp0Aq l+gy/vHTtT50fv1pgRm4i/4upAgEo0x1NjnAZaXXvqNocpLqCJPH/8TEWisEJDBwPhdz rzV3gZNBaaBkxiJDVxyUYtypooCE5JDsUiKESViZLTL0Lsi6OQvxba37Z7etyBUlWp65 cP2hj9N5woChNQyYVUhpVBN28l9LWBGLTd1muvCG3jaqkpI/hROgczLvy0+Jrrx0g+Iu p0lQ== X-Gm-Message-State: AOJu0Yz2+vE8XymZi7w/Pk6kiHOE645pXLXAr3DdzhGBzfuex1T0QtFq kwu1kAtXvOPjMdfN6Tuj7Q/8oWlQe5R+ZkZIFju10eTdaxDl2saB9NBNwzsjmLZDIc4t7MzxhiT R26pGUOq9FPnVLEgHQw+s8T9QBeQCtaoESwd3bR//trnih41HEv2vGTIrOx2I7deBh499YfWQOh 4BhIbYcvuXVlN2opwjTgrNOjvEEIeKHUijV5FQ5/5Ea78= X-Received: by 2002:a17:906:b104:b0:a4e:1154:fa46 with SMTP id u4-20020a170906b10400b00a4e1154fa46mr5018730ejy.70.1711880848334; Sun, 31 Mar 2024 03:27:28 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFIkDzuQErbRbRNIExk9tl8AqewDBrHUZxa62nmMdaboXPb5HylUuheB9hRQ1OweXu68v/x3g== X-Received: by 2002:a17:906:b104:b0:a4e:1154:fa46 with SMTP id u4-20020a170906b10400b00a4e1154fa46mr5018719ejy.70.1711880847900; Sun, 31 Mar 2024 03:27:27 -0700 (PDT) Received: from localhost (185.223.159.143.dyn.plus.net. [143.159.223.185]) by smtp.gmail.com with ESMTPSA id ef5-20020a17090697c500b00a473792da26sm4095548ejb.19.2024.03.31.03.27.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 31 Mar 2024 03:27:27 -0700 (PDT) From: Andrew Burgess To: gdb-patches@sourceware.org Subject: Re: [PATCHv9 05/14] gdb: build dprintf commands just once in code_breakpoint constructor In-Reply-To: <3119a0dcb07fbcb9b0232e92af308653005de7fa.1709651994.git.aburgess@redhat.com> References: <3119a0dcb07fbcb9b0232e92af308653005de7fa.1709651994.git.aburgess@redhat.com> Date: Sun, 31 Mar 2024 11:27:27 +0100 Message-ID: <875xx24rxs.fsf@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-5.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Andrew Burgess writes: > I noticed in code_breakpoint::code_breakpoint that we are calling > update_dprintf_command_list once for each breakpoint location, when we > really only need to call this once per breakpoint -- the data updated > by this function, the breakpoint command list -- is per breakpoint, > not per breakpoint location. Calling update_dprintf_command_list > multiple times is just wasted effort, there's no per location error > checking, we don't even pass the current location to the function. > > This commit moves the update_dprintf_command_list call outside of the > per-location loop. > > There should be no user visible changes after this commit. I've gone ahead and committed this patch. Thanks, Andrew