提交 a5405ba8 编写于 作者: W Wei Li 提交者: Xie XiuQi

perf tools: arm-spe: fix record hang after being terminated

hulk inclusion
category: bugfix
bugzilla: 24005
CVE: NA

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

If the spe event is terminated, we don't enable it again here.
Signed-off-by: NWei Li <liwei391@huawei.com>
Reviewed-by: NXuefeng Wang <wxf.wang@hisilicon.com>
Reviewed-by: NTan Xiaojun <tanxiaojun@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 2f9c0452
...@@ -162,9 +162,13 @@ static int arm_spe_read_finish(struct auxtrace_record *itr, int idx) ...@@ -162,9 +162,13 @@ static int arm_spe_read_finish(struct auxtrace_record *itr, int idx)
struct perf_evsel *evsel; struct perf_evsel *evsel;
evlist__for_each_entry(sper->evlist, evsel) { evlist__for_each_entry(sper->evlist, evsel) {
if (evsel->attr.type == sper->arm_spe_pmu->type) if (evsel->attr.type == sper->arm_spe_pmu->type) {
return perf_evlist__enable_event_idx(sper->evlist, if (evsel->terminated)
evsel, idx); return 0;
else
return perf_evlist__enable_event_idx(
sper->evlist, evsel, idx);
}
} }
return -EINVAL; return -EINVAL;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册