xref: /openbmc/linux/tools/perf/util/cache.h (revision 2612e3bbc0386368a850140a6c9b990cd496a5ec)
1b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */
28b40f521SJohn Kacur #ifndef __PERF_CACHE_H
38b40f521SJohn Kacur #define __PERF_CACHE_H
486470930SIngo Molnar 
586470930SIngo Molnar #include "strbuf.h"
64b6ab94eSJosh Poimboeuf #include <subcmd/pager.h>
759ed16b3SNamhyung Kim #include "../ui/ui.h"
886470930SIngo 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 
1586470930SIngo 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"
1986470930SIngo Molnar 
2086470930SIngo Molnar int split_cmdline(char *cmdline, const char ***argv);
2186470930SIngo Molnar 
2286470930SIngo Molnar #define alloc_nr(x) (((x)+16)*3/2)
2386470930SIngo Molnar 
is_absolute_path(const char * path)2486470930SIngo Molnar static inline int is_absolute_path(const char *path)
2586470930SIngo Molnar {
2686470930SIngo Molnar 	return path[0] == '/';
2786470930SIngo Molnar }
2886470930SIngo Molnar 
29*370ce164SIan Rogers char *mkpath(char *path_buf, size_t sz, const char *fmt, ...) __printf(3, 4);
3086470930SIngo Molnar 
318b40f521SJohn Kacur #endif /* __PERF_CACHE_H */
32