aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/header.c
diff options
context:
space:
mode:
authorLeo Yan <leo.yan@linaro.org>2020-11-11 15:11:32 +0800
committerArnaldo Carvalho de Melo <acme@redhat.com>2020-11-11 14:45:05 -0300
commit0a04244cabc5560ce1e08555e8712a4cd20ab6ce (patch)
tree8090fbee5337bc2c7f2149bb33f34d58f7c88b4d /tools/perf/util/header.c
parentperf arm-spe: Refactor arm_spe_get_events() (diff)
downloadlinux-dev-0a04244cabc5560ce1e08555e8712a4cd20ab6ce.tar.xz
linux-dev-0a04244cabc5560ce1e08555e8712a4cd20ab6ce.zip
perf arm-spe: Fix packet length handling
When processing address packet and counter packet, if the packet contains extended header, it misses to account the extra one byte for header length calculation, thus returns the wrong packet length. To correct the packet length calculation, one possible fixing is simply to plus extra 1 for extended header, but will spread some duplicate code in the flows for processing address packet and counter packet. Alternatively, we can refine the function arm_spe_get_payload() to not only support short header and allow it to support extended header, and rely on it for the packet length calculation. So this patch refactors function arm_spe_get_payload() with a new argument 'ext_hdr' for support extended header; the packet processing flows can invoke this function to unify the packet length calculation. Signed-off-by: Leo Yan <leo.yan@linaro.org> Reviewed-by: Andre Przywara <andre.przywara@arm.com> Link: https://lore.kernel.org/r/20201111071149.815-6-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/header.c')
0 files changed, 0 insertions, 0 deletions