Signed-off-by: Nitesh Konkar <nitkon12@xxxxxxxxxxxxxxxxxx> --- Changes | 10 +++++++++- Virt.xs | 9 +++++++++ lib/Sys/Virt/Domain.pm | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 72 insertions(+), 1 deletion(-) diff --git a/Changes b/Changes index 90ee3a4..81a4ff4 100644 --- a/Changes +++ b/Changes @@ -2,7 +2,15 @@ Revision history for perl module Sys::Virt 3.1.0 2017-03-00 - - XXX + - Add PERF_PARAM_CPU_CLOCK constant + - Add PERF_PARAM_TASK_CLOCK constant + - Add PERF_PARAM_PAGE_FAULTS constant + - Add PERF_PARAM_CONTEXT_SWITCHES constant + - Add PERF_PARAM_CPU_MIGRATIONS constant + - Add PERF_PARAM_PAGE_FAULTS_MIN constant + - Add PERF_PARAM_PAGE_FAULTS_MAJ constant + - Add PERF_PARAM_ALIGNMENT_FAULTS constant + - Add PERF_PARAM_EMULATION_FAULTS constant 3.0.0 2017-01-19 diff --git a/Virt.xs b/Virt.xs index a2947b6..7a33d7b 100644 --- a/Virt.xs +++ b/Virt.xs @@ -8491,6 +8491,15 @@ BOOT: REGISTER_CONSTANT_STR(VIR_PERF_PARAM_STALLED_CYCLES_FRONTEND, PERF_PARAM_STALLED_CYCLES_FRONTEND); REGISTER_CONSTANT_STR(VIR_PERF_PARAM_STALLED_CYCLES_BACKEND, PERF_PARAM_STALLED_CYCLES_BACKEND); REGISTER_CONSTANT_STR(VIR_PERF_PARAM_REF_CPU_CYCLES, PERF_PARAM_REF_CPU_CYCLES); + REGISTER_CONSTANT_STR(VIR_PERF_PARAM_CPU_CLOCK, PERF_PARAM_CPU_CLOCK); + REGISTER_CONSTANT_STR(VIR_PERF_PARAM_TASK_CLOCK, PERF_PARAM_TASK_CLOCK); + REGISTER_CONSTANT_STR(VIR_PERF_PARAM_PAGE_FAULTS, PERF_PARAM_PAGE_FAULTS); + REGISTER_CONSTANT_STR(VIR_PERF_PARAM_CONTEXT_SWITCHES, PERF_PARAM_CONTEXT_SWITCHES); + REGISTER_CONSTANT_STR(VIR_PERF_PARAM_CPU_MIGRATIONS, PERF_PARAM_CPU_MIGRATIONS); + REGISTER_CONSTANT_STR(VIR_PERF_PARAM_PAGE_FAULTS_MIN, PERF_PARAM_PAGE_FAULTS_MIN); + REGISTER_CONSTANT_STR(VIR_PERF_PARAM_PAGE_FAULTS_MAJ, PERF_PARAM_PAGE_FAULTS_MAJ); + REGISTER_CONSTANT_STR(VIR_PERF_PARAM_ALIGNMENT_FAULTS, PERF_PARAM_ALIGNMENT_FAULTS); + REGISTER_CONSTANT_STR(VIR_PERF_PARAM_EMULATION_FAULTS, PERF_PARAM_EMULATION_FAULTS); REGISTER_CONSTANT_STR(VIR_DOMAIN_BANDWIDTH_IN_AVERAGE, BANDWIDTH_IN_AVERAGE); REGISTER_CONSTANT_STR(VIR_DOMAIN_BANDWIDTH_IN_PEAK, BANDWIDTH_IN_PEAK); diff --git a/lib/Sys/Virt/Domain.pm b/lib/Sys/Virt/Domain.pm index aa7b5bd..d191ec0 100644 --- a/lib/Sys/Virt/Domain.pm +++ b/lib/Sys/Virt/Domain.pm @@ -2809,6 +2809,60 @@ frequency scaling by applications running on the platform. It corresponds to the "perf.ref_cpu_cycles" field in the *Stats APIs. +=item Sys::Virt::Domain::PERF_PARAM_CPU_CLOCK +The cpu_clock perf event counter which can be used to +measure the count of cpu clock by applications running +on the platform. It corresponds to the "perf.cpu_clock" +field in the *Stats APIs. + +=item Sys::Virt::Domain::PERF_PARAM_TASK_CLOCK +The task_clock perf event counter which can be used to +measure the count of task clock by applications running +on the platform. It corresponds to the "perf.task_clock" +field in the *Stats APIs. + +=item Sys::Virt::Domain::PERF_PARAM_PAGE_FAULTS +The page_faults perf event counter which can be used to +measure the count of page faults by applications running +on the platform. It corresponds to the "perf.page_faults" +field in the *Stats APIs. + +=item Sys::Virt::Domain::PERF_PARAM_CONTEXT_SWITCHES +The context_switches perf event counter 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. + +=item Sys::Virt::Domain::PERF_PARAM_CPU_MIGRATIONS +The cpu_migrations perf event counter which can be used to +measure the count of cpu migrations by applications running +on the platform. It corresponds to the "perf.cpu_migrations" +field in the *Stats APIs. + +=item Sys::Virt::Domain::PERF_PARAM_PAGE_FAULTS_MIN +The page_faults_min perf event counter which can be used to +measure the count of minor page faults by applications running +on the platform. It corresponds to the "perf.page_faults_min" +field in the *Stats APIs. + +=item Sys::Virt::Domain::PERF_PARAM_PAGE_FAULTS_MAJ +The page_faults_maj perf event counter which can be used to +measure the count of major page faults by applications running +on the platform. It corresponds to the "perf.page_faults_maj" +field in the *Stats APIs. + +=item Sys::Virt::Domain::PERF_PARAM_ALIGNMENT_FAULTS +The alignment_faults perf event counter which can be used to +measure the count of alignment faults by applications running +on the platform. It corresponds to the "perf.alignment_faults" +field in the *Stats APIs. + +=item Sys::Virt::Domain::PERF_PARAM_EMULATION_FAULTS +The emulation_faults perf event counter which can be used to +measure the count of emulation faults by applications running +on the platform. It corresponds to the "perf.emulation_faults" +field in the *Stats APIs. + =back =head2 VCPU FLAGS -- 1.9.3 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list