From: Adrian Hunter Date: Fri, 25 Sep 2015 13:15:48 +0000 (+0300) Subject: perf callchain: Allow for max_stack greater than PERF_MAX_STACK_DEPTH X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0edd453368c6b9cdb756bde2b6675bb0d5d0eb0a;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git perf callchain: Allow for max_stack greater than PERF_MAX_STACK_DEPTH Adjust the validation to allow for max_stack greater than PERF_MAX_STACK_DEPTH. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Link: http://lkml.kernel.org/r/1443186956-18718-18-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c index 76fe167c359e..5ef90be2a249 100644 --- a/tools/perf/util/machine.c +++ b/tools/perf/util/machine.c @@ -1831,7 +1831,7 @@ static int thread__resolve_callchain_sample(struct thread *thread, } check_calls: - if (chain->nr > PERF_MAX_STACK_DEPTH) { + if (chain->nr > PERF_MAX_STACK_DEPTH && (int)chain->nr > max_stack) { pr_warning("corrupted callchain. skipping...\n"); return 0; }