lkml.org 
[lkml]   [2015]   [Sep]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 17/25] perf callchain: Allow for max_stack greater than PERF_MAX_STACK_DEPTH
Em Fri, Sep 25, 2015 at 04:15:48PM +0300, Adrian Hunter escreveu:
> Adjust the validation to allow for max_stack greater than
> PERF_MAX_STACK_DEPTH.
>
> Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
> ---
> tools/perf/util/machine.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c
> index fd1efeafb343..d7bd9a304535 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) {

Both?

> pr_warning("corrupted callchain. skipping...\n");
> return 0;
> }
> --
> 1.9.1


\
 
 \ /
  Last update: 2015-09-28 22:41    [W:0.308 / U:0.460 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site