Skip to content

Commit

Permalink
tracepoints: move trace_print_flags definitions to tracepoint-defs.h
Browse files Browse the repository at this point in the history
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 <[email protected]>
Acked-by: David Rientjes <[email protected]>
Cc: Steven Rostedt <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Arnaldo Carvalho de Melo <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Rasmus Villemoes <[email protected]>
Cc: Joonsoo Kim <[email protected]>
Cc: Minchan Kim <[email protected]>
Cc: Sasha Levin <[email protected]>
Cc: "Kirill A. Shutemov" <[email protected]>
Cc: Mel Gorman <[email protected]>
Cc: Michal Hocko <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
tehcaster authored and torvalds committed Mar 15, 2016
1 parent ebded02 commit 20f6e03
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
10 changes: 0 additions & 10 deletions include/linux/trace_events.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
14 changes: 12 additions & 2 deletions include/linux/tracepoint-defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 20f6e03

Please sign in to comment.