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()
118 struct trace_array *tr = wakeup_trace; in wakeup_graph_entry() local
135 if (!func_prolog_preempt_disable(tr, &data, &trace_ctx)) in wakeup_graph_entry()
138 ret = __trace_graph_entry(tr, trace, trace_ctx); in wakeup_graph_entry()
148 struct trace_array *tr = wakeup_trace; in wakeup_graph_return() local
154 if (!func_prolog_preempt_disable(tr, &data, &trace_ctx)) in wakeup_graph_return()
157 __trace_graph_return(tr, trace, trace_ctx); in wakeup_graph_return()
171 if (is_graph(iter->tr)) in wakeup_trace_open()
196 if (is_graph(iter->tr)) in wakeup_print_line()
218 struct trace_array *tr = wakeup_trace; in wakeup_tracer_call() local
223 if (!func_prolog_preempt_disable(tr, &data, &trace_ctx)) in wakeup_tracer_call()
227 trace_function(tr, ip, parent_ip, trace_ctx); in wakeup_tracer_call()
234 static int register_wakeup_function(struct trace_array *tr, int graph, int set) in register_wakeup_function() argument
239 if (function_enabled || (!set && !(tr->trace_flags & TRACE_ITER_FUNCTION))) in register_wakeup_function()
245 ret = register_ftrace_function(tr->ops); in register_wakeup_function()
253 static void unregister_wakeup_function(struct trace_array *tr, int graph) in unregister_wakeup_function() argument
261 unregister_ftrace_function(tr->ops); in unregister_wakeup_function()
266 static int wakeup_function_set(struct trace_array *tr, u32 mask, int set) in wakeup_function_set() argument
272 register_wakeup_function(tr, is_graph(tr), 1); in wakeup_function_set()
274 unregister_wakeup_function(tr, is_graph(tr)); in wakeup_function_set()
278 static int register_wakeup_function(struct trace_array *tr, int graph, int set) in register_wakeup_function() argument
282 static void unregister_wakeup_function(struct trace_array *tr, int graph) { } in unregister_wakeup_function() argument
283 static int wakeup_function_set(struct trace_array *tr, u32 mask, int set) in wakeup_function_set() argument
305 __trace_function(struct trace_array *tr, in __trace_function() argument
309 if (is_graph(tr)) in __trace_function()
310 trace_graph_function(tr, ip, parent_ip, trace_ctx); in __trace_function()
312 trace_function(tr, ip, parent_ip, trace_ctx); in __trace_function()
315 static int wakeup_flag_changed(struct trace_array *tr, u32 mask, int set) in wakeup_flag_changed() argument
317 struct tracer *tracer = tr->current_trace; in wakeup_flag_changed()
319 if (wakeup_function_set(tr, mask, set)) in wakeup_flag_changed()
324 return wakeup_display_graph(tr, set); in wakeup_flag_changed()
330 static int start_func_tracer(struct trace_array *tr, int graph) in start_func_tracer() argument
334 ret = register_wakeup_function(tr, graph, 0); in start_func_tracer()
344 static void stop_func_tracer(struct trace_array *tr, int graph) in stop_func_tracer() argument
348 unregister_wakeup_function(tr, graph); in stop_func_tracer()
354 static bool report_latency(struct trace_array *tr, u64 delta) in report_latency() argument
360 if (delta <= tr->max_latency) in report_latency()
376 tracing_sched_switch_trace(struct trace_array *tr, in tracing_sched_switch_trace() argument
382 struct trace_buffer *buffer = tr->array_buffer.buffer; in tracing_sched_switch_trace()
400 trace_buffer_unlock_commit(tr, buffer, event, trace_ctx); in tracing_sched_switch_trace()
404 tracing_sched_wakeup_trace(struct trace_array *tr, in tracing_sched_wakeup_trace() argument
412 struct trace_buffer *buffer = tr->array_buffer.buffer; in tracing_sched_wakeup_trace()
428 trace_buffer_unlock_commit(tr, buffer, event, trace_ctx); in tracing_sched_wakeup_trace()
502 static void __wakeup_reset(struct trace_array *tr) in __wakeup_reset() argument
514 static void wakeup_reset(struct trace_array *tr) in wakeup_reset() argument
518 tracing_reset_online_cpus(&tr->array_buffer); in wakeup_reset()
522 __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