Skip to contentSkip to conversation

perf evsel: Expose the perf_missing_features struct

tip:perf/urgent tip-bot for Arnaldo Carvalho de Melo 1 participant 1 message Feb 13, 2018 perf events

lore
Share & tools
lore
#0 lore raw
Commit-ID:  5bcf848912d3c8669dcd5922f576162727be31b2
Gitweb:     https://git.kernel.org/tip/5bcf848912d3c8669dcd5922f576162727be31b2
Author:     Arnaldo Carvalho de Melo <[email protected]>
AuthorDate: Fri, 2 Feb 2018 11:27:25 -0300
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Tue, 6 Feb 2018 10:11:51 -0300

perf evsel: Expose the perf_missing_features struct

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.

---
 tools/perf/util/evsel.c | 12 +-----------
 tools/perf/util/evsel.h | 14 ++++++++++++++
 2 files changed, 15 insertions(+), 11 deletions(-)
tools/perf/util/evsel.c +1 -11
index ff359c9..ef35168 100644
@@ -41,17 +41,7 @@
 
 #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;
 
tools/perf/util/evsel.h +14 -0
index 846e416..a7487c6 100644
@@ -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;