2

In kernel 3.11.0, in the struct perf_event_attr, there are three members named exclude_hv/exclude_host/exclude_guest.

I know the exclude_host field is to exclude events generated by the host when running kvm. But what is the meaning of exclude_hv? Is it used in the Xen?
What is the mechanism in hardware that supports the function of exclude_host? As far as I know, in the performance monitoring select registers, there are no such bits that control the event counter to exclude events generated by the host.

4

1 回答 1

1

这有点老了,但对于那些正在寻找答案的人来说,就像我一样:

exclude_hv:不计算管理程序中发生的事件。

在用户空间、内核、管理程序、主机等中发生的事件之间的区别是在软件中完成的。内核和/或管理程序将在每次上下文更改时退出并替换事件计数和配置。

这是perf_events的一个很好的描述,它是处理性能计数器的内核模块。

于 2014-02-16T08:22:56.600 回答