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>] [day] [month] [year] [list]
Message-ID: <tip-fhv9lhzdjxgp9w3w3668lsfw@git.kernel.org>
Date:	Wed, 19 Mar 2014 06:07:02 -0700
From:	tip-bot for Namhyung Kim <tipbot@...or.com>
To:	linux-tip-commits@...r.kernel.org
Cc:	acme@...hat.com, linux-kernel@...r.kernel.org, paulus@...ba.org,
	hpa@...or.com, mingo@...nel.org, andi@...stfloor.org,
	a.p.zijlstra@...llo.nl, namhyung.kim@....com, namhyung@...nel.org,
	jolsa@...hat.com, dsahern@...il.com, tglx@...utronix.de
Subject: [tip:perf/core] perf symbols:
  Apply all filters to an addr_location

Commit-ID:  466fa7647413665dcba46c4f7f2b4a9808426989
Gitweb:     http://git.kernel.org/tip/466fa7647413665dcba46c4f7f2b4a9808426989
Author:     Namhyung Kim <namhyung@...nel.org>
AuthorDate: Mon, 17 Mar 2014 17:12:27 -0300
Committer:  Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Tue, 18 Mar 2014 18:16:58 -0300

perf symbols: Apply all filters to an addr_location

Instead of bailing out as soon as we find a filter that applies, go on
checking all of them so that we can zoom in/out filters.

We also need to make sure we only update al->filtered after
thread__find_addr_map(), because there is where al->filtered gets
initialized to zero.

This will increase the cost of processing when all we don't need this
toggling, but will provide flexibility for the TUI and GTK+ interfaces,
that will incur in creating the hist_entries just once.

Signed-off-by: Namhyung Kim <namhyung.kim@....com>
Acked-by: Jiri Olsa <jolsa@...hat.com>
Cc: Andi Kleen <andi@...stfloor.org>
Cc: David Ahern <dsahern@...il.com>
Cc: Ingo Molnar <mingo@...nel.org>
Cc: Jiri Olsa <jolsa@...hat.com>
Cc: Namhyung Kim <namhyung.kim@....com>
Cc: Paul Mackerras <paulus@...ba.org>
Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Link: http://lkml.kernel.org/n/tip-fhv9lhzdjxgp9w3w3668lsfw@git.kernel.org
[ yanked this out of a previous patch ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
 tools/perf/util/event.c | 14 ++++----------
 1 file changed, 4 insertions(+), 10 deletions(-)

diff --git a/tools/perf/util/event.c b/tools/perf/util/event.c
index 0da09db..ebb48a6 100644
--- a/tools/perf/util/event.c
+++ b/tools/perf/util/event.c
@@ -793,11 +793,6 @@ int perf_event__preprocess_sample(const union perf_event *event,
 	if (thread == NULL)
 		return -1;
 
-	if (thread__is_filtered(thread)) {
-		al->filtered |= (1 << HIST_FILTER__THREAD);
-		goto out_filtered;
-	}
-
 	dump_printf(" ... thread: %s:%d\n", thread__comm_str(thread), thread->tid);
 	/*
 	 * Have we already created the kernel maps for this machine?
@@ -815,6 +810,10 @@ int perf_event__preprocess_sample(const union perf_event *event,
 	dump_printf(" ...... dso: %s\n",
 		    al->map ? al->map->dso->long_name :
 			al->level == 'H' ? "[hypervisor]" : "<not found>");
+
+	if (thread__is_filtered(thread))
+		al->filtered |= (1 << HIST_FILTER__THREAD);
+
 	al->sym = NULL;
 	al->cpu = sample->cpu;
 
@@ -828,7 +827,6 @@ int perf_event__preprocess_sample(const union perf_event *event,
 				strlist__has_entry(symbol_conf.dso_list,
 						   dso->long_name))))) {
 			al->filtered |= (1 << HIST_FILTER__DSO);
-			goto out_filtered;
 		}
 
 		al->sym = map__find_symbol(al->map, al->addr,
@@ -839,11 +837,7 @@ int perf_event__preprocess_sample(const union perf_event *event,
 		(!al->sym || !strlist__has_entry(symbol_conf.sym_list,
 						al->sym->name))) {
 		al->filtered |= (1 << HIST_FILTER__SYMBOL);
-		goto out_filtered;
 	}
 
 	return 0;
-
-out_filtered:
-	return 0;
 }
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ