diff options
author | Steven Rostedt (Red Hat) <rostedt@goodmis.org> | 2015-09-30 09:42:05 -0400 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2015-09-30 15:22:55 -0400 |
commit | 983f938ae69585213bbb779d841b90e75f93f545 (patch) | |
tree | b7d592e16b741e612031e91f032ed97b440fc107 /kernel/trace/trace_functions_graph.c | |
parent | 55577204154c7a95c6bce4cb185366d638b238b5 (diff) |
tracing: Move trace_flags from global to a trace_array field
In preparation to make trace options per instance, the global trace_flags
needs to be moved from being a global variable to a field within the trace
instance trace_array structure.
There's still more work to do, as there's some functions that use
trace_flags without passing in a way to get to the current_trace array. For
those, the global_trace is used directly (from trace.c). This includes
setting and clearing the trace_flags. This means that when a new instance is
created, it just gets the trace_flags of the global_trace and will not be
able to modify them. Depending on the functions that have access to the
trace_array, the flags of an instance may not affect parts of its trace,
where the global_trace is used. These will be fixed in future changes.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace/trace_functions_graph.c')
-rw-r--r-- | kernel/trace/trace_functions_graph.c | 50 |
1 files changed, 29 insertions, 21 deletions
diff --git a/kernel/trace/trace_functions_graph.c b/kernel/trace/trace_functions_graph.c index 86e45c2658e4..92382af7a213 100644 --- a/kernel/trace/trace_functions_graph.c +++ b/kernel/trace/trace_functions_graph.c | |||
@@ -112,8 +112,8 @@ enum { | |||
112 | }; | 112 | }; |
113 | 113 | ||
114 | static void | 114 | static void |
115 | print_graph_duration(unsigned long long duration, struct trace_seq *s, | 115 | print_graph_duration(struct trace_array *tr, unsigned long long duration, |
116 | u32 flags); | 116 | struct trace_seq *s, u32 flags); |
117 | 117 | ||
118 | /* Add a function return address to the trace stack on thread info.*/ | 118 | /* Add a function return address to the trace stack on thread info.*/ |
119 | int | 119 | int |
@@ -658,6 +658,7 @@ static void | |||
658 | print_graph_irq(struct trace_iterator *iter, unsigned long addr, | 658 | print_graph_irq(struct trace_iterator *iter, unsigned long addr, |
659 | enum trace_type type, int cpu, pid_t pid, u32 flags) | 659 | enum trace_type type, int cpu, pid_t pid, u32 flags) |
660 | { | 660 | { |
661 | struct trace_array *tr = iter->tr; | ||
661 | struct trace_seq *s = &iter->seq; | 662 | struct trace_seq *s = &iter->seq; |
662 | struct trace_entry *ent = iter->ent; | 663 | struct trace_entry *ent = iter->ent; |
663 | 664 | ||
@@ - #endif /* CONFIG_PPC64 */ #ifdef __KERNEL__ extern struct vdso_data *vdso_data; #endif #endif /* __ASSEMBLY__ */ #endif /* __KERNEL__ */ #endif /* _SYSTEMCFG_H */ |