tracefs.h 1018 B

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