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