lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Wed,  8 Jun 2022 07:51:46 +0200
From:   Rafał Miłecki <zajec5@...il.com>
To:     Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>,
        Arnaldo Carvalho de Melo <acme@...nel.org>
Cc:     Mark Rutland <mark.rutland@....com>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Jiri Olsa <jolsa@...nel.org>,
        Namhyung Kim <namhyung@...nel.org>,
        linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org,
        Rafał Miłecki <rafal@...ecki.pl>
Subject: [PATCH] perf report: Skip symbols for idle symbols

From: Rafał Miłecki <rafal@...ecki.pl>

Displaying idle symbols is rather useless and makes reviewing "real"
symbols harder. perf top already skips them so perf report should
probably do the same.

BEFORE

# Overhead  Command          Shared Object          Symbol                             
# ........  ...............  .....................  ...................................
#
    75.04%  swapper          [kernel.kallsyms]      [k] arch_cpu_idle
     1.05%  ksoftirqd/0      [kernel.kallsyms]      [k] __pi___inval_dcache_area
     0.78%  ksoftirqd/0      [kernel.kallsyms]      [k] __netif_receive_skb_core
     0.75%  ksoftirqd/0      [kernel.kallsyms]      [k] fib_table_lookup
     0.58%  ksoftirqd/0      [kernel.kallsyms]      [k] __dev_queue_xmit
     0.56%  ksoftirqd/0      [kernel.kallsyms]      [k] bcm4908_enet_start_xmit
     0.55%  ksoftirqd/0      [kernel.kallsyms]      [k] __skb_flow_dissect
     0.53%  ksoftirqd/0      [kernel.kallsyms]      [k] __pi___clean_dcache_area_poc

AFTER

# Overhead  Command          Shared Object          Symbol                             
# ........  ...............  .....................  ...................................
#
     4.21%  ksoftirqd/0      [kernel.kallsyms]      [k] __pi___inval_dcache_area
     3.13%  ksoftirqd/0      [kernel.kallsyms]      [k] __netif_receive_skb_core
     3.01%  ksoftirqd/0      [kernel.kallsyms]      [k] fib_table_lookup
     2.32%  ksoftirqd/0      [kernel.kallsyms]      [k] __dev_queue_xmit
     2.23%  ksoftirqd/0      [kernel.kallsyms]      [k] bcm4908_enet_start_xmit
     2.21%  ksoftirqd/0      [kernel.kallsyms]      [k] __skb_flow_dissect
     2.13%  ksoftirqd/0      [kernel.kallsyms]      [k] __pi___clean_dcache_area_poc
     2.00%  ksoftirqd/0      [kernel.kallsyms]      [k] eth_type_trans
     1.86%  ksoftirqd/0      [kernel.kallsyms]      [k] bcm4908_enet_poll_rx
     1.73%  ksoftirqd/0      [kernel.kallsyms]      [k] __local_bh_enable_ip
     1.63%  ksoftirqd/0      [kernel.kallsyms]      [k] fib_rules_lookup
     1.61%  ksoftirqd/0      [kernel.kallsyms]      [k] bcm4908_enet_poll_tx
     (...)

Signed-off-by: Rafał Miłecki <rafal@...ecki.pl>
---
 tools/perf/builtin-report.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index afe4a5539ecc..7e31af009d44 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -316,9 +316,12 @@ static int process_sample_event(struct perf_tool *tool,
 				     &rep->total_cycles);
 	}
 
-	ret = hist_entry_iter__add(&iter, &al, rep->max_stack, rep);
-	if (ret < 0)
-		pr_debug("problem adding hist entry, skipping event\n");
+	if (al.sym == NULL || !al.sym->idle) {
+		ret = hist_entry_iter__add(&iter, &al, rep->max_stack, rep);
+		if (ret < 0)
+			pr_debug("problem adding hist entry, skipping event\n");
+	}
+
 out_put:
 	addr_location__put(&al);
 	return ret;
-- 
2.34.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ