Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Adrian Hunter and committed by
Arnaldo Carvalho de Melo
0edd4533 208e7607

+1 -1
+1 -1
tools/perf/util/machine.c
··· 1831 1831 } 1832 1832 1833 1833 check_calls: 1834 - if (chain->nr > PERF_MAX_STACK_DEPTH) { 1834 + if (chain->nr > PERF_MAX_STACK_DEPTH && (int)chain->nr > max_stack) { 1835 1835 pr_warning("corrupted callchain. skipping...\n"); 1836 1836 return 0; 1837 1837 }