perf: arm-spe: Fix check error when synthesizing events
authorWei Li <liwei391@huawei.com>
Fri, 24 Jul 2020 07:26:28 +0000 (15:26 +0800)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 21 Aug 2020 13:22:23 +0000 (10:22 -0300)
commit19684e969debc912b3ec5eda72b4f90aa73f1d30
tree58e7231ae46fe397035daf217232f8bce4c05935
parent783abbd444926f0d94039c4cf5e5ca1d07496bce
perf: arm-spe: Fix check error when synthesizing events

In arm_spe_read_record(), when we are processing an events packet,
'decoder->packet.index' is the length of payload, which has been
transformed in payloadlen(). So correct the check of 'idx'.

Signed-off-by: Wei Li <liwei391@huawei.com>
Reviewed-by: Leo Yan <leo.yan@linaro.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Hanjun Guo <guohanjun@huawei.com>
Cc: James Clark <james.clark@arm.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lore.kernel.org/lkml/20200724072628.35904-1-liwei391@huawei.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/arm-spe-decoder/arm-spe-decoder.c