1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * tracefs.h - a pseudo file system for activating tracing
5 * Based on debugfs by: 2004 Greg Kroah-Hartman <greg@kroah.com>
7 * Copyright (C) 2014 Red Hat Inc, author: Steven Rostedt <srostedt@redhat.com>
9 * tracefs is the file system that is used by the tracing infrastructure.
16 #include <linux/seq_file.h>
18 #include <linux/types.h>
20 struct file_operations;
26 struct dentry *eventfs_create_events_dir(const char *name,
27 struct dentry *parent);
29 struct eventfs_file *eventfs_add_subsystem_dir(const char *name,
30 struct dentry *parent);
32 struct eventfs_file *eventfs_add_dir(const char *name,
33 struct eventfs_file *ef_parent);
35 int eventfs_add_file(const char *name, umode_t mode,
36 struct eventfs_file *ef_parent, void *data,
37 const struct file_operations *fops);
39 int eventfs_add_events_file(const char *name, umode_t mode,
40 struct dentry *parent, void *data,
41 const struct file_operations *fops);
43 void eventfs_remove(struct eventfs_file *ef);
45 void eventfs_remove_events_dir(struct dentry *dentry);
47 struct dentry *tracefs_create_file(const char *name, umode_t mode,
48 struct dentry *parent, void *data,
49 const struct file_operations *fops);
51 struct dentry *tracefs_create_dir(const char *name, struct dentry *parent);
53 void tracefs_remove(struct dentry *dentry);
55 struct dentry *tracefs_create_instance_dir(const char *name, struct dentry *parent,
56 int (*mkdir)(const char *name),
57 int (*rmdir)(const char *name));
59 bool tracefs_initialized(void);
61 #endif /* CONFIG_TRACING */