From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id Gj+WGoK0omrL1jwAWB0awg (envelope-from ) for ; Thu, 10 Sep 2026 09:45:38 -0400 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=polymtl.ca header.i=@polymtl.ca header.a=rsa-sha256 header.s=oct2025 header.b=fbbnvLIO; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 563791E091; Thu, 10 Sep 2026 09:45:38 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-5.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 autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [IPv6:2620:52:6:3111::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 C3C721E091 for ; Thu, 10 Sep 2026 09:45:37 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 95BA44BB5906 for ; Thu, 10 Sep 2026 13:45:36 +0000 (GMT) Received: from smtp.polymtl.ca (smtp.polymtl.ca [132.207.4.11]) by sourceware.org (Postfix) with ESMTPS id 8A0BF4BA2E28 for ; Thu, 10 Sep 2026 13:45:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8A0BF4BA2E28 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=polymtl.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=polymtl.ca ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 8A0BF4BA2E28 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=132.207.4.11 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1789047928; cv=none; b=wsBnVR7IP6um3Te81spDPxFhnnUE7BWPgkwGk0ch6Uiiz2lsD/ZLbHmKrzpkW01RdlFnpA95/BtWtmfbSVD+mAx7abxh//I8EzrK5z5URri7CdOvjTxMsvpszAj5Qj0/omwuG7I5tV7PKHAb2nZsHh34iwsFYQuCJR9DJdhjN0Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1789047928; c=relaxed/simple; bh=jK443waUdVBMD4vK0EsDZJ/iXimukKjA9rHaIcSeotE=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=PyhHN4w+2+SOKtvhCXhfhHWvixXglAQWxunmU1wO6YG4VmzOp3TINX7K8PFk3J+yXjKURl3SOLI6tdbFOihKCa+4OuC01IhhLfoFg51gv/+s5He29l/mXjJ68ep69cSRhn5UqizTj0iwAGJDFB73N4PZHoZ34LYQuhkGOrx2iMA= ARC-Authentication-Results: i=1; sourceware.org Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id 68ADjIL2206741 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 10 Sep 2026 09:45:23 -0400 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 68ADjIL2206741 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=polymtl.ca; s=oct2025; t=1789047924; bh=g4ZmBbb2gbNnQymJ0rQ2mOMEakoQ0hNVm4O9oV2uV4k=; h=Date:Subject:To:Cc:From:In-Reply-To:From; b=fbbnvLIOb0qRv9gslh3qYjFbjTTP9vwC6z+0CKZWqqV4lrL9XXpOXhpDTceCoDpIB e7vaec7+9hSaBtnHS+1rnkLEW6LnLEX9SBcddgmk860M++w8hVhIgEyHRW8P+EHVzF 52EZF0Xudo2Q+pCrGE6kZ+dY/E9neL8k6B0FCXjsKZGGoAZqwkkExCqCtv7bgkND0d gdtB83R7gGKT6ct82tjByeUL6B7mVZ27yLYcCfd3ujYTTA6+H6xsL4sbq3nW5W0jYJ hlhQW8dtIoJRsXFK7LR0uABe/FupOVx0RIMnT3okIp4KSAjHlO2RP0nvp3TfmQJ070 v3FdLICU2R+Ng== Received: by simark.ca (Postfix) id 1ED211E091; Thu, 10 Sep 2026 09:45:17 -0400 (EDT) Message-ID: <2207a4ad-d2c5-43a2-9d91-4c6d80b1558b@polymtl.ca> Date: Thu, 10 Sep 2026 09:45:16 -0400 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2] Speed up next/step while debugging multithreaded programs on AIX. To: Ulrich Weigand , "akamath996@gmail.com" , "tom@tromey.com" Cc: "gdb-patches@sourceware.org" , SANGAMESH MALLAYYA , Aditya Kamath References: <20260910101643.85955-2-akamath996@gmail.com> Content-Language: en-US From: Simon Marchi In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Thu, 10 Sep 2026 13:45:18 +0000 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 2026-09-10 09:14, Ulrich Weigand wrote: > Aditya Vidyadhar Kamath wrote: > > + /* Attempt to sync_threadlists() only when debugging object > files > + and not core files since the list of threads never changes > for > + core files. Even for live inferiors, skip the sync when the > + thread count matches the previous stop. */ > > This last part seems racy to me. In principle, it is possible > that one thread terminated and simultaneously one new thread was > created, since the last time we stopped. In this case, the thread > count would be the same, but the thread list still incorrect. > > Given the other test for single-stepping, is this particular > check even still resulting in a noticeable performance > difference? I would suggest making a patch with just the get_signaled_thread batch change first, since that one looks fairly safe and low hanging fruit. Then, measure again and then look for the next optimization. I would suggest using the "scoped_time_it" class to measure the execution time of various functions and scopes. This object measures the time spent between its construction and destruction. On destruction, it prints a line like: Time for "DWARF indexing worker": wall 0.195, user 0.130, sys 0.033, user+sys 0.163, 83.6 % CPU Include that information in your future commit messages (the before and after). That will give us an accurate picture of where time is spent, and how much each optimization helps. Just sprinkle it like this: { scoped_time_it time_it ("doing something"); ... } And then enable it with: (gdb) maintenance set per-command time on Simon