summaryrefslogtreecommitdiff
path: root/tools/perf/util/machine.c
diff options
context:
space:
mode:
authorAdrian Hunter <adrian.hunter@intel.com>2015-09-25 16:15:48 +0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2015-10-01 09:56:06 -0300
commit0edd453368c6b9cdb756bde2b6675bb0d5d0eb0a (patch)
tree969b68d6961f78c7e41a6293bd108b57f0d80f56 /tools/perf/util/machine.c
parent208e7607459477432d3df52c32d4b961a96d4a94 (diff)
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 <adrian.hunter@intel.com> Cc: Jiri Olsa <jolsa@redhat.com> Link: http://lkml.kernel.org/r/1443186956-18718-18-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/machine.c')
-rw-r--r--tools/perf/util/machine.c2
1 files changed, 1 insertions, 1 deletions
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;
}