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()
181 struct trace_array *tr = irqsoff_trace; in irqsoff_graph_entry() local
199 if (!func_prolog_dec(tr, &data, &flags)) in irqsoff_graph_entry()
203 ret = __trace_graph_entry(tr, trace, trace_ctx); in irqsoff_graph_entry()
212 struct trace_array *tr = irqsoff_trace; in irqsoff_graph_return() local
219 if (!func_prolog_dec(tr, &data, &flags)) in irqsoff_graph_return()
223 __trace_graph_return(tr, trace, trace_ctx); in irqsoff_graph_return()
234 if (is_graph(iter->tr)) in irqsoff_trace_open()
257 if (is_graph(iter->tr)) in irqsoff_print_line()
265 struct trace_array *tr = irqsoff_trace; in irqsoff_print_header() local
267 if (is_graph(tr)) in irqsoff_print_header()
274 __trace_function(struct trace_array *tr, in __trace_function() argument
278 if (is_graph(tr)) in __trace_function()
279 trace_graph_function(tr, ip, parent_ip, trace_ctx); in __trace_function()
281 trace_function(tr, ip, parent_ip, trace_ctx); in __trace_function()
311 static bool report_latency(struct trace_array *tr, u64 delta) in report_latency() argument
317 if (delta <= tr->max_latency) in report_latency()
324 check_critical_timing(struct trace_array *tr, in check_critical_timing() argument
339 if (!report_latency(tr, delta)) in check_critical_timing()
345 if (!report_latency(tr, delta)) in check_critical_timing()
348 __trace_function(tr, CALLER_ADDR0, parent_ip, trace_ctx); in check_critical_timing()
350 __trace_stack(tr, trace_ctx, 5); in check_critical_timing()
358 tr->max_latency = delta; in check_critical_timing()
359 update_max_tr_single(tr, current, cpu); in check_critical_timing()
370 __trace_function(tr, CALLER_ADDR0, parent_ip, trace_ctx); in check_critical_timing()
377 struct trace_array *tr = irqsoff_trace; in start_critical_timing() local
388 data = per_cpu_ptr(tr->array_buffer.data, cpu); in start_critical_timing()
399 __trace_function(tr, ip, parent_ip, tracing_gen_ctx()); in start_critical_timing()
410 struct trace_array *tr = irqsoff_trace; in stop_critical_timing() local
424 data = per_cpu_ptr(tr->array_buffer.data, cpu); in stop_critical_timing()
433 __trace_function(tr, ip, parent_ip, trace_ctx); in stop_critical_timing()
434 check_critical_timing(tr, data, parent_ip ? : ip, cpu); in stop_critical_timing()
459 static int register_irqsoff_function(struct trace_array *tr, int graph, int set) in register_irqsoff_function() argument
464 if (function_enabled || (!set && !(tr->trace_flags & TRACE_ITER_FUNCTION))) in register_irqsoff_function()
470 ret = register_ftrace_function(tr->ops); in register_irqsoff_function()
478 static void unregister_irqsoff_function(struct trace_array *tr, int graph) in unregister_irqsoff_function() argument
486 unregister_ftrace_function(tr->ops); in unregister_irqsoff_function()
491 static int irqsoff_function_set(struct trace_array *tr, u32 mask, int set) in irqsoff_function_set() argument
497 register_irqsoff_function(tr, is_graph(tr), 1); in irqsoff_function_set()
499 unregister_irqsoff_function(tr, is_graph(tr)); in irqsoff_function_set()
503 static int register_irqsoff_function(struct trace_array *tr, int graph, int set) in register_irqsoff_function() argument
507 static void unregister_irqsoff_function(struct trace_array *tr, int graph) { } in unregister_irqsoff_function() argument
508 static inline int irqsoff_function_set(struct trace_array *tr, u32 mask, int set) in irqsoff_function_set() argument
514 static int irqsoff_flag_changed(struct trace_array *tr, u32 mask, int set) in irqsoff_flag_changed() argument
516 struct tracer *tracer = tr->current_trace; in irqsoff_flag_changed()
518 if (irqsoff_function_set(tr, mask, set)) in irqsoff_flag_changed()
523 return irqsoff_display_graph(tr, set); in irqsoff_flag_changed()
529 static int start_irqsoff_tracer(struct trace_array *tr, int graph) in start_irqsoff_tracer() argument
533 ret = register_irqsoff_function(tr, graph, 0); in start_irqsoff_tracer()
543 static void stop_irqsoff_tracer(struct trace_array *tr, int graph) in stop_irqsoff_tracer() argument
547 unregister_irqsoff_function(tr, graph); in stop_irqsoff_tracer()
552 static int __irqsoff_tracer_init(struct trace_array *tr) in __irqsoff_tracer_init() argument
557 save_flags = tr->trace_flags; in __irqsoff_tracer_init()
560 set_tracer_flag(tr, TRACE_ITER_OVERWRITE, 1); in __irqsoff_tracer_init()
561 set_tracer_flag(tr, TRACE_ITER_LATENCY_FMT, 1); in __irqsoff_tracer_init()
563 set_tracer_flag(tr, TRACE_ITER_PAUSE_ON_TRACE, 1); in __irqsoff_tracer_init()
565 tr->max_latency = 0; in __irqsoff_tracer_init()
566 irqsoff_trace = tr; in __irqsoff_tracer_init()
570 ftrace_init_array_ops(tr, irqsoff_tracer_call); in __irqsoff_tracer_init()
573 if (start_irqsoff_tracer(tr, (tr->flags & TRACE_ARRAY_FL_GLOBAL && in __irqsoff_tracer_init()
574 is_graph(tr)))) in __irqsoff_tracer_init()
581 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 set_tracer_flag(tr, TRACE_ITER_PAUSE_ON_TRACE, pause_flag); in __irqsoff_tracer_reset()
592 ftrace_reset_array_ops(tr); in __irqsoff_tracer_reset()
597 static void irqsoff_tracer_start(struct trace_array *tr) in irqsoff_tracer_start() argument
602 static void irqsoff_tracer_stop(struct trace_array *tr) in irqsoff_tracer_stop() argument
625 static int irqsoff_tracer_init(struct trace_array *tr) in irqsoff_tracer_init() argument
629 return __irqsoff_tracer_init(tr); in irqsoff_tracer_init()
632 static void irqsoff_tracer_reset(struct trace_array *tr) in irqsoff_tracer_reset() argument
634 __irqsoff_tracer_reset(tr); in irqsoff_tracer_reset()
671 static int preemptoff_tracer_init(struct trace_array *tr) in preemptoff_tracer_init() argument
675 return __irqsoff_tracer_init(tr); in preemptoff_tracer_init()
678 static void preemptoff_tracer_reset(struct trace_array *tr) in preemptoff_tracer_reset() argument
680 __irqsoff_tracer_reset(tr); in preemptoff_tracer_reset()
706 static int preemptirqsoff_tracer_init(struct trace_array *tr) in preemptirqsoff_tracer_init() argument
710 return __irqsoff_tracer_init(tr); in preemptirqsoff_tracer_init()
713 static void preemptirqsoff_tracer_reset(struct trace_array *tr) in preemptirqsoff_tracer_reset() argument
715 __irqsoff_tracer_reset(tr); in preemptirqsoff_tracer_reset()