3 * Function graph tracer.
4 * Copyright (c) 2008-2009 Frederic Weisbecker <fweisbec@gmail.com>
5 * Mostly borrowed from function tracer which
6 * is Copyright (c) Steven Rostedt <srostedt@redhat.com>
9 #include <linux/debugfs.h>
10 #include <linux/uaccess.h>
11 #include <linux/ftrace.h>
15 #include "trace_output.h"
22 #define TRACE_GRAPH_INDENT 2
25 #define TRACE_GRAPH_PRINT_OVERRUN 0x1
26 #define TRACE_GRAPH_PRINT_CPU 0x2
27 #define TRACE_GRAPH_PRINT_OVERHEAD 0x4
28 #define TRACE_GRAPH_PRINT_PROC 0x8
29 #define TRACE_GRAPH_PRINT_DURATION 0x10
30 #define TRACE_GRAPH_PRINT_ABS_TIME 0X20
32 static struct tracer_opt trace_opts[] = {
33 /* Display overruns? (for self-debug purpose) */
34 { TRACER_OPT(funcgraph-overrun, TRACE_GRAPH_PRINT_OVERRUN) },
36 { TRACER_OPT(funcgraph-cpu, TRACE_GRAPH_PRINT_CPU) },
37 /* Display Overhead ? */
38 { TRACER_OPT(funcgraph-overhead, TRACE_GRAPH_PRINT_OVERHEAD) },
39 /* Display proc name/pid */
40 { TRACER_OPT(funcgraph-proc, TRACE_GRAPH_PRINT_PROC) },
41 /* Display duration of execution */
42 { TRACER_OPT(funcgraph-duration, TRACE_GRAPH_PRINT_DURATION) },
43 /* Display absolute time of an entry */
44 { TRACER_OPT(funcgraph-abstime, TRACE_GRAPH_PRINT_ABS_TIME) },
48 static struct tracer_flags tracer_flags = {
49 /* Don't display overruns and proc by default */
50 .val = TRACE_GRAPH_PRINT_CPU | TRACE_GRAPH_PRINT_OVERHEAD |
51 TRACE_GRAPH_PRINT_DURATION,
55 /* pid on the last trace processed */
58 /* Add a function return address to the trace stack on thread info.*/
60 ftrace_push_return_trace(unsigned long ret, unsigned long func, int *depth)
62 unsigned long long calltime;
65 if (!current->ret_stack)
69 * We must make sure the ret_stack is tested before we read
74 /* The return trace stack is full */
75 if (current->curr_ret_stack == FTRACE_RETFUNC_DEPTH - 1) {
76 atomic_inc(¤t->trace_overrun);
80 calltime = trace_clock_local();
82 index = ++current->curr_ret_stack;
84 current->ret_stack[index].ret = ret;
85 current->ret_stack[index].func = func;
86 current->ret_stack[index].calltime = calltime;
92 /* Retrieve a function return address to the trace stack on thread info.*/
94 ftrace_pop_return_trace(struct ftrace_graph_ret *trace, unsigned long *ret)
98 index = current->curr_ret_stack;
100 if (unlikely(index < 0)) {
103 /* Might as well panic, otherwise we have no where to go */
104 *ret = (unsigned long)panic;
108 *ret = current->ret_stack[index].ret;
109 trace->func = current->ret_stack[index].func;
110 trace->calltime = current->ret_stack[index].calltime;
111 trace->overrun = atomic_read(¤t->trace_overrun);
112 trace->depth = index;
114 current->curr_ret_stack--;
119 * Send the trace to the ring-buffer.
120 * @return the original return address.
122 unsigned long ftrace_return_to_handler(void)
124 struct ftrace_graph_ret trace;
127 ftrace_pop_return_trace(&trace, &ret);
128 trace.rettime = trace_clock_local();
129 ftrace_graph_return(&trace);
131 if (unlikely(!ret)) {
134 /* Might as well panic. What else to do? */
135 ret = (unsigned long)panic;
141 static int graph_trace_init(struct trace_array *tr)
143 int ret = register_ftrace_graph(&trace_graph_return,
147 tracing_start_cmdline_record();
152 static void graph_trace_reset(struct trace_array *tr)
154 tracing_stop_cmdline_record();
155 unregister_ftrace_graph();
158 static inline int log10_cpu(int nb)
167 static enum print_line_t
168 print_graph_cpu(struct trace_seq *s, int cpu)
172 int log10_this = log10_cpu(cpu);
173 int log10_all = log10_cpu(cpumask_weight(cpu_online_mask));
177 * Start with a space character - to make it stand out
178 * to the right a bit when trace output is pasted into
181 ret = trace_seq_printf(s, " ");
184 * Tricky - we space the CPU field according to the max
185 * number of online CPUs. On a 2-cpu system it would take
186 * a maximum of 1 digit - on a 128 cpu system it would
187 * take up to 3 digits:
189 for (i = 0; i < log10_all - log10_this; i++) {
190 ret = trace_seq_printf(s, " ");
192 return TRACE_TYPE_PARTIAL_LINE;
194 ret = trace_seq_printf(s, "%d) ", cpu);
196 return TRACE_TYPE_PARTIAL_LINE;
198 return TRACE_TYPE_HANDLED;
201 #define TRACE_GRAPH_PROCINFO_LENGTH 14
203 static enum print_line_t
204 print_graph_proc(struct trace_seq *s, pid_t pid)
206 char comm[TASK_COMM_LEN];
207 /* sign + log10(MAX_INT) + '\0' */
214 trace_find_cmdline(pid, comm);
216 sprintf(pid_str, "%d", pid);
218 /* 1 stands for the "-" character */
219 len = strlen(comm) + strlen(pid_str) + 1;
221 if (len < TRACE_GRAPH_PROCINFO_LENGTH)
222 spaces = TRACE_GRAPH_PROCINFO_LENGTH - len;
224 /* First spaces to align center */
225 for (i = 0; i < spaces / 2; i++) {
226 ret = trace_seq_printf(s, " ");
228 return TRACE_TYPE_PARTIAL_LINE;
231 ret = trace_seq_printf(s, "%s-%s", comm, pid_str);
233 return TRACE_TYPE_PARTIAL_LINE;
235 /* Last spaces to align center */
236 for (i = 0; i < spaces - (spaces / 2); i++) {
237 ret = trace_seq_printf(s, " ");
239 return TRACE_TYPE_PARTIAL_LINE;
241 return TRACE_TYPE_HANDLED;
245 /* If the pid changed since the last trace, output this event */
246 static enum print_line_t
247 verif_pid(struct trace_seq *s, pid_t pid, int cpu, struct fgraph_data *data)
254 return TRACE_TYPE_HANDLED;
256 last_pid = &(per_cpu_ptr(data, cpu)->last_pid);
258 if (*last_pid == pid)
259 return TRACE_TYPE_HANDLED;
261 prev_pid = *last_pid;
265 return TRACE_TYPE_HANDLED;
267 * Context-switch trace line:
269 ------------------------------------------
270 | 1) migration/0--1 => sshd-1755
271 ------------------------------------------
274 ret = trace_seq_printf(s,
275 " ------------------------------------------\n");
277 return TRACE_TYPE_PARTIAL_LINE;
279 ret = print_graph_cpu(s, cpu);
280 if (ret == TRACE_TYPE_PARTIAL_LINE)
281 return TRACE_TYPE_PARTIAL_LINE;
283 ret = print_graph_proc(s, prev_pid);
284 if (ret == TRACE_TYPE_PARTIAL_LINE)
285 return TRACE_TYPE_PARTIAL_LINE;
287 ret = trace_seq_printf(s, " => ");
289 return TRACE_TYPE_PARTIAL_LINE;
291 ret = print_graph_proc(s, pid);
292 if (ret == TRACE_TYPE_PARTIAL_LINE)
293 return TRACE_TYPE_PARTIAL_LINE;
295 ret = trace_seq_printf(s,
296 "\n ------------------------------------------\n\n");
298 return TRACE_TYPE_PARTIAL_LINE;
300 return TRACE_TYPE_HANDLED;
303 static struct ftrace_graph_ret_entry *
304 get_return_for_leaf(struct trace_iterator *iter,
305 struct ftrace_graph_ent_entry *curr)
307 struct ring_buffer_iter *ring_iter;
308 struct ring_buffer_event *event;
309 struct ftrace_graph_ret_entry *next;
311 ring_iter = iter->buffer_iter[iter->cpu];
313 /* First peek to compare current entry and the next one */
315 event = ring_buffer_iter_peek(ring_iter, NULL);
317 /* We need to consume the current entry to see the next one */
318 ring_buffer_consume(iter->tr->buffer, iter->cpu, NULL);
319 event = ring_buffer_peek(iter->tr->buffer, iter->cpu,
326 next = ring_buffer_event_data(event);
328 if (next->ent.type != TRACE_GRAPH_RET)
331 if (curr->ent.pid != next->ent.pid ||
332 curr->graph_ent.func != next->ret.func)
335 /* this is a leaf, now advance the iterator */
337 ring_buffer_read(ring_iter, NULL);
342 /* Signal a overhead of time execution to the output */
344 print_graph_overhead(unsigned long long duration, struct trace_seq *s)
346 /* If duration disappear, we don't need anything */
347 if (!(tracer_flags.val & TRACE_GRAPH_PRINT_DURATION))
350 /* Non nested entry or return */
352 return trace_seq_printf(s, " ");
354 if (tracer_flags.val & TRACE_GRAPH_PRINT_OVERHEAD) {
355 /* Duration exceeded 100 msecs */
356 if (duration > 100000ULL)
357 return trace_seq_printf(s, "! ");
359 /* Duration exceeded 10 msecs */
360 if (duration > 10000ULL)
361 return trace_seq_printf(s, "+ ");
364 return trace_seq_printf(s, " ");
367 static int print_graph_abs_time(u64 t, struct trace_seq *s)
369 unsigned long usecs_rem;
371 usecs_rem = do_div(t, NSEC_PER_SEC);
374 return trace_seq_printf(s, "%5lu.%06lu | ",
375 (unsigned long)t, usecs_rem);
378 static enum print_line_t
379 print_graph_irq(struct trace_iterator *iter, unsigned long addr,
380 enum trace_type type, int cpu, pid_t pid)
383 struct trace_seq *s = &iter->seq;
385 if (addr < (unsigned long)__irqentry_text_start ||
386 addr >= (unsigned long)__irqentry_text_end)
387 return TRACE_TYPE_UNHANDLED;
390 if (tracer_flags.val & TRACE_GRAPH_PRINT_ABS_TIME) {
391 ret = print_graph_abs_time(iter->ts, s);
393 return TRACE_TYPE_PARTIAL_LINE;
397 if (tracer_flags.val & TRACE_GRAPH_PRINT_CPU) {
398 ret = print_graph_cpu(s, cpu);
399 if (ret == TRACE_TYPE_PARTIAL_LINE)
400 return TRACE_TYPE_PARTIAL_LINE;
403 if (tracer_flags.val & TRACE_GRAPH_PRINT_PROC) {
404 ret = print_graph_proc(s, pid);
405 if (ret == TRACE_TYPE_PARTIAL_LINE)
406 return TRACE_TYPE_PARTIAL_LINE;
407 ret = trace_seq_printf(s, " | ");
409 return TRACE_TYPE_PARTIAL_LINE;
413 ret = print_graph_overhead(-1, s);
415 return TRACE_TYPE_PARTIAL_LINE;
417 if (type == TRACE_GRAPH_ENT)
418 ret = trace_seq_printf(s, "==========>");
420 ret = trace_seq_printf(s, "<==========");
423 return TRACE_TYPE_PARTIAL_LINE;
425 /* Don't close the duration column if haven't one */
426 if (tracer_flags.val & TRACE_GRAPH_PRINT_DURATION)
427 trace_seq_printf(s, " |");
428 ret = trace_seq_printf(s, "\n");
431 return TRACE_TYPE_PARTIAL_LINE;
432 return TRACE_TYPE_HANDLED;
435 static enum print_line_t
436 print_graph_duration(unsigned long long duration, struct trace_seq *s)
438 unsigned long nsecs_rem = do_div(duration, 1000);
439 /* log10(ULONG_MAX) + '\0' */
445 sprintf(msecs_str, "%lu", (unsigned long) duration);
448 ret = trace_seq_printf(s, "%s", msecs_str);
450 return TRACE_TYPE_PARTIAL_LINE;
452 len = strlen(msecs_str);
454 /* Print nsecs (we don't want to exceed 7 numbers) */
456 snprintf(nsecs_str, 8 - len, "%03lu", nsecs_rem);
457 ret = trace_seq_printf(s, ".%s", nsecs_str);
459 return TRACE_TYPE_PARTIAL_LINE;
460 len += strlen(nsecs_str);
463 ret = trace_seq_printf(s, " us ");
465 return TRACE_TYPE_PARTIAL_LINE;
467 /* Print remaining spaces to fit the row's width */
468 for (i = len; i < 7; i++) {
469 ret = trace_seq_printf(s, " ");
471 return TRACE_TYPE_PARTIAL_LINE;
474 ret = trace_seq_printf(s, "| ");
476 return TRACE_TYPE_PARTIAL_LINE;
477 return TRACE_TYPE_HANDLED;
481 /* Case of a leaf function on its call entry */
482 static enum print_line_t
483 print_graph_entry_leaf(struct trace_iterator *iter,
484 struct ftrace_graph_ent_entry *entry,
485 struct ftrace_graph_ret_entry *ret_entry, struct trace_seq *s)
487 struct fgraph_data *data = iter->private;
488 struct ftrace_graph_ret *graph_ret;
489 struct ftrace_graph_ent *call;
490 unsigned long long duration;
494 graph_ret = &ret_entry->ret;
495 call = &entry->graph_ent;
496 duration = graph_ret->rettime - graph_ret->calltime;
500 int *depth = &(per_cpu_ptr(data, cpu)->depth);
503 * Comments display at + 1 to depth. Since
504 * this is a leaf function, keep the comments
505 * equal to this depth.
507 *depth = call->depth - 1;
511 ret = print_graph_overhead(duration, s);
513 return TRACE_TYPE_PARTIAL_LINE;
516 if (tracer_flags.val & TRACE_GRAPH_PRINT_DURATION) {
517 ret = print_graph_duration(duration, s);
518 if (ret == TRACE_TYPE_PARTIAL_LINE)
519 return TRACE_TYPE_PARTIAL_LINE;
523 for (i = 0; i < call->depth * TRACE_GRAPH_INDENT; i++) {
524 ret = trace_seq_printf(s, " ");
526 return TRACE_TYPE_PARTIAL_LINE;
529 ret = seq_print_ip_sym(s, call->func, 0);
531 return TRACE_TYPE_PARTIAL_LINE;
533 ret = trace_seq_printf(s, "();\n");
535 return TRACE_TYPE_PARTIAL_LINE;
537 return TRACE_TYPE_HANDLED;
540 static enum print_line_t
541 print_graph_entry_nested(struct trace_iterator *iter,
542 struct ftrace_graph_ent_entry *entry,
543 struct trace_seq *s, int cpu)
545 struct ftrace_graph_ent *call = &entry->graph_ent;
546 struct fgraph_data *data = iter->private;
552 int *depth = &(per_cpu_ptr(data, cpu)->depth);
554 *depth = call->depth;
558 ret = print_graph_overhead(-1, s);
560 return TRACE_TYPE_PARTIAL_LINE;
563 if (tracer_flags.val & TRACE_GRAPH_PRINT_DURATION) {
564 ret = trace_seq_printf(s, " | ");
566 return TRACE_TYPE_PARTIAL_LINE;
570 for (i = 0; i < call->depth * TRACE_GRAPH_INDENT; i++) {
571 ret = trace_seq_printf(s, " ");
573 return TRACE_TYPE_PARTIAL_LINE;
576 ret = seq_print_ip_sym(s, call->func, 0);
578 return TRACE_TYPE_PARTIAL_LINE;
580 ret = trace_seq_printf(s, "() {\n");
582 return TRACE_TYPE_PARTIAL_LINE;
585 * we already consumed the current entry to check the next one
586 * and see if this is a leaf.
588 return TRACE_TYPE_NO_CONSUME;
591 static enum print_line_t
592 print_graph_prologue(struct trace_iterator *iter, struct trace_seq *s,
593 int type, unsigned long addr)
595 struct fgraph_data *data = iter->private;
596 struct trace_entry *ent = iter->ent;
601 if (verif_pid(s, ent->pid, cpu, data) == TRACE_TYPE_PARTIAL_LINE)
602 return TRACE_TYPE_PARTIAL_LINE;
606 ret = print_graph_irq(iter, addr, type, cpu, ent->pid);
607 if (ret == TRACE_TYPE_PARTIAL_LINE)
608 return TRACE_TYPE_PARTIAL_LINE;
612 if (tracer_flags.val & TRACE_GRAPH_PRINT_ABS_TIME) {
613 ret = print_graph_abs_time(iter->ts, s);
615 return TRACE_TYPE_PARTIAL_LINE;
619 if (tracer_flags.val & TRACE_GRAPH_PRINT_CPU) {
620 ret = print_graph_cpu(s, cpu);
621 if (ret == TRACE_TYPE_PARTIAL_LINE)
622 return TRACE_TYPE_PARTIAL_LINE;
626 if (tracer_flags.val & TRACE_GRAPH_PRINT_PROC) {
627 ret = print_graph_proc(s, ent->pid);
628 if (ret == TRACE_TYPE_PARTIAL_LINE)
629 return TRACE_TYPE_PARTIAL_LINE;
631 ret = trace_seq_printf(s, " | ");
633 return TRACE_TYPE_PARTIAL_LINE;
639 static enum print_line_t
640 print_graph_entry(struct ftrace_graph_ent_entry *field, struct trace_seq *s,
641 struct trace_iterator *iter)
644 struct ftrace_graph_ent *call = &field->graph_ent;
645 struct ftrace_graph_ret_entry *leaf_ret;
647 if (print_graph_prologue(iter, s, TRACE_GRAPH_ENT, call->func))
648 return TRACE_TYPE_PARTIAL_LINE;
650 leaf_ret = get_return_for_leaf(iter, field);
652 return print_graph_entry_leaf(iter, field, leaf_ret, s);
654 return print_graph_entry_nested(iter, field, s, cpu);
658 static enum print_line_t
659 print_graph_return(struct ftrace_graph_ret *trace, struct trace_seq *s,
660 struct trace_entry *ent, struct trace_iterator *iter)
662 unsigned long long duration = trace->rettime - trace->calltime;
663 struct fgraph_data *data = iter->private;
664 pid_t pid = ent->pid;
671 int *depth = &(per_cpu_ptr(data, cpu)->depth);
674 * Comments display at + 1 to depth. This is the
675 * return from a function, we now want the comments
676 * to display at the same level of the bracket.
678 *depth = trace->depth - 1;
681 if (print_graph_prologue(iter, s, 0, 0))
682 return TRACE_TYPE_PARTIAL_LINE;
685 ret = print_graph_overhead(duration, s);
687 return TRACE_TYPE_PARTIAL_LINE;
690 if (tracer_flags.val & TRACE_GRAPH_PRINT_DURATION) {
691 ret = print_graph_duration(duration, s);
692 if (ret == TRACE_TYPE_PARTIAL_LINE)
693 return TRACE_TYPE_PARTIAL_LINE;
697 for (i = 0; i < trace->depth * TRACE_GRAPH_INDENT; i++) {
698 ret = trace_seq_printf(s, " ");
700 return TRACE_TYPE_PARTIAL_LINE;
703 ret = trace_seq_printf(s, "}\n");
705 return TRACE_TYPE_PARTIAL_LINE;
708 if (tracer_flags.val & TRACE_GRAPH_PRINT_OVERRUN) {
709 ret = trace_seq_printf(s, " (Overruns: %lu)\n",
712 return TRACE_TYPE_PARTIAL_LINE;
715 ret = print_graph_irq(iter, trace->func, TRACE_GRAPH_RET, cpu, pid);
716 if (ret == TRACE_TYPE_PARTIAL_LINE)
717 return TRACE_TYPE_PARTIAL_LINE;
719 return TRACE_TYPE_HANDLED;
722 static enum print_line_t
723 print_graph_comment(struct trace_seq *s, struct trace_entry *ent,
724 struct trace_iterator *iter)
726 unsigned long sym_flags = (trace_flags & TRACE_ITER_SYM_MASK);
727 struct fgraph_data *data = iter->private;
728 struct trace_event *event;
734 depth = per_cpu_ptr(data, iter->cpu)->depth;
736 if (print_graph_prologue(iter, s, 0, 0))
737 return TRACE_TYPE_PARTIAL_LINE;
740 ret = print_graph_overhead(-1, s);
742 return TRACE_TYPE_PARTIAL_LINE;
745 if (tracer_flags.val & TRACE_GRAPH_PRINT_DURATION) {
746 ret = trace_seq_printf(s, " | ");
748 return TRACE_TYPE_PARTIAL_LINE;
753 for (i = 0; i < (depth + 1) * TRACE_GRAPH_INDENT; i++) {
754 ret = trace_seq_printf(s, " ");
756 return TRACE_TYPE_PARTIAL_LINE;
760 ret = trace_seq_printf(s, "/* ");
762 return TRACE_TYPE_PARTIAL_LINE;
764 switch (iter->ent->type) {
766 ret = trace_print_bprintk_msg_only(iter);
767 if (ret != TRACE_TYPE_HANDLED)
771 ret = trace_print_printk_msg_only(iter);
772 if (ret != TRACE_TYPE_HANDLED)
776 event = ftrace_find_event(ent->type);
778 return TRACE_TYPE_UNHANDLED;
780 ret = event->trace(iter, sym_flags);
781 if (ret != TRACE_TYPE_HANDLED)
785 /* Strip ending newline */
786 if (s->buffer[s->len - 1] == '\n') {
787 s->buffer[s->len - 1] = '\0';
791 ret = trace_seq_printf(s, " */\n");
793 return TRACE_TYPE_PARTIAL_LINE;
795 return TRACE_TYPE_HANDLED;
800 print_graph_function(struct trace_iterator *iter)
802 struct trace_entry *entry = iter->ent;
803 struct trace_seq *s = &iter->seq;
805 switch (entry->type) {
806 case TRACE_GRAPH_ENT: {
807 struct ftrace_graph_ent_entry *field;
808 trace_assign_type(field, entry);
809 return print_graph_entry(field, s, iter);
811 case TRACE_GRAPH_RET: {
812 struct ftrace_graph_ret_entry *field;
813 trace_assign_type(field, entry);
814 return print_graph_return(&field->ret, s, entry, iter);
817 return print_graph_comment(s, entry, iter);
820 return TRACE_TYPE_HANDLED;
823 static void print_graph_headers(struct seq_file *s)
827 if (tracer_flags.val & TRACE_GRAPH_PRINT_ABS_TIME)
828 seq_printf(s, " TIME ");
829 if (tracer_flags.val & TRACE_GRAPH_PRINT_CPU)
830 seq_printf(s, "CPU");
831 if (tracer_flags.val & TRACE_GRAPH_PRINT_PROC)
832 seq_printf(s, " TASK/PID ");
833 if (tracer_flags.val & TRACE_GRAPH_PRINT_DURATION)
834 seq_printf(s, " DURATION ");
835 seq_printf(s, " FUNCTION CALLS\n");
839 if (tracer_flags.val & TRACE_GRAPH_PRINT_ABS_TIME)
840 seq_printf(s, " | ");
841 if (tracer_flags.val & TRACE_GRAPH_PRINT_CPU)
843 if (tracer_flags.val & TRACE_GRAPH_PRINT_PROC)
844 seq_printf(s, " | | ");
845 if (tracer_flags.val & TRACE_GRAPH_PRINT_DURATION)
846 seq_printf(s, " | | ");
847 seq_printf(s, " | | | |\n");
850 static void graph_trace_open(struct trace_iterator *iter)
852 /* pid and depth on the last trace processed */
853 struct fgraph_data *data = alloc_percpu(struct fgraph_data);
857 pr_warning("function graph tracer: not enough memory\n");
859 for_each_possible_cpu(cpu) {
860 pid_t *pid = &(per_cpu_ptr(data, cpu)->last_pid);
861 int *depth = &(per_cpu_ptr(data, cpu)->depth);
866 iter->private = data;
869 static void graph_trace_close(struct trace_iterator *iter)
871 free_percpu(iter->private);
874 static struct tracer graph_trace __read_mostly = {
875 .name = "function_graph",
876 .open = graph_trace_open,
877 .close = graph_trace_close,
878 .wait_pipe = poll_wait_pipe,
879 .init = graph_trace_init,
880 .reset = graph_trace_reset,
881 .print_line = print_graph_function,
882 .print_header = print_graph_headers,
883 .flags = &tracer_flags,
884 #ifdef CONFIG_FTRACE_SELFTEST
885 .selftest = trace_selftest_startup_function_graph,
889 static __init int init_graph_trace(void)
891 return register_tracer(&graph_trace);
894 device_initcall(init_graph_trace);