connect.go | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ domain.go | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ domain_compat.h | 36 ++++++++++++++++++++++++++++++++++++ 3 files changed, 144 insertions(+)
Signed-off-by: Nitesh Konkar <nitkon12@linux.vnet.ibm.com>
---
connect.go | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
domain.go | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
domain_compat.h | 36 ++++++++++++++++++++++++++++++++++++
3 files changed, 144 insertions(+)
diff --git a/connect.go b/connect.go
index 3c53485..e24cf66 100644
--- a/connect.go
+++ b/connect.go
@@ -2264,6 +2264,24 @@ type DomainStatsPerf struct {
StalledCyclesBackend uint64
RefCpuCyclesSet bool
RefCpuCycles uint64
+ CpuClockSet bool
+ CpuClock uint64
+ TaskClockSet bool
+ TaskClock uint64
+ PageFaultsSet bool
+ PageFaults uint64
+ ContextSwitchesSet bool
+ ContextSwitches uint64
+ CpuMigrationsSet bool
+ CpuMigrations uint64
+ PageFaultsMinSet bool
+ PageFaultsMin uint64
+ PageFaultsMajSet bool
+ PageFaultsMaj uint64
+ AlignmentFaultsSet bool
+ AlignmentFaults uint64
+ EmulationFaultsSet bool
+ EmulationFaults uint64
}
func getDomainStatsPerfFieldInfo(params *DomainStatsPerf) map[string]typedParamsFieldInfo {
@@ -2320,6 +2338,42 @@ func getDomainStatsPerfFieldInfo(params *DomainStatsPerf) map[string]typedParams
set: ¶ms.RefCpuCyclesSet,
ul: ¶ms.RefCpuCycles,
},
+ "perf.cpu_clock": typedParamsFieldInfo{
+ set: ¶ms.CpuClockSet,
+ ul: ¶ms.CpuClock,
+ },
+ "perf.task_clock": typedParamsFieldInfo{
+ set: ¶ms.TaskClockSet,
+ ul: ¶ms.TaskClock,
+ },
+ "perf.page_faults": typedParamsFieldInfo{
+ set: ¶ms.PageFaultsSet,
+ ul: ¶ms.PageFaults,
+ },
+ "perf.context_switches": typedParamsFieldInfo{
+ set: ¶ms.ContextSwitchesSet,
+ ul: ¶ms.ContextSwitches,
+ },
+ "perf.cpu_migrations": typedParamsFieldInfo{
+ set: ¶ms.CpuMigrationsSet,
+ ul: ¶ms.CpuMigrations,
+ },
+ "perf.page_faults_min": typedParamsFieldInfo{
+ set: ¶ms.PageFaultsMinSet,
+ ul: ¶ms.PageFaultsMin,
+ },
+ "perf.page_faults_maj": typedParamsFieldInfo{
+ set: ¶ms.PageFaultsMajSet,
+ ul: ¶ms.PageFaultsMaj,
+ },
+ "perf.alignment_faults": typedParamsFieldInfo{
+ set: ¶ms.AlignmentFaultsSet,
+ ul: ¶ms.AlignmentFaults,
+ },
+ "perf.emulation_faults": typedParamsFieldInfo{
+ set: ¶ms.EmulationFaultsSet,
+ ul: ¶ms.EmulationFaults,
+ },
}
}
diff --git a/domain.go b/domain.go
index 2bd9852..1cb0b95 100644
--- a/domain.go
+++ b/domain.go
@@ -3195,6 +3195,24 @@ type DomainPerfEvents struct {
StalledCyclesBackend bool
RefCpuCyclesSet bool
RefCpuCycles bool
+ CpuClockSet bool
+ CpuClock bool
+ TaskClockSet bool
+ TaskClock bool
+ PageFaultsSet bool
+ PageFaults bool
+ ContextSwitchesSet bool
+ ContextSwitches bool
+ CpuMigrationsSet bool
+ CpuMigrations bool
+ PageFaultsMinSet bool
+ PageFaultsMin bool
+ PageFaultsMajSet bool
+ PageFaultsMaj bool
+ AlignmentFaultsSet bool
+ AlignmentFaults bool
+ EmulationFaultsSet bool
+ EmulationFaults bool
}
/* Remember to also update DomainStatsPerf in connect.go when adding to the stuct above */
@@ -3253,6 +3271,42 @@ func getDomainPerfEventsFieldInfo(params *DomainPerfEvents) map[string]typedPara
set: ¶ms.RefCpuCyclesSet,
b: ¶ms.RefCpuCycles,
},
+ C.VIR_PERF_PARAM_CPU_CLOCK: typedParamsFieldInfo{
+ set: ¶ms.CpuClockSet,
+ b: ¶ms.CpuClock,
+ },
+ C.VIR_PERF_PARAM_TASK_CLOCK: typedParamsFieldInfo{
+ set: ¶ms.TaskClockSet,
+ b: ¶ms.TaskClock,
+ },
+ C.VIR_PERF_PARAM_PAGE_FAULTS: typedParamsFieldInfo{
+ set: ¶ms.PageFaultsSet,
+ b: ¶ms.PageFaults,
+ },
+ C.VIR_PERF_PARAM_CONTEXT_SWITCHES: typedParamsFieldInfo{
+ set: ¶ms.ContextSwitchesSet,
+ b: ¶ms.ContextSwitches,
+ },
+ C.VIR_PERF_PARAM_CPU_MIGRATIONS: typedParamsFieldInfo{
+ set: ¶ms.CpuMigrationsSet,
+ b: ¶ms.CpuMigrations,
+ },
+ C.VIR_PERF_PARAM_PAGE_FAULTS_MIN: typedParamsFieldInfo{
+ set: ¶ms.PageFaultsMinSet,
+ b: ¶ms.PageFaultsMin,
+ },
+ C.VIR_PERF_PARAM_PAGE_FAULTS_MAJ: typedParamsFieldInfo{
+ set: ¶ms.PageFaultsMajSet,
+ b: ¶ms.PageFaultsMaj,
+ },
+ C.VIR_PERF_PARAM_ALIGNMENT_FAULTS: typedParamsFieldInfo{
+ set: ¶ms.AlignmentFaultsSet,
+ b: ¶ms.AlignmentFaults,
+ },
+ C.VIR_PERF_PARAM_REF_EMULATION_FAULTS: typedParamsFieldInfo{
+ set: ¶ms.EmulationFaultsSet,
+ b: ¶ms.EmulationFaults,
+ },
}
}
diff --git a/domain_compat.h b/domain_compat.h
index 9540435..a114173 100644
--- a/domain_compat.h
+++ b/domain_compat.h
@@ -45,6 +45,42 @@
#define VIR_PERF_PARAM_REF_CPU_CYCLES "ref_cpu_cycles"
#endif
+#ifndef VIR_PERF_PARAM_CPU_CLOCK
+#define VIR_PERF_PARAM_CPU_CLOCK "cpu_clock"
+#endif
+
+#ifndef VIR_PERF_PARAM_TASK_CLOCK
+#define VIR_PERF_PARAM_TASK_CLOCK "task_clock"
+#endif
+
+#ifndef VIR_PERF_PARAM_PAGE_FAULTS
+#define VIR_PERF_PARAM_PAGE_FAULTS "page_faults"
+#endif
+
+#ifndef VIR_PERF_PARAM_CONTEXT_SWITCHES
+#define VIR_PERF_PARAM_CONTEXT_SWITCHES "context_switches"
+#endif
+
+#ifndef VIR_PERF_PARAM_CPU_MIGRATIONS
+#define VIR_PERF_PARAM_CPU_MIGRATIONS "cpu_migrations"
+#endif
+
+#ifndef VIR_PERF_PARAM_PAGE_FAULTS_MIN
+#define VIR_PERF_PARAM_PAGE_FAULTS_MIN "page_faults_min"
+#endif
+
+#ifndef VIR_PERF_PARAM_PAGE_FAULTS_MAJ
+#define VIR_PERF_PARAM_PAGE_FAULTS_MAJ "page_faults_maj"
+#endif
+
+#ifndef VIR_PERF_PARAM_ALIGNMENT_FAULTS
+#define VIR_PERF_PARAM__ALIGNMENT_FAULTS "alignment_faults"
+#endif
+
+#ifndef VIR_PERF_PARAM_EMULATION_FAULTS
+#define VIR_PERF_PARAM_EMULATION_FAULTS "emulation_faults"
+#endif
+
#ifndef VIR_DOMAIN_EVENT_ID_METADATA_CHANGE
#define VIR_DOMAIN_EVENT_ID_METADATA_CHANGE 23
#endif
--
1.9.3
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
On Fri, Feb 24, 2017 at 15:22:51 +0530, Nitesh Konkar wrote: > Signed-off-by: Nitesh Konkar <nitkon12@linux.vnet.ibm.com> > --- > connect.go | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ > domain.go | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ > domain_compat.h | 36 ++++++++++++++++++++++++++++++++++++ > 3 files changed, 144 insertions(+) The files are improperly indented. The go files use tabs for indentation while your code uses spaces. I've already pointed this out in v1. > > diff --git a/connect.go b/connect.go > index 3c53485..e24cf66 100644 > --- a/connect.go > +++ b/connect.go > @@ -2264,6 +2264,24 @@ type DomainStatsPerf struct { > StalledCyclesBackend uint64 > RefCpuCyclesSet bool > RefCpuCycles uint64 > + CpuClockSet bool > + CpuClock uint64 > + TaskClockSet bool > + TaskClock uint64 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
On Fri, Feb 24, 2017 at 11:02:33AM +0100, Peter Krempa wrote: > On Fri, Feb 24, 2017 at 15:22:51 +0530, Nitesh Konkar wrote: > > Signed-off-by: Nitesh Konkar <nitkon12@linux.vnet.ibm.com> > > --- > > connect.go | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ > > domain.go | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ > > domain_compat.h | 36 ++++++++++++++++++++++++++++++++++++ > > 3 files changed, 144 insertions(+) > > The files are improperly indented. The go files use tabs for indentation > while your code uses spaces. I've already pointed this out in v1. More specifically the go files use 'gofmt' for formatting. The best way to achieve this is to setup your editor to automatically run gofmt when saving files. If you are using emacs this is achieved by installing and using this lisp file https://github.com/dominikh/go-mode.el Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://entangle-photo.org -o- http://search.cpan.org/~danberr/ :| -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
On Fri, Feb 24, 2017 at 4:06 PM, Daniel P. Berrange <berrange@redhat.com> wrote: > On Fri, Feb 24, 2017 at 11:02:33AM +0100, Peter Krempa wrote: > > On Fri, Feb 24, 2017 at 15:22:51 +0530, Nitesh Konkar wrote: > > > Signed-off-by: Nitesh Konkar <nitkon12@linux.vnet.ibm.com> > > > --- > > > connect.go | 54 ++++++++++++++++++++++++++++++ > ++++++++++++++++++++++++ > > > domain.go | 54 ++++++++++++++++++++++++++++++ > ++++++++++++++++++++++++ > > > domain_compat.h | 36 ++++++++++++++++++++++++++++++++++++ > > > 3 files changed, 144 insertions(+) > > > > The files are improperly indented. The go files use tabs for indentation > > while your code uses spaces. I've already pointed this out in v1. > > More specifically the go files use 'gofmt' for formatting. The best way > to achieve this is to setup your editor to automatically run gofmt when > saving files. If you are using emacs this is achieved by installing and > using this lisp file > Thanks Daniel. However I am using vim and I think gofmt -w domain.go and gofmt -w connect.go would help me achieve the same. https://github.com/dominikh/go-mode.el > > Regards, > Daniel > -- > |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ > :| > |: http://libvirt.org -o- http://virt-manager.org > :| > |: http://entangle-photo.org -o- http://search.cpan.org/~danberr/ > :| > -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
On Fri, Feb 24, 2017 at 04:39:01PM +0530, Nitesh Konkar wrote: > On Fri, Feb 24, 2017 at 4:06 PM, Daniel P. Berrange <berrange@redhat.com> > wrote: > > > On Fri, Feb 24, 2017 at 11:02:33AM +0100, Peter Krempa wrote: > > > On Fri, Feb 24, 2017 at 15:22:51 +0530, Nitesh Konkar wrote: > > > > Signed-off-by: Nitesh Konkar <nitkon12@linux.vnet.ibm.com> > > > > --- > > > > connect.go | 54 ++++++++++++++++++++++++++++++ > > ++++++++++++++++++++++++ > > > > domain.go | 54 ++++++++++++++++++++++++++++++ > > ++++++++++++++++++++++++ > > > > domain_compat.h | 36 ++++++++++++++++++++++++++++++++++++ > > > > 3 files changed, 144 insertions(+) > > > > > > The files are improperly indented. The go files use tabs for indentation > > > while your code uses spaces. I've already pointed this out in v1. > > > > More specifically the go files use 'gofmt' for formatting. The best way > > to achieve this is to setup your editor to automatically run gofmt when > > saving files. If you are using emacs this is achieved by installing and > > using this lisp file > > > Thanks Daniel. However I am using vim and I think > gofmt -w domain.go and gofmt -w connect.go would help me > achieve the same. FYI there is a vim mode too https://github.com/fatih/vim-go Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://entangle-photo.org -o- http://search.cpan.org/~danberr/ :| -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
On Fri, Feb 24, 2017 at 3:32 PM, Peter Krempa <pkrempa@redhat.com> wrote: > On Fri, Feb 24, 2017 at 15:22:51 +0530, Nitesh Konkar wrote: > > Signed-off-by: Nitesh Konkar <nitkon12@linux.vnet.ibm.com> > > --- > > connect.go | 54 ++++++++++++++++++++++++++++++ > ++++++++++++++++++++++++ > > domain.go | 54 ++++++++++++++++++++++++++++++ > ++++++++++++++++++++++++ > > domain_compat.h | 36 ++++++++++++++++++++++++++++++++++++ > > 3 files changed, 144 insertions(+) > > The files are improperly indented. The go files use tabs for indentation > while your code uses spaces. I've already pointed this out in v1. > I had read the review on v1 but could not understand exactly whats wrong with the indentation as everything looked aligned on applying the patch. Now its clear, shall send v3. Thanks. > > > > > diff --git a/connect.go b/connect.go > > index 3c53485..e24cf66 100644 > > --- a/connect.go > > +++ b/connect.go > > @@ -2264,6 +2264,24 @@ type DomainStatsPerf struct { > > StalledCyclesBackend uint64 > > RefCpuCyclesSet bool > > RefCpuCycles uint64 > > + CpuClockSet bool > > + CpuClock uint64 > > + TaskClockSet bool > > + TaskClock uint64 > -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
© 2016 - 2024 Red Hat, Inc.