cache.h 737 B

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