[PATCH go] Add support for perf cache_l1d event

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Daniel P. Berrange <berrange@xxxxxxxxxx>
---

Pushed as a build fix

 connect.go      | 6 ++++++
 domain.go       | 6 ++++++
 domain_compat.h | 4 ++++
 3 files changed, 16 insertions(+)

diff --git a/connect.go b/connect.go
index 35eb7fd..41c54b1 100644
--- a/connect.go
+++ b/connect.go
@@ -2253,6 +2253,8 @@ type DomainStatsPerf struct {
 	StalledCyclesBackend     uint64
 	RefCpuCyclesSet          bool
 	RefCpuCycles             uint64
+	CacheL1DSet              bool
+	CacheL1D                 uint64
 }
 
 func getDomainStatsPerfFieldInfo(params *DomainStatsPerf) map[string]typedParamsFieldInfo {
@@ -2309,6 +2311,10 @@ func getDomainStatsPerfFieldInfo(params *DomainStatsPerf) map[string]typedParams
 			set: &params.RefCpuCyclesSet,
 			ul:  &params.RefCpuCycles,
 		},
+		"perf.cache_l1d": typedParamsFieldInfo{
+			set: &params.CacheL1DSet,
+			ul:  &params.CacheL1D,
+		},
 	}
 }
 
diff --git a/domain.go b/domain.go
index 515138a..3e66dab 100644
--- a/domain.go
+++ b/domain.go
@@ -3183,6 +3183,8 @@ type DomainPerfEvents struct {
 	StalledCyclesBackend     bool
 	RefCpuCyclesSet          bool
 	RefCpuCycles             bool
+	CacheL1DSet              bool
+	CacheL1D                 bool
 }
 
 /* Remember to also update DomainStatsPerf in connect.go when adding to the stuct above */
@@ -3241,6 +3243,10 @@ func getDomainPerfEventsFieldInfo(params *DomainPerfEvents) map[string]typedPara
 			set: &params.RefCpuCyclesSet,
 			b:   &params.RefCpuCycles,
 		},
+		C.VIR_PERF_PARAM_CACHE_L1D: typedParamsFieldInfo{
+			set: &params.CacheL1DSet,
+			b:   &params.CacheL1D,
+		},
 	}
 }
 
diff --git a/domain_compat.h b/domain_compat.h
index 14072d0..4da562b 100644
--- a/domain_compat.h
+++ b/domain_compat.h
@@ -45,6 +45,10 @@
 #define VIR_PERF_PARAM_REF_CPU_CYCLES "ref_cpu_cycles"
 #endif
 
+#ifndef VIR_PERF_PARAM_CACHE_L1D
+#define VIR_PERF_PARAM_CACHE_L1D "cache_l1d"
+#endif
+
 #ifndef VIR_DOMAIN_EVENT_ID_METADATA_CHANGE
 #define VIR_DOMAIN_EVENT_ID_METADATA_CHANGE 23
 #endif
-- 
2.9.3

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux