linux/kernel/trace/trace_stat.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Infrastructure for statistic tracing (histogram output).
 *
 * Copyright (C) 2008-2009 Frederic Weisbecker <[email protected]>
 *
 * Based on the code from trace_branch.c which is
 * Copyright (C) 2008 Steven Rostedt <[email protected]>
 *
 */

#include <linux/security.h>
#include <linux/list.h>
#include <linux/slab.h>
#include <linux/rbtree.h>
#include <linux/tracefs.h>
#include "trace_stat.h"
#include "trace.h"


/*
 * List of stat red-black nodes from a tracer
 * We use a such tree to sort quickly the stat
 * entries from the tracer.
 */
struct stat_node {};

/* A stat session is the stats output in one file */
struct stat_session {};

/* All of the sessions currently in use. Each stat file embed one session */
static LIST_HEAD(all_stat_sessions);
static DEFINE_MUTEX(all_stat_sessions_mutex);

/* The root directory for all stat files */
static struct dentry		*stat_dir;

static void __reset_stat_session(struct stat_session *session)
{}

static void reset_stat_session(struct stat_session *session)
{}

static void destroy_session(struct stat_session *session)
{}

static int insert_stat(struct rb_root *root, void *stat, cmp_func_t cmp)
{}

/*
 * For tracers that don't provide a stat_cmp callback.
 * This one will force an insertion as right-most node
 * in the rbtree.
 */
static int dummy_cmp(const void *p1, const void *p2)
{}

/*
 * Initialize the stat rbtree at each trace_stat file opening.
 * All of these copies and sorting are required on all opening
 * since the stats could have changed between two file sessions.
 */
static int stat_seq_init(struct stat_session *session)
{}


static void *stat_seq_start(struct seq_file *s, loff_t *pos)
{}

static void *stat_seq_next(struct seq_file *s, void *p, loff_t *pos)
{}

static void stat_seq_stop(struct seq_file *s, void *p)
{}

static int stat_seq_show(struct seq_file *s, void *v)
{}

static const struct seq_operations trace_stat_seq_ops =;

/* The session stat is refilled and resorted at each stat file opening */
static int tracing_stat_open(struct inode *inode, struct file *file)
{}

/*
 * Avoid consuming memory with our now useless rbtree.
 */
static int tracing_stat_release(struct inode *i, struct file *f)
{}

static const struct file_operations tracing_stat_fops =;

static int tracing_stat_init(void)
{}

static int init_stat_file(struct stat_session *session)
{}

int register_stat_tracer(struct tracer_stat *trace)
{}

void unregister_stat_tracer(struct tracer_stat *trace)
{}