blob: 512c0c83fbc6a9a9ed2a9c996de74ff6fb45eb62 [file] [log] [blame]
John Kacur8b40f522009-09-24 18:02:18 +02001#ifndef __PERF_CACHE_H
2#define __PERF_CACHE_H
Ingo Molnar07800602009-04-20 15:00:56 +02003
Ingo Molnar07800602009-04-20 15:00:56 +02004#include "strbuf.h"
Josh Poimboeuf4b6ab942015-12-15 09:39:39 -06005#include <subcmd/pager.h>
Namhyung Kim59ed16b2012-11-13 22:30:35 +09006#include "../ui/ui.h"
Ingo Molnar07800602009-04-20 15:00:56 +02007
Josh Poimboeufce990912015-12-15 09:39:33 -06008#include <linux/string.h>
9
Vincent Legollcfed95a2009-10-13 10:18:16 +020010#define CMD_EXEC_PATH "--exec-path"
Vincent Legollcfed95a2009-10-13 10:18:16 +020011#define CMD_DEBUGFS_DIR "--debugfs-dir="
12
Ingo Molnar07800602009-04-20 15:00:56 +020013#define EXEC_PATH_ENVIRONMENT "PERF_EXEC_PATH"
Jason Baron5beeded2009-07-21 14:16:29 -040014#define PERF_DEBUGFS_ENVIRONMENT "PERF_DEBUGFS_DIR"
Steven Rostedt (Red Hat)23773ca2015-02-02 14:35:07 -050015#define PERF_TRACEFS_ENVIRONMENT "PERF_TRACEFS_DIR"
Josh Poimboeuf096d3552015-12-15 09:39:35 -060016#define PERF_PAGER_ENVIRONMENT "PERF_PAGER"
Ingo Molnar07800602009-04-20 15:00:56 +020017
Ingo Molnar07800602009-04-20 15:00:56 +020018char *alias_lookup(const char *alias);
19int split_cmdline(char *cmdline, const char ***argv);
20
21#define alloc_nr(x) (((x)+16)*3/2)
22
Ingo Molnar07800602009-04-20 15:00:56 +020023static inline int is_absolute_path(const char *path)
24{
25 return path[0] == '/';
26}
Ingo Molnar6f06ccb2009-04-20 15:22:22 +020027
Arnaldo Carvalho de Melo3938bad2016-03-23 15:06:35 -030028char *mkpath(const char *fmt, ...) __attribute__((format (printf, 1, 2)));
Ingo Molnar6f06ccb2009-04-20 15:22:22 +020029
John Kacur8b40f522009-09-24 18:02:18 +020030#endif /* __PERF_CACHE_H */