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
148 if (!func_prolog_dec(tr, &data, &flags)) in irqsoff_tracer_call()
153 trace_function(tr, ip, parent_ip, trace_ctx); in irqsoff_tracer_call()
160 static int irqsoff_display_graph(struct trace_array *tr, int set) in irqsoff_display_graph() argument
164 if (!(is_graph(tr) ^ set)) in irqsoff_display_graph()
172 tr->max_latency = 0; in irqsoff_display_graph()
180 struct trace_array *tr = irqsoff_trace; in irqsoff_graph_entry() local
198 if (!func_prolog_dec(tr, &data, &flags)) in irqsoff_graph_entry()
202 ret = __trace_graph_entry(tr, trace, trace_ctx); in irqsoff_graph_entry()
210 struct trace_array *tr = irqsoff_trace; in irqsoff_graph_return() local
217 if (!func_prolog_dec(tr, &data, &flags)) in irqsoff_graph_return()
221 __trace_graph_return(tr, trace, trace_ctx); in irqsoff_graph_return()
232 if (is_graph(iter->tr)) in irqsoff_trace_open()
254 if (is_graph(iter->tr)) in irqsoff_print_line()
262 struct trace_array *tr = irqsoff_trace; in irqsoff_print_header() local
264 if (is_graph(tr)) in irqsoff_print_header()
271 __trace_function(struct trace_array *tr, in __trace_function() argument
275 if (is_graph(tr)) in __trace_function()
276 trace_graph_function(tr, ip, parent_ip, trace_ctx); in __trace_function()
278 trace_function(tr, ip, parent_ip, trace_ctx); in __trace_function()
308 static bool report_latency(struct trace_array *tr, u64 delta) in report_latency() argument
314 if (delta <= tr->max_latency) in report_latency()
321 check_critical_timing(struct trace_array *tr, in check_critical_timing() argument
336 if (!report_latency(tr, delta)) in check_critical_timing()
342 if (!report_latency(tr, delta)) in check_critical_timing()
345 __trace_function(tr, CALLER_ADDR0, parent_ip, trace_ctx); in check_critical_timing()
347 __trace_stack(tr, trace_ctx, 5); in check_critical_timing()
355 tr->max_latency = delta; in check_critical_timing()
356 update_max_tr_single(tr, current, cpu); in check_critical_timing()
367 __trace_function(tr, CALLER_ADDR0, parent_ip, trace_ctx); in check_critical_timing()
374 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()
396 __trace_function(tr, ip, parent_ip, tracing_gen_ctx()); in start_critical_timing()
407 struct trace_array *tr = irqsoff_trace; in stop_critical_timing() local
421 data = per_cpu_ptr(tr->array_buffer.data, cpu); in stop_critical_timing()
430 __trace_function(tr, ip, parent_ip, trace_ctx); in stop_critical_timing()
431 check_critical_timing(tr, data, parent_ip ? : ip, cpu); in stop_critical_timing()
456 static int register_irqsoff_function(struct trace_array *tr, int graph, int set) in register_irqsoff_function() argument
461 if (function_enabled || (!set && !(tr->trace_flags & TRACE_ITER_FUNCTION))) in register_irqsoff_function()
467 ret = register_ftrace_function(tr->ops); in register_irqsoff_function()
475 static void unregister_irqsoff_function(struct trace_array *tr, int graph) in unregister_irqsoff_function() argument
483 unregister_ftrace_function(tr->ops); in unregister_irqsoff_function()
488 static int irqsoff_function_set(struct trace_array *tr, u32 mask, int set) in irqsoff_function_set() argument
494 register_irqsoff_function(tr, is_graph(tr), 1); in irqsoff_function_set()
496 unregister_irqsoff_function(tr, is_graph(tr)); in irqsoff_function_set()
500 static int register_irqsoff_function(struct trace_array *tr, int graph, int set) in register_irqsoff_function() argument
504 static void unregister_irqsoff_function(struct trace_array *tr, int graph) { } in unregister_irqsoff_function() argument
505 static inline int irqsoff_function_set(struct trace_array *tr, u32 mask, int set) in irqsoff_function_set() argument
511 static int irqsoff_flag_changed(struct trace_array *tr, u32 mask, int set) in irqsoff_flag_changed() argument
513 struct tracer *tracer = tr->current_trace; in irqsoff_flag_changed()
515 if (irqsoff_function_set(tr, mask, set)) in irqsoff_flag_changed()
520 return irqsoff_display_graph(tr, set); in irqsoff_flag_changed()
526 static int start_irqsoff_tracer(struct trace_array *tr, int graph) in start_irqsoff_tracer() argument
530 ret = register_irqsoff_function(tr, graph, 0); in start_irqsoff_tracer()
540 static void stop_irqsoff_tracer(struct trace_array *tr, int graph) in stop_irqsoff_tracer() argument
544 unregister_irqsoff_function(tr, graph); in stop_irqsoff_tracer()
549 static int __irqsoff_tracer_init(struct trace_array *tr) in __irqsoff_tracer_init() argument
554 save_flags = tr->trace_flags; in __irqsoff_tracer_init()
557 set_tracer_flag(tr, TRACE_ITER_OVERWRITE, 1); in __irqsoff_tracer_init()
558 set_tracer_flag(tr, TRACE_ITER_LATENCY_FMT, 1); in __irqsoff_tracer_init()
560 set_tracer_flag(tr, TRACE_ITER_PAUSE_ON_TRACE, 1); in __irqsoff_tracer_init()
562 tr->max_latency = 0; in __irqsoff_tracer_init()
563 irqsoff_trace = tr; in __irqsoff_tracer_init()
567 ftrace_init_array_ops(tr, irqsoff_tracer_call); in __irqsoff_tracer_init()
570 if (start_irqsoff_tracer(tr, (tr->flags & TRACE_ARRAY_FL_GLOBAL && in __irqsoff_tracer_init()
571 is_graph(tr)))) in __irqsoff_tracer_init()
578 static void __irqsoff_tracer_reset(struct trace_array *tr) in __irqsoff_tracer_reset() argument
584 stop_irqsoff_tracer(tr, is_graph(tr)); in __irqsoff_tracer_reset()
586 set_tracer_flag(tr, TRACE_ITER_LATENCY_FMT, lat_flag); in __irqsoff_tracer_reset()
587 set_tracer_flag(tr, TRACE_ITER_OVERWRITE, overwrite_flag); in __irqsoff_tracer_reset()
588 set_tracer_flag(tr, TRACE_ITER_PAUSE_ON_TRACE, pause_flag); in __irqsoff_tracer_reset()
589 ftrace_reset_array_ops(tr); in __irqsoff_tracer_reset()
594 static void irqsoff_tracer_start(struct trace_array *tr) in irqsoff_tracer_start() argument
599 static void irqsoff_tracer_stop(struct trace_array *tr) in irqsoff_tracer_stop() argument
622 static int irqsoff_tracer_init(struct trace_array *tr) in irqsoff_tracer_init() argument
626 return __irqsoff_tracer_init(tr); in irqsoff_tracer_init()
629 static void irqsoff_tracer_reset(struct trace_array *tr) in irqsoff_tracer_reset() argument
631 __irqsoff_tracer_reset(tr); in irqsoff_tracer_reset()
668 static int preemptoff_tracer_init(struct trace_array *tr) in preemptoff_tracer_init() argument
672 return __irqsoff_tracer_init(tr); in preemptoff_tracer_init()
675 static void preemptoff_tracer_reset(struct trace_array *tr) in preemptoff_tracer_reset() argument
677 __irqsoff_tracer_reset(tr); in preemptoff_tracer_reset()
703 static int preemptirqsoff_tracer_init(struct trace_array *tr) in preemptirqsoff_tracer_init() argument
707 return __irqsoff_tracer_init(tr); in preemptirqsoff_tracer_init()
710 static void preemptirqsoff_tracer_reset(struct trace_array *tr) in preemptirqsoff_tracer_reset() argument
712 __irqsoff_tracer_reset(tr); in preemptirqsoff_tracer_reset()