[libvirt] [libvirt-perl][PATCH 0/2] Add more PERF_PARAM_* constants

Now that libvirt-2.2.0 is out, we should: a) do the libvirt-perl release too b) adapt to new constants pushed to 2.3.0 Michal Privoznik (2): Bump version to 2.3.0 Add more PERF_PARAM_* constants Changes | 5 +++++ Makefile.PL | 2 +- README | 2 +- Virt.xs | 4 ++++ lib/Sys/Virt.pm | 2 +- lib/Sys/Virt/Domain.pm | 27 +++++++++++++++++++++++++++ 6 files changed, 39 insertions(+), 3 deletions(-) -- 2.8.4

Signed-off-by: Michal Privoznik <mprivozn@redhat.com> --- Changes | 4 ++++ Makefile.PL | 2 +- README | 2 +- lib/Sys/Virt.pm | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Changes b/Changes index 51a47e4..20a20a2 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,9 @@ Revision history for perl module Sys::Virt +2.3.0 2016-00-00 + + - XXX + 2.2.0 2016-00-00 - Add virConnectNodeDeviceEventRegisterAny and diff --git a/Makefile.PL b/Makefile.PL index fd3f419..7719ce0 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -3,7 +3,7 @@ use ExtUtils::MakeMaker; # See lib/ExtUtils/MakeMaker.pm for details of how to influence # the contents of the Makefile that is written. -my $libvirtver = "2.2.0"; +my $libvirtver = "2.3.0"; my $stat = system "pkg-config --atleast-version=$libvirtver libvirt"; die "cannot run pkg-config to check libvirt version" if $stat == -1; die "libvirt >= $libvirtver is required\n" unless $stat == 0; diff --git a/README b/README index e1f371a..67f4680 100644 --- a/README +++ b/README @@ -7,6 +7,6 @@ further details on libvirt consult its website http://libvirt.org/ The only pre-requisite for this module is libvirt itself. For installation instructions, consult the INSTALL file. -The current minimum required version of libvirt is 2.2.0 +The current minimum required version of libvirt is 2.3.0 -- End diff --git a/lib/Sys/Virt.pm b/lib/Sys/Virt.pm index 06c6d2d..ec3a92a 100644 --- a/lib/Sys/Virt.pm +++ b/lib/Sys/Virt.pm @@ -78,7 +78,7 @@ use Sys::Virt::NWFilter; use Sys::Virt::DomainSnapshot; use Sys::Virt::Stream; -our $VERSION = '2.2.0'; +our $VERSION = '2.3.0'; require XSLoader; XSLoader::load('Sys::Virt', $VERSION); -- 2.8.4

Libvirt introduce PERF_PARAM_CACHE_MISSES, PERF_PARAM_CACHE_REFERENCES, PERF_PARAM_CPU_CYCLES, PERF_PARAM_INSTRUCTIONS constants. Add those to our perl bindings too. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> --- Changes | 3 ++- Virt.xs | 4 ++++ lib/Sys/Virt/Domain.pm | 27 +++++++++++++++++++++++++++ 3 files changed, 33 insertions(+), 1 deletion(-) diff --git a/Changes b/Changes index 20a20a2..a2c2865 100644 --- a/Changes +++ b/Changes @@ -2,7 +2,8 @@ Revision history for perl module Sys::Virt 2.3.0 2016-00-00 - - XXX + - Add PERF_PARAM_CACHE_MISSES, PERF_PARAM_CACHE_REFERENCES, + PERF_PARAM_CPU_CYCLES, PERF_PARAM_INSTRUCTIONS constants 2.2.0 2016-00-00 diff --git a/Virt.xs b/Virt.xs index d4eac47..ac337ad 100644 --- a/Virt.xs +++ b/Virt.xs @@ -8289,6 +8289,10 @@ BOOT: REGISTER_CONSTANT_STR(VIR_PERF_PARAM_CMT, PERF_PARAM_CMT); REGISTER_CONSTANT_STR(VIR_PERF_PARAM_MBML, PERF_PARAM_MBML); REGISTER_CONSTANT_STR(VIR_PERF_PARAM_MBMT, PERF_PARAM_MBMT); + REGISTER_CONSTANT_STR(VIR_PERF_PARAM_CACHE_MISSES, PERF_PARAM_CACHE_MISSES); + REGISTER_CONSTANT_STR(VIR_PERF_PARAM_CACHE_REFERENCES, PERF_PARAM_CACHE_REFERENCES); + REGISTER_CONSTANT_STR(VIR_PERF_PARAM_CPU_CYCLES, PERF_PARAM_CPU_CYCLES); + REGISTER_CONSTANT_STR(VIR_PERF_PARAM_INSTRUCTIONS, PERF_PARAM_INSTRUCTIONS); 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 21c2729..061560f 100644 --- a/lib/Sys/Virt/Domain.pm +++ b/lib/Sys/Virt/Domain.pm @@ -2707,6 +2707,33 @@ The MBMT event counter which can be used to monitor total system bandwidth (bytes/s) from one level of cache to another. It corresponds to the "perf.mbmt" field in the *Stats APIs. +=item Sys::Virt::Domain::PERF_PARAM_CACHE_MISSES + +The cache_misses perf event counter which can be used to measure +the count of cache misses by applications running on the +platform. It corresponds to the "perf.cache_misses" field in the +*Stats APIs. + +=item Sys::Virt::Domain::PERF_PARAM_CACHE_REFERENCES + +The cache_references perf event counter which can be used to +measure the count of cache hits by applications running on the +platform. It corresponds to the "perf.cache_references" field in +the *Stats APIs. + +=item Sys::Virt::Domain::PERF_PARAM_CPU_CYCLES + +The instructions perf event counter which can be used to measure +the count of instructions by applications running on the +platform. It corresponds to the "perf.instructions" field in the +*Stats APIs. + +=item Sys::Virt::Domain::PERF_PARAM_INSTRUCTIONS + +The cpu_cycles perf event counter which can be used to measure +how many cpu cycles one instruction needs. It corresponds to the +"perf.cpu_cycles" field in the *Stats APIs. + =back =head2 VCPU FLAGS -- 2.8.4

On Sun, Sep 04, 2016 at 10:53:12PM +0200, Michal Privoznik wrote:
Now that libvirt-2.2.0 is out, we should: a) do the libvirt-perl release too b) adapt to new constants pushed to 2.3.0
Michal Privoznik (2): Bump version to 2.3.0 Add more PERF_PARAM_* constants
Changes | 5 +++++ Makefile.PL | 2 +- README | 2 +- Virt.xs | 4 ++++ lib/Sys/Virt.pm | 2 +- lib/Sys/Virt/Domain.pm | 27 +++++++++++++++++++++++++++ 6 files changed, 39 insertions(+), 3 deletions(-)
ACK, I've just pushed changes for the 2.2.0 release, so you can go ahead and push this series. Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
participants (2)
-
Daniel P. Berrange
-
Michal Privoznik