Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-only */
0002 /*
0003  *  tracefs.h - a pseudo file system for activating tracing
0004  *
0005  * Based on debugfs by: 2004 Greg Kroah-Hartman <greg@kroah.com>
0006  *
0007  *  Copyright (C) 2014 Red Hat Inc, author: Steven Rostedt <srostedt@redhat.com>
0008  *
0009  * tracefs is the file system that is used by the tracing infrastructure.
0010  */
0011 
0012 #ifndef _TRACEFS_H_
0013 #define _TRACEFS_H_
0014 
0015 #include <linux/fs.h>
0016 #include <linux/seq_file.h>
0017 
0018 #include <linux/types.h>
0019 
0020 struct file_operations;
0021 
0022 #ifdef CONFIG_TRACING
0023 
0024 struct dentry *tracefs_create_file(const char *name, umode_t mode,
0025                    struct dentry *parent, void *data,
0026                    const struct file_operations *fops);
0027 
0028 struct dentry *tracefs_create_dir(const char *name, struct dentry *parent);
0029 
0030 void tracefs_remove(struct dentry *dentry);
0031 
0032 struct dentry *tracefs_create_instance_dir(const char *name, struct dentry *parent,
0033                        int (*mkdir)(const char *name),
0034                        int (*rmdir)(const char *name));
0035 
0036 bool tracefs_initialized(void);
0037 
0038 #endif /* CONFIG_TRACING */
0039 
0040 #endif