1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0-only */ 2*4882a593Smuzhiyun /* 3*4882a593Smuzhiyun * tracefs.h - a pseudo file system for activating tracing 4*4882a593Smuzhiyun * 5*4882a593Smuzhiyun * Based on debugfs by: 2004 Greg Kroah-Hartman <greg@kroah.com> 6*4882a593Smuzhiyun * 7*4882a593Smuzhiyun * Copyright (C) 2014 Red Hat Inc, author: Steven Rostedt <srostedt@redhat.com> 8*4882a593Smuzhiyun * 9*4882a593Smuzhiyun * tracefs is the file system that is used by the tracing infrastructure. 10*4882a593Smuzhiyun */ 11*4882a593Smuzhiyun 12*4882a593Smuzhiyun #ifndef _TRACEFS_H_ 13*4882a593Smuzhiyun #define _TRACEFS_H_ 14*4882a593Smuzhiyun 15*4882a593Smuzhiyun #include <linux/fs.h> 16*4882a593Smuzhiyun #include <linux/seq_file.h> 17*4882a593Smuzhiyun 18*4882a593Smuzhiyun #include <linux/types.h> 19*4882a593Smuzhiyun 20*4882a593Smuzhiyun struct file_operations; 21*4882a593Smuzhiyun 22*4882a593Smuzhiyun #ifdef CONFIG_TRACING 23*4882a593Smuzhiyun 24*4882a593Smuzhiyun struct dentry *tracefs_create_file(const char *name, umode_t mode, 25*4882a593Smuzhiyun struct dentry *parent, void *data, 26*4882a593Smuzhiyun const struct file_operations *fops); 27*4882a593Smuzhiyun 28*4882a593Smuzhiyun struct dentry *tracefs_create_dir(const char *name, struct dentry *parent); 29*4882a593Smuzhiyun 30*4882a593Smuzhiyun void tracefs_remove(struct dentry *dentry); 31*4882a593Smuzhiyun 32*4882a593Smuzhiyun struct dentry *tracefs_create_instance_dir(const char *name, struct dentry *parent, 33*4882a593Smuzhiyun int (*mkdir)(const char *name), 34*4882a593Smuzhiyun int (*rmdir)(const char *name)); 35*4882a593Smuzhiyun 36*4882a593Smuzhiyun bool tracefs_initialized(void); 37*4882a593Smuzhiyun 38*4882a593Smuzhiyun #endif /* CONFIG_TRACING */ 39*4882a593Smuzhiyun 40*4882a593Smuzhiyun #endif 41