linux/kernel/trace/trace_recursion_record.c

// SPDX-License-Identifier: GPL-2.0

#include <linux/seq_file.h>
#include <linux/kallsyms.h>
#include <linux/module.h>
#include <linux/ftrace.h>
#include <linux/fs.h>

#include "trace_output.h"

struct recursed_functions {};

static struct recursed_functions recursed_functions[CONFIG_FTRACE_RECORD_RECURSION_SIZE];
static atomic_t nr_records;

/*
 * Cache the last found function. Yes, updates to this is racey, but
 * so is memory cache ;-)
 */
static unsigned long cached_function;

void ftrace_record_recursion(unsigned long ip, unsigned long parent_ip)
{}
EXPORT_SYMBOL_GPL();

static DEFINE_MUTEX(recursed_function_lock);
static struct trace_seq *tseq;

static void *recursed_function_seq_start(struct seq_file *m, loff_t *pos)
{}

static void *recursed_function_seq_next(struct seq_file *m, void *v, loff_t *pos)
{}

static void recursed_function_seq_stop(struct seq_file *m, void *v)
{}

static int recursed_function_seq_show(struct seq_file *m, void *v)
{}

static const struct seq_operations recursed_function_seq_ops =;

static int recursed_function_open(struct inode *inode, struct file *file)
{}

static ssize_t recursed_function_write(struct file *file,
				       const char __user *buffer,
				       size_t count, loff_t *ppos)
{}

static int recursed_function_release(struct inode *inode, struct file *file)
{}

static const struct file_operations recursed_functions_fops =;

__init static int create_recursed_functions(void)
{}

fs_initcall(create_recursed_functions);