tracepoints: move trace_print_flags definitions to tracepoint-defs.h
authorVlastimil Babka <vbabka@suse.cz>
Tue, 15 Mar 2016 21:55:42 +0000 (14:55 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 15 Mar 2016 23:55:16 +0000 (16:55 -0700)
The following patch will need to declare array of struct
trace_print_flags in a header.  To prevent this header from pulling in
all of RCU through trace_events.h, move the struct
trace_print_flags{_64} definitions to the new lightweight
tracepoint-defs.h header.

Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
Acked-by: David Rientjes <rientjes@google.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Sasha Levin <sasha.levin@oracle.com>
Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Michal Hocko <mhocko@suse.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/trace_events.h
include/linux/tracepoint-defs.h

index 925730bc9fc1bb4914410779bdf5ea469ed41c18..705df7db44821ed44dcb9e608667e706883c051f 100644 (file)
@@ -15,16 +15,6 @@ struct tracer;
 struct dentry;
 struct bpf_prog;
 
-struct trace_print_flags {
-       unsigned long           mask;
-       const char              *name;
-};
-
-struct trace_print_flags_u64 {
-       unsigned long long      mask;
-       const char              *name;
-};
-
 const char *trace_print_flags_seq(struct trace_seq *p, const char *delim,
                                  unsigned long flags,
                                  const struct trace_print_flags *flag_array);
index e1ee97c713bf23b433e85a881632215331269659..4ac89acb613687bd0899e7cbddadb79f4325349e 100644 (file)
@@ -3,13 +3,23 @@
 
 /*
  * File can be included directly by headers who only want to access
- * tracepoint->key to guard out of line trace calls. Otherwise
- * linux/tracepoint.h should be used.
+ * tracepoint->key to guard out of line trace calls, or the definition of
+ * trace_print_flags{_u64}. Otherwise linux/tracepoint.h should be used.
  */
 
 #include <linux/atomic.h>
 #include <linux/static_key.h>
 
+struct trace_print_flags {
+       unsigned long           mask;
+       const char              *name;
+};
+
+struct trace_print_flags_u64 {
+       unsigned long long      mask;
+       const char              *name;
+};
+
 struct tracepoint_func {
        void *func;
        void *data;