From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qv1-xf35.google.com (mail-qv1-xf35.google.com [IPv6:2607:f8b0:4864:20::f35]) by sourceware.org (Postfix) with ESMTPS id 4DE0638582BE for ; Thu, 30 Mar 2023 12:23:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4DE0638582BE Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-qv1-xf35.google.com with SMTP id m16so13767315qvi.12 for ; Thu, 30 Mar 2023 05:23:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680179019; h=content-language:thread-index:content-transfer-encoding :mime-version:message-id:date:subject:in-reply-to:references:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=l5sw4qT4Es4fS53cYi/NmxFCPP6A+RIXxxTXf7vzrMM=; b=VED+U7uY997TsQyiwYyF7Md/SYbFyKCqwNkGrbk6e7Q2F61oV3pV3lhiv+mm3quMvd tDI8UW8i7ArCheoIKl4WAs1K/S9m3AHH/PVhEXN666zBWonEOs8pghELjOmK1y/CG3bf 9U19RFVGK0mPxhoiwS/R8MeHtkExVpW64GlbJyBrUvF+rrjJCwy008EzsDHmkTH13hxK JnMFKC9nOnsxGmLtTgdQIepJtCd/FjHqyzo81gj1L3PW89Is1nJYfuxMK3W1cNfO/gcP zsdkzvXxwGRaVwgQfQlERkQ2JoqczMKveBtc7pzOPFei1mtftIUJGWy/MOVcJ5Pv915f bg2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680179019; h=content-language:thread-index:content-transfer-encoding :mime-version:message-id:date:subject:in-reply-to:references:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=l5sw4qT4Es4fS53cYi/NmxFCPP6A+RIXxxTXf7vzrMM=; b=eRHI1pHjRyC9cuIvMIbKutZbziPMGJwisxwfvi2sNps4vn4Z7rC9tyuBfuLhAkZu68 9O3I+lWpkhIIr/8ktN6o13t+34dynL1XLFKJbPpVoAv0rNOUdN0xr2YKIzctahDH+JAs H7GQmrShv2S3W9KR9k1QNN/qxTU9L3L6eoZoWdOy+cqMLhb13542nyPrdYJONZMApb7Y khR+gMKTWFB3dV5ijHzD4rFt2iF7G3whFytMlzjxra+w/iO0/w2MOvkVCDieDtA91YrH Lf+qbAv20kNivzKRqTNu3iN+pSlasVrqCBU+SdetCOBkd6InBMPQFCHbuiu0hdP7vkEb At6g== X-Gm-Message-State: AAQBX9dD3V3HSaKqkRPiIagcf4uGmLnm7nGZWbvuvLAxlBJQ9l1hUsB9 xeB7jz0gA0cCIx1hmHSvA4hikCDo4vqOFql7 X-Google-Smtp-Source: AKy350ZGqnSnKHnljUeU+4YLkAkjTFrpgIBf8vK6JB0C7KtPIRL+GIzlhJ09wY2QSHS+ZsWFeuknSw== X-Received: by 2002:a05:6214:21a9:b0:5b8:d384:1b1b with SMTP id t9-20020a05621421a900b005b8d3841b1bmr31967922qvc.28.1680179019347; Thu, 30 Mar 2023 05:23:39 -0700 (PDT) Received: from DESKTOP819AQCO (c-73-186-197-163.hsd1.ct.comcast.net. [73.186.197.163]) by smtp.gmail.com with ESMTPSA id c7-20020a0ce7c7000000b005dd8b9345bfsm5424721qvo.87.2023.03.30.05.23.38 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 Mar 2023 05:23:38 -0700 (PDT) From: To: "'Ruud van der Pas'" Cc: References: <001a01d960b9$d56bfa60$8043ef20$@gmail.com> <6B579F47-5F70-496A-BB47-7DD8DC693445@oracle.com> In-Reply-To: <6B579F47-5F70-496A-BB47-7DD8DC693445@oracle.com> Subject: RE: feedback on gprofng Date: Thu, 30 Mar 2023 08:23:38 -0400 Message-ID: <000901d96302$752eb520$5f8c1f60$@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQIXpyPyjs3E8E7l8uzyKWEfK+aLdgLn5np1rn919CA= Content-Language: en-us X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,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: Thanks for responding, Ruud. Your profiler does things, in my opinion, correctly. It samples the stack at the line-of-code or instruction level, on wall-clock time. My only suggestion is an output option. Let the user see a small number, randomly chosen, of such stacks in raw form. Here's an example: https://softwareengineering.stackexchange.com/a/302345/2429 -----Original Message----- From: Ruud van der Pas Sent: Monday, March 27, 2023 15:04 To: mikedunlavey44@gmail.com Cc: binutils@sourceware.org Subject: Re: feedback on gprofng Hi Mike, Thanks for your email and suggestion. > I suggest you have another output from gprofng: We actually use sampling. It is the cornerstone of our approach. > (I assume the sampling is on wall-clock time, so it has visibility > into > I/O.) Yes, we do and indeed have visibility into I/O. We actually just heard of a use case where gprofng shows that the (formatted) I/O is the sequential bottleneck in a multithreaded application. We record call stacks, also for individual threads, using sampling. The user can control the sampling granularity, either symbolically (e.g. "high", or "low"), or through a sampling rate. There are also filters to select call stacks, a window in time, threads, etc. We also just released a GUI that, among other things, has a timeline where we show color coded call stacks. Each function we see gets assigned a color and we show these call stacks as a function of time. This is also done for the threads in a multithreaded application. In this timeline, it is really easy to identify gaps in the execution. You literally see them and by inspecting the call stacks, you can find out where the execution was when it happened. Kind regards, Ruud > > > > Let the user choose a small number N, like 10 or 20, and then select N > stacks at random (with source code line info) and display them, in a > tree or in raw form. The point is - any performance problem consists > of activity that isn't necessary, and if it accounts for fraction F of > time, then it will show up on NF samples. High precision of > measurement is not necessary, but precision of insight is. > > > > If there are multiple threads, let each sample be from all running > threads at the same time, so the user can see which threads are > waiting for which other threads at the point in time. > > > > Let me know if this makes sense, or maybe you've already done it. > > > > Thanks, > > Mike Dunlavey > > > > P.S. I've been advocating this for years on StackOverflow. People > who've tried it agree that it works. I've also got a YouTube video about it. > > >