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>
This commit is contained in:
parent
783abbd444
commit
19684e969d
|
@ -182,15 +182,15 @@ static int arm_spe_read_record(struct arm_spe_decoder *decoder)
|
|||
if (payload & BIT(EV_TLB_ACCESS))
|
||||
decoder->record.type |= ARM_SPE_TLB_ACCESS;
|
||||
|
||||
if ((idx == 1 || idx == 2 || idx == 3) &&
|
||||
if ((idx == 2 || idx == 4 || idx == 8) &&
|
||||
(payload & BIT(EV_LLC_MISS)))
|
||||
decoder->record.type |= ARM_SPE_LLC_MISS;
|
||||
|
||||
if ((idx == 1 || idx == 2 || idx == 3) &&
|
||||
if ((idx == 2 || idx == 4 || idx == 8) &&
|
||||
(payload & BIT(EV_LLC_ACCESS)))
|
||||
decoder->record.type |= ARM_SPE_LLC_ACCESS;
|
||||
|
||||
if ((idx == 1 || idx == 2 || idx == 3) &&
|
||||
if ((idx == 2 || idx == 4 || idx == 8) &&
|
||||
(payload & BIT(EV_REMOTE_ACCESS)))
|
||||
decoder->record.type |= ARM_SPE_REMOTE_ACCESS;
|
||||
|
||||
|
|
Loading…
Reference in New Issue