]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - tools/perf/builtin-trace.c
perf evsel: Add has_callchain() helper to make code more compact/clear
[linux.git] / tools / perf / builtin-trace.c
index 560aed7da36a44df845928d3b46c627e27cc71d3..6a748eca2edb4231a2517ae3d12e2023ca6bd076 100644 (file)
@@ -2491,7 +2491,7 @@ static int trace__run(struct trace *trace, int argc, const char **argv)
         * to override an explicitely set --max-stack global setting.
         */
        evlist__for_each_entry(evlist, evsel) {
-               if ((evsel->attr.sample_type & PERF_SAMPLE_CALLCHAIN) &&
+               if (evsel__has_callchain(evsel) &&
                    evsel->attr.sample_max_stack == 0)
                        evsel->attr.sample_max_stack = trace->max_stack;
        }