diff options
| author | Leo Yan <[email protected]> | 2020-11-11 15:11:31 +0800 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <[email protected]> | 2020-11-11 14:45:05 -0300 |
| commit | b65577baf482909225c79d8a6bad44d2a62751f4 (patch) | |
| tree | 50b3bad32ed5c0435b18bfdb8ebef9a8ed272b3b /tools/perf/scripts/python | |
| parent | b2ded2e2e2764e502fc025f615210434f1eaa2a9 (diff) | |
perf arm-spe: Refactor arm_spe_get_events()
In function arm_spe_get_events(), the event packet's 'index' is assigned
as payload length, but the flow is not directive: it firstly gets the
packet length from the return value of arm_spe_get_payload(), the value
includes header length (1) and payload length:
int ret = arm_spe_get_payload(buf, len, packet);
and then reduces header length from packet length, so finally get the
payload length:
packet->index = ret - 1;
To simplify the code, this patch directly assigns payload length to
event packet's index; and at the end it calls arm_spe_get_payload() to
return the payload value.
Signed-off-by: Leo Yan <[email protected]>
Reviewed-by: Andre Przywara <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions