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: NHe Chuyue <hechuyue@wxiat.com> Signed-off-by: NGu Zitao <guzitao@wxiat.com>
Showing
想要评论请 注册 或 登录