mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
perf: add context_switches software perf event support
This patch adds support and documentation for the context_switches perf event. Signed-off-by: Nitesh Konkar <nitkon12@linux.vnet.ibm.com>
This commit is contained in:
committed by
John Ferlan
parent
6ef2c7e00f
commit
99cc3dc6a2
@@ -2220,6 +2220,16 @@ void virDomainStatsRecordListFree(virDomainStatsRecordPtr *stats);
|
||||
*/
|
||||
# define VIR_PERF_PARAM_PAGE_FAULTS "page_faults"
|
||||
|
||||
/**
|
||||
* VIR_PERF_PARAM_CONTEXT_SWITCHES:
|
||||
*
|
||||
* Macro for typed parameter name that represents context_switches
|
||||
* perf event which can be used to measure the count of context
|
||||
* switches by applications running on the platform. It corresponds
|
||||
* to the "perf.context_switches" field in the *Stats APIs.
|
||||
*/
|
||||
# define VIR_PERF_PARAM_CONTEXT_SWITCHES "context_switches"
|
||||
|
||||
|
||||
int virDomainGetPerfEvents(virDomainPtr dom,
|
||||
virTypedParameterPtr *params,
|
||||
|
||||
Reference in New Issue
Block a user