// SPDX-License-Identifier: GPL-2.0/* * * 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"/* 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 2unsignedintfgraph_max_depth;staticstructtracer_opttrace_opts[]={/* Display overruns? (for self-debug purpose) */{TRACER_OPT(funcgraph-