Received: by 2002:a05:7208:820a:b0:81:e143:7c29 with SMTP id q10csp588353rbf; Wed, 10 Apr 2024 13:45:50 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWEH20XUX7BXUgMovdFV2Du0UJ7l/phihQVoOcSTIfXQNOsVYXTYMA/w5Mlbk/sxq9M9t9JtCJy+qVpdE+U8tUDXaZXATehqfNU1Lp8MQ== X-Google-Smtp-Source: AGHT+IGoRiUvc7nzWGuom+fHnBj6t+R4KKPvACsjWaA2iZPpAmX7zrHLegURDI3kmMyJHLIwBgaV X-Received: by 2002:a17:90a:fe8c:b0:2a4:ad2e:1c5a with SMTP id co12-20020a17090afe8c00b002a4ad2e1c5amr3956661pjb.35.1712781949790; Wed, 10 Apr 2024 13:45:49 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712781949; cv=pass; d=google.com; s=arc-20160816; b=WuBRS1OlBfds16j5bvi3iwqctxUzsx2H9bN9QfO7DB0LkDaBjwJ73wnxJnOAIh6uAs Z9idpiLLc2I1zQMN5diYP4XZ+jVmDbV9fajItJNrEkw+BOwRqj2rucbXytb5HfXbZjX7 Jx0H9ft5LXf2FvkDNZ0vkDZtbqQYHKb4vGN4lhYEtiT9AMzsQ/xYU5DDIhsOhmvNU9hV odxYRW50VSEk/6qz/Z2W9uzzoiVKVuDnHsGTQSDr95H9U7Hc/5NBhVsqjnDHmfAWoL69 8m61jRzw9LqjlYfdEwvgz7B18BXXWuHPS1BGg4sQ4E9Xcrf67Li6m1plqPF71zVCd1Ys GruQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=DHX/kQCsmw8+lDe5PouB/37NbpKBKnEZNAzJ6+sU5gg=; fh=49GrrO/H3LiGmymuFnNd59pBYHHWBS2xk/6Ejg0rn8E=; b=l7lBBQouJ5R5Gkz784Gz8C4vOEzkAV4sldfnQKEf0a4y0B6l2MQV50wREv7egSvwKS zKxgEEnQ0u1q4q0cTYup6ER1TgfjBxeDxA2XDyNMVNV0ItxDoKnQu5eQpGp2ZVs7PPrF kMPOtz6jHJIAtrVhtx/0B5cJrTDHtpGe8ny0Gpt+I2F8bEf1kymg3jWi8KEXFN9d5q0r X/GSMW7A0klAEQ7dzr3j9pG8KMTr4F9dwyJJd+KeX8vRg9y87SsLYrj7Xy8sYUtprH6G KYRrqmxly2m0NgCMoNwS/+AhuiMTtkBVN5zOB69GtIbADj5DB2MbwBywLn0H/hJk+b2n jVEA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jFEHYAiR; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-139320-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-139320-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id p8-20020a17090a2d8800b002a5e71a4900si86564pjd.106.2024.04.10.13.45.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Apr 2024 13:45:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-139320-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jFEHYAiR; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-139320-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-139320-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 9E684B22867 for ; Wed, 10 Apr 2024 20:38:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7AB5C181CE3; Wed, 10 Apr 2024 20:38:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="jFEHYAiR" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8AA81181B9F; Wed, 10 Apr 2024 20:38:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712781517; cv=none; b=Ov9c8N6634UDRNcD0PfVGrsaYEHldu+BAM0hlexjtlxud0nKuAkndXQ0dyiUJeysVyfLHBSiWsmF+a3xpdn/nOIbRH/o1E7OZ7QYGCl8k3hK8tBDOfvFK47ogJ96ycz1FD3T+hzVYSAhaMQOsO4jg2N5ij/vfDJYVTwSszdpIkM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712781517; c=relaxed/simple; bh=/HoZeNzG6zaY4GRuRf8eyKh33b0YMjx8EBiXsVQb2Ao=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=SAkCWqCPBGC9zRZS6ukt082LgtgXBn3oJ9bYP2rgevvcvBOWpuF9qD7fSBMcGrXLgzrypbzaxenfFxTpxz2dW4EDamauyOwyHyYyo5s3Lb8fVkiTZQIVxOvw9/DUAWWsIMV+ZKLxsMsc4Zko2EFeiFqGHtOahiAfbD0Je2t+5iQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=jFEHYAiR; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id B04E2C433F1; Wed, 10 Apr 2024 20:38:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712781517; bh=/HoZeNzG6zaY4GRuRf8eyKh33b0YMjx8EBiXsVQb2Ao=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=jFEHYAiR7BEFnaBCKdWLiS42v69jjRafCf6tx3a8bBjZf9s4IWk10Cmj/wJS4IFR3 h9zbEg7hs5fQoUhLeD6M15JGjaPeNHpCUoIcs7pjnBf1vdFoDoTqPq5VA99MzoSfwh air4ngKXWkx9bBjQDI2mgmCl6waaBGFeDqZI0ilk/aY4E+zOsD/TgcTl69WOeLjQIi hy4BS4UxshMznv/u+uwGW0KS9KCR/UKE0JH6OvcJ5lVeUTkYJTQZiEcBiXC7fd9sgA 71zyD8I724rCL7bQGTz2081Hqwjxqw1nispkX+/GmqWYHYWQkE/kl1GNWg/ytc7wUA AKR87nXFKHxQg== Date: Wed, 10 Apr 2024 17:38:33 -0300 From: Arnaldo Carvalho de Melo To: Namhyung Kim Cc: Ian Rogers , Kan Liang , Jiri Olsa , Adrian Hunter , Peter Zijlstra , Ingo Molnar , LKML , linux-perf-users@vger.kernel.org Subject: Re: [PATCH 4/6] perf annotate-data: Support event group display in TUI Message-ID: References: <20240409235000.1893969-1-namhyung@kernel.org> <20240409235000.1893969-5-namhyung@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Wed, Apr 10, 2024 at 05:24:56PM -0300, Arnaldo Carvalho de Melo wrote: > On Tue, Apr 09, 2024 at 04:49:58PM -0700, Namhyung Kim wrote: > > Like in stdio, it should print all events in a group together. > > How to test this? > > You mean something like: > > root@number:~# perf record -a -e '{cpu_core/mem-loads,ldlat=30/P,cpu_core/mem-stores/P}' > ^C[ perf record: Woken up 8 times to write data ] > [ perf record: Captured and wrote 4.980 MB perf.data (55825 samples) ] > > root@number:~# > > root@number:~# perf annotate --stdio --data-type > > And then having the same output in the TUI? > > Trying this... Added, the following, ok? And the --stdio has all the missing info in TUI: Annotate type: 'union ' in /usr/lib64/libc.so.6 (1131 samples): event[0] = cpu_core/mem-loads,ldlat=30/P event[1] = cpu_core/mem-stores/P Committer notes: Collect it: root@number:~# perf record -a -e '{cpu_core/mem-loads,ldlat=30/P,cpu_core/mem-stores/P}' ^C[ perf record: Woken up 8 times to write data ] [ perf record: Captured and wrote 4.980 MB perf.data (55825 samples) ] root@number:~# Then do it in stdio: root@number:~# perf annotate --stdio --data-type Annotate type: 'union ' in /usr/lib64/libc.so.6 (1131 samples): event[0] = cpu_core/mem-loads,ldlat=30/P event[1] = cpu_core/mem-stores/P ============================================================================ Percent offset size field 100.00 100.00 0 40 union { 100.00 100.00 0 40 struct __pthread_mutex_s __data { 48.61 23.46 0 4 int __lock; 0.00 0.48 4 4 unsigned int __count; 6.38 41.32 8 4 int __owner; 8.74 34.02 12 4 unsigned int __nusers; 35.66 0.26 16 4 int __kind; 0.61 0.45 20 2 short int __spins; 0.00 0.00 22 2 short int __elision; 0.00 0.00 24 16 __pthread_list_t __list { 0.00 0.00 24 8 struct __pthread_internal_list* __prev; 0.00 0.00 32 8 struct __pthread_internal_list* __next; }; }; 0.00 0.00 0 0 char* __size; 48.61 23.94 0 8 long int __align; }; Now with TUI before this patch: root@number:~# perf annotate --tui --data-type Annotate type: 'union ' (790 samples) Percent Offset Size Field 100.00 0 40 union { 100.00 0 40 struct __pthread_mutex_s __data { 48.61 0 4 int __lock; 0.00 4 4 unsigned int __count; 6.38 8 4 int __owner; 8.74 12 4 unsigned int __nusers; 35.66 16 4 int __kind; 0.61 20 2 short int __spins; 0.00 22 2 short int __elision; 0.00 24 16 __pthread_list_t __list { 0.00 24 8 struct __pthread_internal_list* __prev; 0.00 32 8 struct __pthread_internal_list* __next; 0.00 0 0 char* __size; 48.61 0 8 long int __align; }; And now after this patch: Annotate type: 'union ' (790 samples) Percent Offset Size Field 100.00 100.00 0 40 union { 100.00 100.00 0 40 struct __pthread_mutex_s __data { 48.61 23.46 0 4 int __lock; 0.00 0.48 4 4 unsigned int __count; 6.38 41.32 8 4 int __owner; 8.74 34.02 12 4 unsigned int __nusers; 35.66 0.26 16 4 int __kind; 0.61 0.45 20 2 short int __spins; 0.00 0.00 22 2 short int __elision; 0.00 0.00 24 16 __pthread_list_t __list { 0.00 0.00 24 8 struct __pthread_internal_list* __prev; 0.00 0.00 32 8 struct __pthread_internal_list* __next; }; }; 0.00 0.00 0 0 char* __size; 48.61 23.94 0 8 long int __align; }; Reviewed-by: Ian Rogers Signed-off-by: Namhyung Kim Tested-by: Arnaldo Carvalho de Melo