perf evsel: Skip ignored symbols while printing callchain
[cascardo/linux.git] / tools / perf / util / session.c
index f36d24a..b0b15e2 100644 (file)
@@ -1522,6 +1522,9 @@ void perf_evsel__print_ip(struct perf_evsel *evsel, union perf_event *event,
                        if (!node)
                                break;
 
+                       if (node->sym && node->sym->ignore)
+                               goto next;
+
                        if (print_ip)
                                printf("%c%16" PRIx64, s, node->ip);
 
@@ -1544,12 +1547,15 @@ void perf_evsel__print_ip(struct perf_evsel *evsel, union perf_event *event,
                        if (!print_oneline)
                                printf("\n");
 
-                       callchain_cursor_advance(&callchain_cursor);
-
                        stack_depth--;
+next:
+                       callchain_cursor_advance(&callchain_cursor);
                }
 
        } else {
+               if (al.sym && al.sym->ignore)
+                       return;
+
                if (print_ip)
                        printf("%16" PRIx64, sample->ip);