linux/mm/shrinker_debug.c

// SPDX-License-Identifier: GPL-2.0
#include <linux/idr.h>
#include <linux/slab.h>
#include <linux/debugfs.h>
#include <linux/seq_file.h>
#include <linux/shrinker.h>
#include <linux/memcontrol.h>

#include "internal.h"

/* defined in vmscan.c */
extern struct mutex shrinker_mutex;
extern struct list_head shrinker_list;

static DEFINE_IDA(shrinker_debugfs_ida);
static struct dentry *shrinker_debugfs_root;

static unsigned long shrinker_count_objects(struct shrinker *shrinker,
					    struct mem_cgroup *memcg,
					    unsigned long *count_per_node)
{}

static int shrinker_debugfs_count_show(struct seq_file *m, void *v)
{}
DEFINE_SHOW_ATTRIBUTE();

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

static ssize_t shrinker_debugfs_scan_write(struct file *file,
					   const char __user *buf,
					   size_t size, loff_t *pos)
{}

static const struct file_operations shrinker_debugfs_scan_fops =;

int shrinker_debugfs_add(struct shrinker *shrinker)
{}

int shrinker_debugfs_rename(struct shrinker *shrinker, const char *fmt, ...)
{}
EXPORT_SYMBOL();

struct dentry *shrinker_debugfs_detach(struct shrinker *shrinker,
				       int *debugfs_id)
{}

void shrinker_debugfs_remove(struct dentry *debugfs_entry, int debugfs_id)
{}

static int __init shrinker_debugfs_init(void)
{}
late_initcall(shrinker_debugfs_init);