tracefs.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /*
  2. * tracefs.h - a pseudo file system for activating tracing
  3. *
  4. * Based on debugfs by: 2004 Greg Kroah-Hartman <greg@kroah.com>
  5. *
  6. * Copyright (C) 2014 Red Hat Inc, author: Steven Rostedt <srostedt@redhat.com>
  7. *
  8. * This program is free software; you can redistribute it and/or
  9. * modify it under the terms of the GNU General Public License version
  10. * 2 as published by the Free Software Foundation.
  11. *
  12. * tracefs is the file system that is used by the tracing infrastructure.
  13. *
  14. */
  15. #ifndef _TRACEFS_H_
  16. #define _TRACEFS_H_
  17. #include <linux/fs.h>
  18. #include <linux/seq_file.h>
  19. #include <linux/types.h>
  20. struct file_operations;
  21. #ifdef CONFIG_TRACING
  22. struct dentry *tracefs_create_file(const char *name, umode_t mode,
  23. struct dentry *parent, void *data,
  24. const struct file_operations *fops);
  25. struct dentry *tracefs_create_dir(const char *name, struct dentry *parent);
  26. void tracefs_remove(struct dentry *dentry);
  27. void tracefs_remove_recursive(struct dentry *dentry);
  28. struct dentry *tracefs_create_instance_dir(const char *name, struct dentry *parent,
  29. int (*mkdir)(const char *name),
  30. int (*rmdir)(const char *name));
  31. bool tracefs_initialized(void);
  32. #endif /* CONFIG_TRACING */
  33. #endif