perf evsel: Expose the perf_missing_features struct
authorArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 2 Feb 2018 14:27:25 +0000 (11:27 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 15 Feb 2018 12:54:53 +0000 (09:54 -0300)
As tools may need to adjust to missing features, as 'perf top' will, in
the next csets, to cope with a missing 'write_backward' feature.

Cc: Andi Kleen <ak@linux.intel.com>
Cc: Jin Yao <yao.jin@linux.intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Kan Liang <kan.liang@intel.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: https://lkml.kernel.org/n/tip-jelngl9q1ooaizvkcput9tic@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/evsel.c
tools/perf/util/evsel.h

index ff359c9..ef35168 100644 (file)
 
 #include "sane_ctype.h"
 
-static struct {
-       bool sample_id_all;
-       bool exclude_guest;
-       bool mmap2;
-       bool cloexec;
-       bool clockid;
-       bool clockid_wrong;
-       bool lbr_flags;
-       bool write_backward;
-       bool group_read;
-} perf_missing_features;
+struct perf_missing_features perf_missing_features;
 
 static clockid_t clockid;
 
index 846e416..a7487c6 100644 (file)
@@ -149,6 +149,20 @@ union u64_swap {
        u32 val32[2];
 };
 
+struct perf_missing_features {
+       bool sample_id_all;
+       bool exclude_guest;
+       bool mmap2;
+       bool cloexec;
+       bool clockid;
+       bool clockid_wrong;
+       bool lbr_flags;
+       bool write_backward;
+       bool group_read;
+};
+
+extern struct perf_missing_features perf_missing_features;
+
 struct cpu_map;
 struct target;
 struct thread_map;