Lines Matching refs:tr
36 static void wakeup_reset(struct trace_array *tr);
37 static void __wakeup_reset(struct trace_array *tr);
38 static int start_func_tracer(struct trace_array *tr, int graph);
39 static void stop_func_tracer(struct trace_array *tr, int graph);
44 # define is_graph(tr) ((tr)->trace_flags & TRACE_ITER_DISPLAY_GRAPH) argument
46 # define is_graph(tr) false argument
68 func_prolog_preempt_disable(struct trace_array *tr, in func_prolog_preempt_disable() argument
85 *data = per_cpu_ptr(tr->array_buffer.data, cpu); in func_prolog_preempt_disable()
102 static int wakeup_display_graph(struct trace_array *tr, int set) in wakeup_display_graph() argument
104 if (!(is_graph(tr) ^ set)) in wakeup_display_graph()
107 stop_func_tracer(tr, !set); in wakeup_display_graph()
110 tr->max_latency = 0; in wakeup_display_graph()
112 return start_func_tracer(tr, set); in wakeup_display_graph()
117 struct trace_array *tr = wakeup_trace; in wakeup_graph_entry() local
134 if (!func_prolog_preempt_disable(tr, &data, &pc)) in wakeup_graph_entry()
138 ret = __trace_graph_entry(tr, trace, flags, pc); in wakeup_graph_entry()
147 struct trace_array *tr = wakeup_trace; in wakeup_graph_return() local
154 if (!func_prolog_preempt_disable(tr, &data, &pc)) in wakeup_graph_return()
158 __trace_graph_return(tr, trace, flags, pc); in wakeup_graph_return()
172 if (is_graph(iter->tr)) in wakeup_trace_open()
195 if (is_graph(iter->tr)) in wakeup_print_line()
217 struct trace_array *tr = wakeup_trace; in wakeup_tracer_call() local
222 if (!func_prolog_preempt_disable(tr, &data, &pc)) in wakeup_tracer_call()
226 trace_function(tr, ip, parent_ip, flags, pc); in wakeup_tracer_call()
233 static int register_wakeup_function(struct trace_array *tr, int graph, int set) in register_wakeup_function() argument
238 if (function_enabled || (!set && !(tr->trace_flags & TRACE_ITER_FUNCTION))) in register_wakeup_function()
244 ret = register_ftrace_function(tr->ops); in register_wakeup_function()
252 static void unregister_wakeup_function(struct trace_array *tr, int graph) in unregister_wakeup_function() argument
260 unregister_ftrace_function(tr->ops); in unregister_wakeup_function()
265 static int wakeup_function_set(struct trace_array *tr, u32 mask, int set) in wakeup_function_set() argument
271 register_wakeup_function(tr, is_graph(tr), 1); in wakeup_function_set()
273 unregister_wakeup_function(tr, is_graph(tr)); in wakeup_function_set()
277 static int register_wakeup_function(struct trace_array *tr, int graph, int set) in register_wakeup_function() argument
281 static void unregister_wakeup_function(struct trace_array *tr, int graph) { } in unregister_wakeup_function() argument
282 static int wakeup_function_set(struct trace_array *tr, u32 mask, int set) in wakeup_function_set() argument
304 __trace_function(struct trace_array *tr, in __trace_function() argument
308 if (is_graph(tr)) in __trace_function()
309 trace_graph_function(tr, ip, parent_ip, flags, pc); in __trace_function()
311 trace_function(tr, ip, parent_ip, flags, pc); in __trace_function()
314 static int wakeup_flag_changed(struct trace_array *tr, u32 mask, int set) in wakeup_flag_changed() argument
316 struct tracer *tracer = tr->current_trace; in wakeup_flag_changed()
318 if (wakeup_function_set(tr, mask, set)) in wakeup_flag_changed()
323 return wakeup_display_graph(tr, set); in wakeup_flag_changed()
329 static int start_func_tracer(struct trace_array *tr, int graph) in start_func_tracer() argument
333 ret = register_wakeup_function(tr, graph, 0); in start_func_tracer()
343 static void stop_func_tracer(struct trace_array *tr, int graph) in stop_func_tracer() argument
347 unregister_wakeup_function(tr, graph); in stop_func_tracer()
353 static bool report_latency(struct trace_array *tr, u64 delta) in report_latency() argument
359 if (delta <= tr->max_latency) in report_latency()
375 tracing_sched_switch_trace(struct trace_array *tr, in tracing_sched_switch_trace() argument
381 struct trace_buffer *buffer = tr->array_buffer.buffer; in tracing_sched_switch_trace()
399 trace_buffer_unlock_commit(tr, buffer, event, flags, pc); in tracing_sched_switch_trace()
403 tracing_sched_wakeup_trace(struct trace_array *tr, in tracing_sched_wakeup_trace() argument
411 struct trace_buffer *buffer = tr->array_buffer.buffer; in tracing_sched_wakeup_trace()
427 trace_buffer_unlock_commit(tr, buffer, event, flags, pc); in tracing_sched_wakeup_trace()
500 static void __wakeup_reset(struct trace_array *tr) in __wakeup_reset() argument
512 static void wakeup_reset(struct trace_array *tr) in wakeup_reset() argument
516 tracing_reset_online_cpus(&tr->array_buffer); in wakeup_reset()
520 __wakeup_reset(tr); in wakeup_reset()
604 static void start_wakeup_tracer(struct trace_array *tr) in start_wakeup_tracer() argument
636 wakeup_reset(tr); in start_wakeup_tracer()
647 if (start_func_tracer(tr, is_graph(tr))) in start_wakeup_tracer()
659 static void stop_wakeup_tracer(struct trace_array *tr) in stop_wakeup_tracer() argument
662 stop_func_tracer(tr, is_graph(tr)); in stop_wakeup_tracer()
671 static int __wakeup_tracer_init(struct trace_array *tr) in __wakeup_tracer_init() argument
673 save_flags = tr->trace_flags; in __wakeup_tracer_init()
676 set_tracer_flag(tr, TRACE_ITER_OVERWRITE, 1); in __wakeup_tracer_init()
677 set_tracer_flag(tr, TRACE_ITER_LATENCY_FMT, 1); in __wakeup_tracer_init()
679 tr->max_latency = 0; in __wakeup_tracer_init()
680 wakeup_trace = tr; in __wakeup_tracer_init()
681 ftrace_init_array_ops(tr, wakeup_tracer_call); in __wakeup_tracer_init()
682 start_wakeup_tracer(tr); in __wakeup_tracer_init()
688 static int wakeup_tracer_init(struct trace_array *tr) in wakeup_tracer_init() argument
695 return __wakeup_tracer_init(tr); in wakeup_tracer_init()
698 static int wakeup_rt_tracer_init(struct trace_array *tr) in wakeup_rt_tracer_init() argument
705 return __wakeup_tracer_init(tr); in wakeup_rt_tracer_init()
708 static int wakeup_dl_tracer_init(struct trace_array *tr) in wakeup_dl_tracer_init() argument
715 return __wakeup_tracer_init(tr); in wakeup_dl_tracer_init()
718 static void wakeup_tracer_reset(struct trace_array *tr) in wakeup_tracer_reset() argument
723 stop_wakeup_tracer(tr); in wakeup_tracer_reset()
725 wakeup_reset(tr); in wakeup_tracer_reset()
727 set_tracer_flag(tr, TRACE_ITER_LATENCY_FMT, lat_flag); in wakeup_tracer_reset()
728 set_tracer_flag(tr, TRACE_ITER_OVERWRITE, overwrite_flag); in wakeup_tracer_reset()
729 ftrace_reset_array_ops(tr); in wakeup_tracer_reset()
733 static void wakeup_tracer_start(struct trace_array *tr) in wakeup_tracer_start() argument
735 wakeup_reset(tr); in wakeup_tracer_start()
739 static void wakeup_tracer_stop(struct trace_array *tr) in wakeup_tracer_stop() argument