Commit fd62817c authored by He Chuyue's avatar He Chuyue Committed by guzitao
Browse files

sw64: perf: fix raw event count

Sunway inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I56X48



--------------------------------

To read raw event count, perf stat calls sw64_pmu_start() to start
the event and then calls sw64_perf_event_set_period() to set a new
period to sample over.

It used to initialize hwc.prev_count and PMC with different values
and this will result in error sample values. To fix this problem,
initialize them to 0 consistently.

Signed-off-by: default avatarHe Chuyue <hechuyue@wxiat.com>

Signed-off-by: default avatarGu Zitao <guzitao@wxiat.com>
parent 12edb943
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment