From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id xPGKCuMPu2qlthQAWB0awg (envelope-from ) for ; Mon, 28 Sep 2026 21:09:55 -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=H8KpGLkR; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 1350A1E033; Mon, 28 Sep 2026 21:09:55 -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 0800F1E033 for ; Mon, 28 Sep 2026 21:09:53 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 664EF4B99F66 for ; Tue, 29 Sep 2026 01:09:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 664EF4B99F66 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=polymtl.ca header.i=@polymtl.ca header.a=rsa-sha256 header.s=oct2025 header.b=H8KpGLkR Received: from smtp.polymtl.ca (smtp.polymtl.ca [132.207.4.11]) by sourceware.org (Postfix) with ESMTPS id EC6164BAE7CC for ; Tue, 29 Sep 2026 01:09:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org EC6164BAE7CC 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 EC6164BAE7CC 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=1790644168; cv=none; b=AlN1g38ZeIb9wzR0L1o/I8U0ofOFncY4Dqr2bKmLvgASACymGZwe0HrkSPuTAFfZIq+XLJEWvlduWrQyCA8pXESYj+l3cNSy/s3o0gj0QFrCXZldqpJca+gq9fcYK7H6ZEraDRhRI69qWSiZUZ4KX6obg4DJ4LxLM2RMRqXSu2k= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1790644168; c=relaxed/simple; bh=o9nJduUJcjOjDNJl2twgy/j19jTXW6r96OMwAWX9bcg=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=jxrKnY8PfqdhUnMqRzl6CftlzrchWKxxEKhXnDbeUW5oW0Y8tXItF5p1W47H4zAP4tGTXIXg5StTTdDMD1Xi0ZJwsHrfQwfxS8RjCqF0qHxsWBBE1Bu4JKYTSK6HHoknhjyZQB6ym6vcJG8N5SgrRtY9r9vg3PM6bfzsE/iEDSE= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=polymtl.ca header.i=@polymtl.ca header.a=rsa-sha256 header.s=oct2025 header.b=H8KpGLkR DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EC6164BAE7CC 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 68T19HZq021717 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 28 Sep 2026 21:09:22 -0400 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 68T19HZq021717 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=polymtl.ca; s=oct2025; t=1790644163; bh=HpceB2vq/XmLUi3YAmuUfiH/MX6bauljgjHTgKTxPqo=; h=Date:Subject:To:Cc:From:In-Reply-To:From; b=H8KpGLkR+qHCjKb1eq7Fjpsj8jtfUUJyfsAG0JPAoER8zlFyCkACF4ly+hf7JhPK1 /AiLrVnQEyKaQZKafGw/sMHKEUO30VgD2iANS/YNqFjLhJ96GXoIxJ4fV9IS3I6zae xlRpmnpR2FMLYxtsHn3qD3IlcJ+b/uBFH/Ui5EgvqK+bTSAUv4ML2EcMB5HEPd0BBY jnPvNQgo3nh0qnkqIH7x5AO9zniJW2PKTcMS43A+vYrBwJbPjg5qB1xCEuXViahM4z OHEWbgamqAZB1PhC2eSSed+1EfhjDUoIc2oalMtqEZrg0XKCJj9IFjEsCF3wn2y71Z EOg0RBLNyK7cQ== Received: by simark.ca (Postfix) id C19001E033; Mon, 28 Sep 2026 21:09:16 -0400 (EDT) Message-ID: <4e70f12a-fa79-4268-85fd-eacfefad4c16@polymtl.ca> Date: Mon, 28 Sep 2026 21:09:16 -0400 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] gdb: fix nan in scoped_time_it output To: Andrew Burgess , gdb-patches@sourceware.org Cc: Simon Marchi References: <20260928181855.3217561-1-simon.marchi@polymtl.ca> <878q4l11hy.fsf@redhat.com> Content-Language: en-US From: Simon Marchi In-Reply-To: <878q4l11hy.fsf@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Tue, 29 Sep 2026 01:09: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-28 17:59, Andrew Burgess wrote: > simon.marchi@polymtl.ca writes: > >> From: Simon Marchi >> >> With "maintenance set per-command time on", a scope that takes less >> than a millisecond prints: >> >> Time for "...": wall 0.000, user 0.000, sys 0.000, user+sys 0.000, -nan % CPU >> >> The durations are converted to an integer millisecond count before the >> CPU usage is computed, so a sub-millisecond scope truncates the wall >> time to zero, and the division produces a NaN (or an infinity, if the >> CPU time is not zero). We don't really care about sub-millisecond >> durations for the purpose of this tool, so just add a check for >> `wall_ms == 0`, and report the CPU usage as 0% if true. This is purely >> cosmetic. > > LGTM. > > Approved-By: Andrew Burgess Thanks, pushed. Simon