From 54bd269205c188967d565f1f5552b13d08ca1be0 Mon Sep 17 00:00:00 2001 From: Adrian Hunter Date: Thu, 4 Jul 2013 16:20:34 +0300 Subject: [PATCH] perf evsel: Fix missing increment in sample parsing The final sample format bit used to be PERF_SAMPLE_STACK_USER which neglected to do a final increment of the array pointer. The result is that the following parsing might start at the wrong place. Signed-off-by: Adrian Hunter Cc: David Ahern Cc: Frederic Weisbecker Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mike Galbraith Cc: Namhyung Kim Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lkml.kernel.org/r/1372944040-32690-16-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/evsel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c index df99ebe852ae..c9c7494506a1 100644 --- a/tools/perf/util/evsel.c +++ b/tools/perf/util/evsel.c @@ -1170,7 +1170,7 @@ int perf_evsel__parse_sample(struct perf_evsel *evsel, union perf_event *event, } else { data->user_stack.data = (char *)array; array += size / sizeof(*array); - data->user_stack.size = *array; + data->user_stack.size = *array++; } } -- GitLab