qemu workaround

上级 3f0fefbe
......@@ -10,7 +10,12 @@ struct pmc_count {
// XXX(sbw) we loose our original affinity
for (int i = 0; i < NCPU; i++) {
setaffinity(i);
// XXX(sbw) qemu doesn't seem to support CR4_PCE
#if defined(HW_qemu)
n.count_[i] = 0;
#else
n.count_[i] = rdpmc(ctr);
#endif
}
setaffinity(-1);
return n;
......
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论