From 41f1138e5c1cf11c5b469c3f891960b4ad05e886 Mon Sep 17 00:00:00 2001 From: Leo Yan Date: Wed, 15 Mar 2023 22:51:06 +0800 Subject: perf kvm: Add dimensions for KVM event statistics To support KVM event statistics, this patch firstly registers histograms columns and sorting fields; every column or field has its own format structure, the format structure is dereferenced to access the dimension, finally the dimension provides the comparison callback for sorting result. Signed-off-by: Leo Yan Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: John Garry Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/20230315145112.186603-2-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/kvm-stat.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tools/perf/util') diff --git a/tools/perf/util/kvm-stat.h b/tools/perf/util/kvm-stat.h index 0cf704333c4c..fc30a72dfac1 100644 --- a/tools/perf/util/kvm-stat.h +++ b/tools/perf/util/kvm-stat.h @@ -46,6 +46,8 @@ struct kvm_event { #define DEFAULT_VCPU_NUM 8 int max_vcpu; struct kvm_event_stats *vcpu; + + struct hist_entry he; }; typedef int64_t (*key_cmp_fun)(struct kvm_event*, struct kvm_event*, int); -- cgit v1.2.3