1b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */ 28b40f521SJohn Kacur #ifndef __PERF_CACHE_H 38b40f521SJohn Kacur #define __PERF_CACHE_H 407800601SIngo Molnar 507800601SIngo Molnar #include "strbuf.h" 64b6ab94eSJosh Poimboeuf #include <subcmd/pager.h> 759ed16b3SNamhyung Kim #include "../ui/ui.h" 807800601SIngo Molnar 9afaed6d3SArnaldo Carvalho de Melo #include <linux/compiler.h> 10ce990917SJosh Poimboeuf #include <linux/string.h> 11ce990917SJosh Poimboeuf 12cfed95a6SVincent Legoll #define CMD_EXEC_PATH "--exec-path" 13cfed95a6SVincent Legoll #define CMD_DEBUGFS_DIR "--debugfs-dir=" 14cfed95a6SVincent Legoll 1507800601SIngo Molnar #define EXEC_PATH_ENVIRONMENT "PERF_EXEC_PATH" 165beeded1SJason Baron #define PERF_DEBUGFS_ENVIRONMENT "PERF_DEBUGFS_DIR" 1723773ca1SSteven Rostedt (Red Hat) #define PERF_TRACEFS_ENVIRONMENT "PERF_TRACEFS_DIR" 18096d3558SJosh Poimboeuf #define PERF_PAGER_ENVIRONMENT "PERF_PAGER" 1907800601SIngo Molnar 2007800601SIngo Molnar int split_cmdline(char *cmdline, const char ***argv); 2107800601SIngo Molnar 2207800601SIngo Molnar #define alloc_nr(x) (((x)+16)*3/2) 2307800601SIngo Molnar is_absolute_path(const char * path)2407800601SIngo Molnarstatic inline int is_absolute_path(const char *path) 2507800601SIngo Molnar { 2607800601SIngo Molnar return path[0] == '/'; 2707800601SIngo Molnar } 286f06ccbcSIngo Molnar 29*370ce164SIan Rogers char *mkpath(char *path_buf, size_t sz, const char *fmt, ...) __printf(3, 4); 306f06ccbcSIngo Molnar 318b40f521SJohn Kacur #endif /* __PERF_CACHE_H */ 32