Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp2898121rdb; Mon, 12 Feb 2024 23:53:20 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVMTDfk5mYHCgXq+WdjQ2LUlxuG5Rq6qWAvEUDOyp5lnb4jxkCq3h6W932pQodnkwKweOH2OvuENef393gd+iM2Dp64aPxsRN+F/DASnw== X-Google-Smtp-Source: AGHT+IH50M/kwRPD9HybjNgyoP2e2py/MTYhoXiCckMgyK3jW7qGLcbCxtnfwF9093I+uD1T3Zvy X-Received: by 2002:a05:6402:180a:b0:561:f130:9a76 with SMTP id g10-20020a056402180a00b00561f1309a76mr755310edy.2.1707810800737; Mon, 12 Feb 2024 23:53:20 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707810800; cv=pass; d=google.com; s=arc-20160816; b=PeOYJ1Vo4ToK7OjipGSH7KLZyK+QFXN9Qua+Mc9QryVKqztWUayHvLtPRuSunIrkaE D6BEDc9WmgI5Emgm7Za9lwjjnWYhMYP/H9Inc0hX1bXcBgyVA8sMFaSF3GVIWdnlDd6V 3C6XZNgOFHLKzrMIIzhjPL2s+B4cENh58sm4i7YTUr9KW2jmaQHZpv/6L784vBlHfm5s F1JJPJxp2s4ERG5xt1X/Y4q4SwWDOBH3iXwfDELOmdYBZxi4qjr9vvdXVop3xf7voaby NVZ+S87BzrqNLkz+1bMdgdrCFvhSg4TAHKK/XXsKmLnNj9UJs1HjKS6c2E/WymGW71a4 UXCQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=IQ8+FeBvJBYvyFGIw+SFqE3esopTbLE/l0SXghmiK94=; fh=5whPci/Es3I1d7s62c2Xq3qzvrLh9V/zwrWl5y61xKI=; b=HWLxdjHBMZiJ9w7cfnJSmhSZqYBWzrU84PZvUKPu7ILxB4hbtdSbj10AiGf0RemB/1 /6ODiCzXtb1ASJ5TVVKWGOcmJUlTbn9h//S5JkSY9fG/476udaRi2Zd1l3szfxm/gO29 3uD2qKc0pMwambm+qhiwBii/YOO3JFaC9CcQMyol2fqoSNW58K89Azm3EuN8uki+9ofP aktJek5GeN+Aq+gW+vUEkZBEJATfR2NAoglVCPtiiW918qCLqt95zNOKg1XnQKPjRG6k w4rQEzYfHYh/+3OGDMSEg4RUt4wLBH47oXGJTMYrNxJAFQJArYXJHwaVAlvztQfLVtEG ka+Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rVYTRJWx; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-63061-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-63061-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=2; AJvYcCXd7hpnpGXB96J0qMlNFSTPbS06rHYGTHvt2mKw2SDmX4rIaUx9fxkScdVhw7BCM1tdZq/661clAJeIUGPrm5Op4NJVjLXfGy2EGbfTcA== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id w15-20020a05640234cf00b00561caa5bf4dsi1374762edc.688.2024.02.12.23.53.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Feb 2024 23:53:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-63061-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rVYTRJWx; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-63061-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-63061-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 7CA291F226BC for ; Tue, 13 Feb 2024 07:53:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B3A39182C5; Tue, 13 Feb 2024 07:52:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="rVYTRJWx" 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 D8C3517743; Tue, 13 Feb 2024 07:52:57 +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=1707810777; cv=none; b=AFwlRdzvSQusN085zPT+mBkh9z/CTvhytyxNPXUTwX0xDZiJEFrO4QAR62IjhWugwknUwGHOyhrcwn4HMfuIJ6uqHU/V1qdGez2wozUYb1T4IupR8tVyRLCzqck178VVxevpRaeCmKa1OT7bDcjZTlVzwJ/s5YUZXoli3uJzqck= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707810777; c=relaxed/simple; bh=RAMSiO9LDsSEGaCX0VfpRG5twBN521Gc1CP60zBfNjM=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=e1YBMR2ycjwFZMXa26idFR4Q3kHflxssskHajqXikKtcyNYrgLR02Dxdpz13aacdCXl2357TsfbSoYFNC/L0yAWPn0JVG6Nk0hUS19gt8vjJ0VMtgOygS5bX/LG2287udx9BXoHD0NuMlyFnC+GzxBPtXqSWwNce0OqciQoDQYI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=rVYTRJWx; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0AA3FC433F1; Tue, 13 Feb 2024 07:52:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707810777; bh=RAMSiO9LDsSEGaCX0VfpRG5twBN521Gc1CP60zBfNjM=; h=From:To:Cc:Subject:Date:From; b=rVYTRJWxch4D6YJ6sy/5Q5z5Cfn84zgis4PxTRcNmSOMUKdd+CrgaCQqpgWkf7MvO PoLnU2fBZCZeQUXB29GfakR1M1Xdf+VG9hf6OiZzZNUI6q4/HVV95b4KsHRAJRr1XM BZ52S9728iPK6ie7ZdJKJlWpCjiPcvU4KTtDsJgnirhJR9zFCsmvmgA1WMyym5Crq6 ljLAXFs2m8/UvNWbYycjeppBLyNQ9ei5b3bfMNjPZ6Mm8JtSAFqyHb6+Ka2f3azXe0 7EEugxs3fU3Q/+qJVnklrhjVocRs/yQQLrl3cyAABJV/t/s40sbaXV/LCb+04xkSIW FapA8tqtv8vYQ== From: Namhyung Kim To: Arnaldo Carvalho de Melo , Ian Rogers Cc: Jiri Olsa , Adrian Hunter , Peter Zijlstra , Ingo Molnar , LKML , linux-perf-users@vger.kernel.org Subject: [PATCHSET 0/4] perf report: Omit dummy events in the output (v1) Date: Mon, 12 Feb 2024 23:52:52 -0800 Message-ID: <20240213075256.1983638-1-namhyung@kernel.org> X-Mailer: git-send-email 2.43.0.687.g38aa6559b0-goog Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Hello, This work is to make the output compact by removing dummy events in the evlist. The dummy events are used to save side-band information like task creation or memory address space change using mmap(2). But after collecting these, it's not used because it won't have any samples. Sometimes users want to run perf report --group to show all recorded events together but they are not interested in those dummy events. This just wastes the precious screen space so we want to get rid of them after use. perf report already has --skip-empty option to skip 0 result in the stat output. I think we can extend it to skip empty events that have no samples. Example output: Before) # # Samples: 232 of events 'cpu/mem-loads,ldlat=30/P, cpu/mem-stores/P, dummy:u' # Event count (approx.): 3089861 # # Overhead Command Shared Object Symbol # ........................ ........... ................. ..................................... # 9.29% 0.00% 0.00% swapper [kernel.kallsyms] [k] update_blocked_averages 5.26% 0.15% 0.00% swapper [kernel.kallsyms] [k] __update_load_avg_se 4.15% 0.00% 0.00% perf-exec [kernel.kallsyms] [k] slab_update_freelist.isra.0 3.87% 0.00% 0.00% perf-exec [kernel.kallsyms] [k] memcg_slab_post_alloc_hook 3.79% 0.17% 0.00% swapper [kernel.kallsyms] [k] enqueue_task_fair 3.63% 0.00% 0.00% sleep [kernel.kallsyms] [k] next_uptodate_page 2.86% 0.00% 0.00% swapper [kernel.kallsyms] [k] __update_load_avg_cfs_rq 2.78% 0.00% 0.00% swapper [kernel.kallsyms] [k] __schedule 2.34% 0.00% 0.00% swapper [kernel.kallsyms] [k] intel_idle 2.32% 0.97% 0.00% swapper [kernel.kallsyms] [k] psi_group_change After) # # Samples: 232 of events 'cpu/mem-loads,ldlat=30/P, cpu/mem-stores/P' # Event count (approx.): 3089861 # # Overhead Command Shared Object Symbol # ................ ........... ................. ..................................... # 9.29% 0.00% swapper [kernel.kallsyms] [k] update_blocked_averages 5.26% 0.15% swapper [kernel.kallsyms] [k] __update_load_avg_se 4.15% 0.00% perf-exec [kernel.kallsyms] [k] slab_update_freelist.isra.0 3.87% 0.00% perf-exec [kernel.kallsyms] [k] memcg_slab_post_alloc_hook 3.79% 0.17% swapper [kernel.kallsyms] [k] enqueue_task_fair 3.63% 0.00% sleep [kernel.kallsyms] [k] next_uptodate_page 2.86% 0.00% swapper [kernel.kallsyms] [k] __update_load_avg_cfs_rq 2.78% 0.00% swapper [kernel.kallsyms] [k] __schedule 2.34% 0.00% swapper [kernel.kallsyms] [k] intel_idle 2.32% 0.97% swapper [kernel.kallsyms] [k] psi_group_change Now 'Overhead' column only has two values for mem-loads and mem-stores. Thanks, Namhyung Namhyung Kim (4): libperf evlist: Update group info in perf_evlist__remove() perf hist: Simplify hist printing logic for group events perf hist: Do not use event index in hpp__fmt() perf report: Do not show dummy events with --skip-empty tools/lib/perf/evlist.c | 21 +++++++ tools/perf/Documentation/perf-report.txt | 3 +- tools/perf/builtin-report.c | 14 ++++- tools/perf/ui/hist.c | 77 +++++++++++++----------- 4 files changed, 79 insertions(+), 36 deletions(-) -- 2.43.0.687.g38aa6559b0-goog