linux/net/sunrpc/stats.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * linux/net/sunrpc/stats.c
 *
 * procfs-based user access to generic RPC statistics. The stats files
 * reside in /proc/net/rpc.
 *
 * The read routines assume that the buffer passed in is just big enough.
 * If you implement an RPC service that has its own stats routine which
 * appends the generic RPC stats, make sure you don't exceed the PAGE_SIZE
 * limit.
 *
 * Copyright (C) 1995, 1996, 1997 Olaf Kirch <[email protected]>
 */

#include <linux/module.h>
#include <linux/slab.h>

#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/proc_fs.h>
#include <linux/seq_file.h>
#include <linux/sunrpc/clnt.h>
#include <linux/sunrpc/svcsock.h>
#include <linux/sunrpc/metrics.h>
#include <linux/rcupdate.h>

#include <trace/events/sunrpc.h>

#include "netns.h"

#define RPCDBG_FACILITY

/*
 * Get RPC client stats
 */
static int rpc_proc_show(struct seq_file *seq, void *v) {}

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

static const struct proc_ops rpc_proc_ops =;

/*
 * Get RPC server stats
 */
void svc_seq_show(struct seq_file *seq, const struct svc_stat *statp)
{}
EXPORT_SYMBOL_GPL();

/**
 * rpc_alloc_iostats - allocate an rpc_iostats structure
 * @clnt: RPC program, version, and xprt
 *
 */
struct rpc_iostats *rpc_alloc_iostats(struct rpc_clnt *clnt)
{}
EXPORT_SYMBOL_GPL();

/**
 * rpc_free_iostats - release an rpc_iostats structure
 * @stats: doomed rpc_iostats structure
 *
 */
void rpc_free_iostats(struct rpc_iostats *stats)
{}
EXPORT_SYMBOL_GPL();

/**
 * rpc_count_iostats_metrics - tally up per-task stats
 * @task: completed rpc_task
 * @op_metrics: stat structure for OP that will accumulate stats from @task
 */
void rpc_count_iostats_metrics(const struct rpc_task *task,
			       struct rpc_iostats *op_metrics)
{}
EXPORT_SYMBOL_GPL();

/**
 * rpc_count_iostats - tally up per-task stats
 * @task: completed rpc_task
 * @stats: array of stat structures
 *
 * Uses the statidx from @task
 */
void rpc_count_iostats(const struct rpc_task *task, struct rpc_iostats *stats)
{}
EXPORT_SYMBOL_GPL();

static void _print_name(struct seq_file *seq, unsigned int op,
			const struct rpc_procinfo *procs)
{}

static void _add_rpc_iostats(struct rpc_iostats *a, struct rpc_iostats *b)
{}

static void _print_rpc_iostats(struct seq_file *seq, struct rpc_iostats *stats,
			       int op, const struct rpc_procinfo *procs)
{}

static int do_print_stats(struct rpc_clnt *clnt, struct rpc_xprt *xprt, void *seqv)
{}

void rpc_clnt_show_stats(struct seq_file *seq, struct rpc_clnt *clnt)
{}
EXPORT_SYMBOL_GPL();

/*
 * Register/unregister RPC proc files
 */
static inline struct proc_dir_entry *
do_register(struct net *net, const char *name, void *data,
	    const struct proc_ops *proc_ops)
{}

struct proc_dir_entry *
rpc_proc_register(struct net *net, struct rpc_stat *statp)
{}
EXPORT_SYMBOL_GPL();

void
rpc_proc_unregister(struct net *net, const char *name)
{}
EXPORT_SYMBOL_GPL();

struct proc_dir_entry *
svc_proc_register(struct net *net, struct svc_stat *statp, const struct proc_ops *proc_ops)
{}
EXPORT_SYMBOL_GPL();

void
svc_proc_unregister(struct net *net, const char *name)
{}
EXPORT_SYMBOL_GPL();

int rpc_proc_init(struct net *net)
{}

void rpc_proc_exit(struct net *net)
{}