/* * * Function graph tracer. * Copyright (c) 2008-2009 Frederic Weisbecker <fweisbec@gmail.com> * Mostly borrowed from function tracer which * is Copyright (c) Steven Rostedt <srostedt@redhat.com> * */#include<linux/debugfs.h>#include<linux/uaccess.h>#include<linux/ftrace.h>#include<linux/slab.h>#include<linux/fs.h>#include"trace.h"#include"trace_output.h"/* When set, irq functions will be ignored */staticintftrace_graph_skip_irqs;structfgraph_cpu_data{pid_tlast_pid;intdepth;intdepth_irq;intignore;unsignedlongenter_funcs[FTRACE_RETFUNC_DEPTH];};structfgraph_data{structfgraph_cpu_data__percpu*cpu_data;/* Place to preserve last processed entry. */structftrace_graph_ent_entryent;structftrace_graph_ret_entryret;intfailed;intcpu;};#define TRACE_GRAPH_INDENT 2/* Flag options */#define TRACE_GRAPH_PRINT_OVERRUN 0x1#define TRACE_GRAPH_PRINT_CPU 0x2#define TRACE_GRAPH_PRINT_OVERHEAD 0x4#define TRACE_GRAPH_PRINT_PROC 0x8#define TRACE_GRAPH_PRINT_DURATION 0x10#define TRACE_GRAPH_PRINT_ABS_TIME 0x20#define TRACE_GRAPH_PRINT_IRQS 0x40staticstructtracer_opttrace_opts[]={/* Disp