Skip to contentSkip to conversation

perf report: Don't show unresolved DSOs and symbols when -S/-d is used

PATCH In review Arnaldo Carvalho de Melo 1 participant 2 messages Aug 12, 2009 – Aug 13, 2009 perf events

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 perf report: Don't show unresolved DSOs and symbols when -S/-d is used

We're interested in just those symbols/DSOs, so filter out the unresolved ones.

---
 tools/perf/builtin-report.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
tools/perf/builtin-report.c +3 -2
index 58a4f08..6321951 100644
@@ -1340,10 +1340,11 @@ process_sample_event(event_t *event, unsigned long offset, unsigned long head)
 	if (show & show_mask) {
 		struct symbol *sym = resolve_symbol(thread, &map, &dso, &ip);
 
-		if (dso_list && dso && dso->name && !strlist__has_entry(dso_list, dso->name))
+		if (dso_list && (!dso || !dso->name ||
+				 !strlist__has_entry(dso_list, dso->name)))
 			return 0;
 
-		if (sym_list && sym && !strlist__has_entry(sym_list, sym->name))
+		if (sym_list && (!sym || !strlist__has_entry(sym_list, sym->name)))
 			return 0;
 
 		if (hist_entry__add(thread, map, dso, sym, ip, chain, level, period)) {
Signature · 1 line
1.6.2.5
#1 lore raw
Commit-ID:  8fd101f20bdf771949a8f3a5a779877d09b2fb56
Gitweb:     http://git.kernel.org/tip/8fd101f20bdf771949a8f3a5a779877d09b2fb56
Author:     Arnaldo Carvalho de Melo <[email protected]>
AuthorDate: Wed, 12 Aug 2009 18:19:57 -0300
Committer:  Ingo Molnar <[email protected]>
CommitDate: Thu, 13 Aug 2009 12:05:52 +0200

perf report: Don't show unresolved DSOs and symbols when -S/-d is used

We're interested in just those symbols/DSOs, so filter out the unresolved ones.

LKML-Reference: <[email protected]>

---
 tools/perf/builtin-report.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
tools/perf/builtin-report.c +3 -2
index 23e1457..b53a60f 100644
@@ -1590,10 +1590,11 @@ process_sample_event(event_t *event, unsigned long offset, unsigned long head)
 	if (show & show_mask) {
 		struct symbol *sym = resolve_symbol(thread, &map, &dso, &ip);
 
-		if (dso_list && dso && dso->name && !strlist__has_entry(dso_list, dso->name))
+		if (dso_list && (!dso || !dso->name ||
+				 !strlist__has_entry(dso_list, dso->name)))
 			return 0;
 
-		if (sym_list && sym && !strlist__has_entry(sym_list, sym->name))
+		if (sym_list && (!sym || !strlist__has_entry(sym_list, sym->name)))
 			return 0;
 
 		if (hist_entry__add(thread, map, dso, sym, ip, chain, level, period)) {