Lines Matching refs:tr
40 static void stop_irqsoff_tracer(struct trace_array *tr, int graph);
41 static int start_irqsoff_tracer(struct trace_array *tr, int graph);
65 static int irqsoff_display_graph(struct trace_array *tr, int set);
66 # define is_graph(tr) ((tr)->trace_flags & TRACE_ITER_DISPLAY_GRAPH) argument
68 static inline int irqsoff_display_graph(struct trace_array *tr, int set) in irqsoff_display_graph() argument
72 # define is_graph(tr) false argument
99 static int func_prolog_dec(struct trace_array *tr, in func_prolog_dec() argument
125 *data = per_cpu_ptr(tr->array_buffer.data, cpu); in func_prolog_dec()
143 struct trace_array *tr = irqsoff_trace; in irqsoff_tracer_call() local
147 if (!func_prolog_dec(tr, &data, &flags)) in irqsoff_tracer_call()
150 trace_function(tr, ip, parent_ip, flags, preempt_count()); in irqsoff_tracer_call()
157 static int irqsoff_display_graph(struct trace_array *tr, int set) in irqsoff_display_graph() argument
161 if (!(is_graph(tr) ^ set)) in irqsoff_display_graph()
169 tr->max_latency = 0; in irqsoff_display_graph()
177 struct trace_array *tr = irqsoff_trace; in irqsoff_graph_entry() local
195 if (!func_prolog_dec(tr, &data, &flags)) in irqsoff_graph_entry()
199 ret = __trace_graph_entry(tr, trace, flags, pc); in irqsoff_graph_entry()
207 struct trace_array *tr = irqsoff_trace; in irqsoff_graph_return() local
214 if (!func_prolog_dec(tr, &data, &flags)) in irqsoff_graph_return()
218 __trace_graph_return(tr, trace, flags, pc); in irqsoff_graph_return()
229 if (is_graph(iter->tr)) in irqsoff_trace_open()
251 if (is_graph(iter->tr)) in irqsoff_print_line()
259 struct trace_array *tr = irqsoff_trace; in irqsoff_print_header() local
261 if (is_graph(tr)) in irqsoff_print_header()
268 __trace_function(struct trace_array *tr, in __trace_function() argument
272 if (is_graph(tr)) in __trace_function()
273 trace_graph_function(tr, ip, parent_ip, flags, pc); in __trace_function()
275 trace_function(tr, ip, parent_ip, flags, pc); in __trace_function()
305 static bool report_latency(struct trace_array *tr, u64 delta) in report_latency() argument
311 if (delta <= tr->max_latency) in report_latency()
318 check_critical_timing(struct trace_array *tr, in check_critical_timing() argument
335 if (!report_latency(tr, delta)) in check_critical_timing()
341 if (!report_latency(tr, delta)) in check_critical_timing()
344 __trace_function(tr, CALLER_ADDR0, parent_ip, flags, pc); in check_critical_timing()
346 __trace_stack(tr, flags, 5, pc); in check_critical_timing()
354 tr->max_latency = delta; in check_critical_timing()
355 update_max_tr_single(tr, current, cpu); in check_critical_timing()
366 __trace_function(tr, CALLER_ADDR0, parent_ip, flags, pc); in check_critical_timing()
373 struct trace_array *tr = irqsoff_trace; in start_critical_timing() local
385 data = per_cpu_ptr(tr->array_buffer.data, cpu); in start_critical_timing()
398 __trace_function(tr, ip, parent_ip, flags, pc); in start_critical_timing()
409 struct trace_array *tr = irqsoff_trace; in stop_critical_timing() local
423 data = per_cpu_ptr(tr->array_buffer.data, cpu); in stop_critical_timing()
432 __trace_function(tr, ip, parent_ip, flags, pc); in stop_critical_timing()
433 check_critical_timing(tr, data, parent_ip ? : ip, cpu); in stop_critical_timing()
462 static int register_irqsoff_function(struct trace_array *tr, int graph, int set) in register_irqsoff_function() argument
467 if (function_enabled || (!set && !(tr->trace_flags & TRACE_ITER_FUNCTION))) in register_irqsoff_function()
473 ret = register_ftrace_function(tr->ops); in register_irqsoff_function()
481 static void unregister_irqsoff_function(struct trace_array *tr, int graph) in unregister_irqsoff_function() argument
489 unregister_ftrace_function(tr->ops); in unregister_irqsoff_function()
494 static int irqsoff_function_set(struct trace_array *tr, u32 mask, int set) in irqsoff_function_set() argument
500 register_irqsoff_function(tr, is_graph(tr), 1); in irqsoff_function_set()
502 unregister_irqsoff_function(tr, is_graph(tr)); in irqsoff_function_set()
506 static int register_irqsoff_function(struct trace_array *tr, int graph, int set) in register_irqsoff_function() argument
510 static void unregister_irqsoff_function(struct trace_array *tr, int graph) { } in unregister_irqsoff_function() argument
511 static inline int irqsoff_function_set(struct trace_array *tr, u32 mask, int set) in irqsoff_function_set() argument
517 static int irqsoff_flag_changed(struct trace_array *tr, u32 mask, int set) in irqsoff_flag_changed() argument
519 struct tracer *tracer = tr->current_trace; in irqsoff_flag_changed()
521 if (irqsoff_function_set(tr, mask, set)) in irqsoff_flag_changed()
526 return irqsoff_display_graph(tr, set); in irqsoff_flag_changed()
532 static int start_irqsoff_tracer(struct trace_array *tr, int graph) in start_irqsoff_tracer() argument
536 ret = register_irqsoff_function(tr, graph, 0); in start_irqsoff_tracer()
546 static void stop_irqsoff_tracer(struct trace_array *tr, int graph) in stop_irqsoff_tracer() argument
550 unregister_irqsoff_function(tr, graph); in stop_irqsoff_tracer()
555 static int __irqsoff_tracer_init(struct trace_array *tr) in __irqsoff_tracer_init() argument
560 save_flags = tr->trace_flags; in __irqsoff_tracer_init()
563 set_tracer_flag(tr, TRACE_ITER_OVERWRITE, 1); in __irqsoff_tracer_init()
564 set_tracer_flag(tr, TRACE_ITER_LATENCY_FMT, 1); in __irqsoff_tracer_init()
566 tr->max_latency = 0; in __irqsoff_tracer_init()
567 irqsoff_trace = tr; in __irqsoff_tracer_init()
571 ftrace_init_array_ops(tr, irqsoff_tracer_call); in __irqsoff_tracer_init()
574 if (start_irqsoff_tracer(tr, (tr->flags & TRACE_ARRAY_FL_GLOBAL && in __irqsoff_tracer_init()
575 is_graph(tr)))) in __irqsoff_tracer_init()
582 static void __irqsoff_tracer_reset(struct trace_array *tr) in __irqsoff_tracer_reset() argument
587 stop_irqsoff_tracer(tr, is_graph(tr)); in __irqsoff_tracer_reset()
589 set_tracer_flag(tr, TRACE_ITER_LATENCY_FMT, lat_flag); in __irqsoff_tracer_reset()
590 set_tracer_flag(tr, TRACE_ITER_OVERWRITE, overwrite_flag); in __irqsoff_tracer_reset()
591 ftrace_reset_array_ops(tr); in __irqsoff_tracer_reset()
596 static void irqsoff_tracer_start(struct trace_array *tr) in irqsoff_tracer_start() argument
601 static void irqsoff_tracer_stop(struct trace_array *tr) in irqsoff_tracer_stop() argument
628 static int irqsoff_tracer_init(struct trace_array *tr) in irqsoff_tracer_init() argument
632 return __irqsoff_tracer_init(tr); in irqsoff_tracer_init()
635 static void irqsoff_tracer_reset(struct trace_array *tr) in irqsoff_tracer_reset() argument
637 __irqsoff_tracer_reset(tr); in irqsoff_tracer_reset()
678 static int preemptoff_tracer_init(struct trace_array *tr) in preemptoff_tracer_init() argument
682 return __irqsoff_tracer_init(tr); in preemptoff_tracer_init()
685 static void preemptoff_tracer_reset(struct trace_array *tr) in preemptoff_tracer_reset() argument
687 __irqsoff_tracer_reset(tr); in preemptoff_tracer_reset()
713 static int preemptirqsoff_tracer_init(struct trace_array *tr) in preemptirqsoff_tracer_init() argument
717 return __irqsoff_tracer_init(tr); in preemptirqsoff_tracer_init()
720 static void preemptirqsoff_tracer_reset(struct trace_array *tr) in preemptirqsoff_tracer_reset() argument
722 __irqsoff_tracer_reset(tr); in preemptirqsoff_tracer_reset()