perf report: Don't show unresolved DSOs and symbols when -S/-d is used
[safe/jmp/linux-2.6] / tools / perf / builtin-report.c
index 23e1457..b53a60f 100644 (file)
@@ -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)) {