/* * * 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/uaccess.h>#include<linux/ftrace.h>#include<linux/interrupt.h>#include<linux/slab.h>#include<linux/fs.h>#include"trace.h"#include"trace_output.h"staticboolkill_ftrace_graph;/** * ftrace_graph_is_dead - returns true if ftrace_graph_stop() was called * * ftrace_graph_stop() is called when a severe error is detected in * the function graph tracing. This function is called by the critical * paths of function graph to keep those paths from doing any more harm. */boolftrace_graph_is_dead(void){returnkill_ftrace_graph;}/** * ftrace_graph_stop - set to permanently disable function graph tracincg * * In case of an error int function graph tracing, this is called * to try to keep function graph tracing from causing any more harm. * Usually this is pretty severe and this is called to try to at least * get a warning out to the user. */voidftrace_graph_stop(void){kill_ftrace_graph=true;}/* 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;struct