cache.h 793 B

123456789101112131415161718192021222324252627282930313233
  1. #ifndef __PERF_CACHE_H
  2. #define __PERF_CACHE_H
  3. #include <stdbool.h>
  4. #include "util.h"
  5. #include "strbuf.h"
  6. #include <subcmd/pager.h>
  7. #include "../perf.h"
  8. #include "../ui/ui.h"
  9. #include <linux/string.h>
  10. #define CMD_EXEC_PATH "--exec-path"
  11. #define CMD_DEBUGFS_DIR "--debugfs-dir="
  12. #define EXEC_PATH_ENVIRONMENT "PERF_EXEC_PATH"
  13. #define PERF_DEBUGFS_ENVIRONMENT "PERF_DEBUGFS_DIR"
  14. #define PERF_TRACEFS_ENVIRONMENT "PERF_TRACEFS_DIR"
  15. #define PERF_PAGER_ENVIRONMENT "PERF_PAGER"
  16. char *alias_lookup(const char *alias);
  17. int split_cmdline(char *cmdline, const char ***argv);
  18. #define alloc_nr(x) (((x)+16)*3/2)
  19. static inline int is_absolute_path(const char *path)
  20. {
  21. return path[0] == '/';
  22. }
  23. char *mkpath(const char *fmt, ...) __attribute__((format (printf, 1, 2)));
  24. #endif /* __PERF_CACHE_H */