Commit e562e581 authored by Daniel P. Berrangé's avatar Daniel P. Berrangé

Add new hugetlb memory stats constants

Signed-off-by: 's avatarDaniel P. Berrangé <berrange@redhat.com>
parent d195d5d3
...@@ -2,7 +2,8 @@ Revision history for perl module Sys::Virt ...@@ -2,7 +2,8 @@ Revision history for perl module Sys::Virt
5.4.0 2019-05-00 5.4.0 2019-05-00
- XXX - Add VIR_DOMAIN_MEMORY_STAT_HUGETLB_PGALLOC and
VIR_DOMAIN_MEMORY_STAT_HUGETLB_PGFAIL constants
5.2.0 2019-04-03 5.2.0 2019-04-03
......
...@@ -5904,6 +5904,14 @@ memory_stats(dom, flags=0) ...@@ -5904,6 +5904,14 @@ memory_stats(dom, flags=0)
case VIR_DOMAIN_MEMORY_STAT_DISK_CACHES: case VIR_DOMAIN_MEMORY_STAT_DISK_CACHES:
(void)hv_store (RETVAL, "disk_caches", 11, virt_newSVll(stats[i].val), 0); (void)hv_store (RETVAL, "disk_caches", 11, virt_newSVll(stats[i].val), 0);
break; break;
case VIR_DOMAIN_MEMORY_STAT_HUGETLB_PGALLOC:
(void)hv_store (RETVAL, "hugetlb_pgalloc", 15, virt_newSVll(stats[i].val), 0);
break;
case VIR_DOMAIN_MEMORY_STAT_HUGETLB_PGFAIL:
(void)hv_store (RETVAL, "hugetlb_pgfail", 14, virt_newSVll(stats[i].val), 0);
break;
} }
} }
Safefree(stats); Safefree(stats);
...@@ -9139,6 +9147,8 @@ BOOT: ...@@ -9139,6 +9147,8 @@ BOOT:
REGISTER_CONSTANT(VIR_DOMAIN_MEMORY_STAT_LAST_UPDATE, MEMORY_STAT_LAST_UPDATE); REGISTER_CONSTANT(VIR_DOMAIN_MEMORY_STAT_LAST_UPDATE, MEMORY_STAT_LAST_UPDATE);
REGISTER_CONSTANT(VIR_DOMAIN_MEMORY_STAT_USABLE, MEMORY_STAT_USABLE); REGISTER_CONSTANT(VIR_DOMAIN_MEMORY_STAT_USABLE, MEMORY_STAT_USABLE);
REGISTER_CONSTANT(VIR_DOMAIN_MEMORY_STAT_DISK_CACHES, MEMORY_STAT_DISK_CACHES); REGISTER_CONSTANT(VIR_DOMAIN_MEMORY_STAT_DISK_CACHES, MEMORY_STAT_DISK_CACHES);
REGISTER_CONSTANT(VIR_DOMAIN_MEMORY_STAT_HUGETLB_PGALLOC, MEMORY_STAT_HUGETLB_PGALLOC);
REGISTER_CONSTANT(VIR_DOMAIN_MEMORY_STAT_HUGETLB_PGFAIL, MEMORY_STAT_HUGETLB_PGFAIL);
REGISTER_CONSTANT_STR(VIR_DOMAIN_BLOCK_IOTUNE_TOTAL_BYTES_SEC, BLOCK_IOTUNE_TOTAL_BYTES_SEC); REGISTER_CONSTANT_STR(VIR_DOMAIN_BLOCK_IOTUNE_TOTAL_BYTES_SEC, BLOCK_IOTUNE_TOTAL_BYTES_SEC);
......
...@@ -3986,6 +3986,14 @@ Time of last stats refresh from guest ...@@ -3986,6 +3986,14 @@ Time of last stats refresh from guest
Disk cache size Disk cache size
=item Sys::Virt::Domain::MEMORY_STAT_HUGETLB_PGALLOC
The amount of successful huge page allocations
=item Sys::Virt::Domain::MEMORY_STAT_HUGETLB_PGFAIL
The amount of failed huge page allocations
=back =back
=head2 DOMAIN LIST CONSTANTS =head2 DOMAIN LIST CONSTANTS
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment