Greg Kroah-Hartman | b244131 | 2017-11-01 15:07:57 +0100 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
John Kacur | 8b40f52 | 2009-09-24 18:02:18 +0200 | [diff] [blame] | 2 | #ifndef __PERF_CACHE_H |
| 3 | #define __PERF_CACHE_H |
Ingo Molnar | 0780060 | 2009-04-20 15:00:56 +0200 | [diff] [blame] | 4 | |
Ingo Molnar | 0780060 | 2009-04-20 15:00:56 +0200 | [diff] [blame] | 5 | #include "strbuf.h" |
Josh Poimboeuf | 4b6ab94 | 2015-12-15 09:39:39 -0600 | [diff] [blame] | 6 | #include <subcmd/pager.h> |
Namhyung Kim | 59ed16b | 2012-11-13 22:30:35 +0900 | [diff] [blame] | 7 | #include "../ui/ui.h" |
Ingo Molnar | 0780060 | 2009-04-20 15:00:56 +0200 | [diff] [blame] | 8 | |
Arnaldo Carvalho de Melo | afaed6d | 2017-06-16 11:57:54 -0300 | [diff] [blame] | 9 | #include <linux/compiler.h> |
Josh Poimboeuf | ce99091 | 2015-12-15 09:39:33 -0600 | [diff] [blame] | 10 | #include <linux/string.h> |
| 11 | |
Vincent Legoll | cfed95a | 2009-10-13 10:18:16 +0200 | [diff] [blame] | 12 | #define CMD_EXEC_PATH "--exec-path" |
Vincent Legoll | cfed95a | 2009-10-13 10:18:16 +0200 | [diff] [blame] | 13 | #define CMD_DEBUGFS_DIR "--debugfs-dir=" |
| 14 | |
Ingo Molnar | 0780060 | 2009-04-20 15:00:56 +0200 | [diff] [blame] | 15 | #define EXEC_PATH_ENVIRONMENT "PERF_EXEC_PATH" |
Jason Baron | 5beeded | 2009-07-21 14:16:29 -0400 | [diff] [blame] | 16 | #define PERF_DEBUGFS_ENVIRONMENT "PERF_DEBUGFS_DIR" |
Steven Rostedt (Red Hat) | 23773ca | 2015-02-02 14:35:07 -0500 | [diff] [blame] | 17 | #define PERF_TRACEFS_ENVIRONMENT "PERF_TRACEFS_DIR" |
Josh Poimboeuf | 096d355 | 2015-12-15 09:39:35 -0600 | [diff] [blame] | 18 | #define PERF_PAGER_ENVIRONMENT "PERF_PAGER" |
Ingo Molnar | 0780060 | 2009-04-20 15:00:56 +0200 | [diff] [blame] | 19 | |
Ingo Molnar | 0780060 | 2009-04-20 15:00:56 +0200 | [diff] [blame] | 20 | int split_cmdline(char *cmdline, const char ***argv); |
| 21 | |
| 22 | #define alloc_nr(x) (((x)+16)*3/2) |
| 23 | |
Ingo Molnar | 0780060 | 2009-04-20 15:00:56 +0200 | [diff] [blame] | 24 | static inline int is_absolute_path(const char *path) |
| 25 | { |
| 26 | return path[0] == '/'; |
| 27 | } |
Ingo Molnar | 6f06ccb | 2009-04-20 15:22:22 +0200 | [diff] [blame] | 28 | |
Arnaldo Carvalho de Melo | afaed6d | 2017-06-16 11:57:54 -0300 | [diff] [blame] | 29 | char *mkpath(const char *fmt, ...) __printf(1, 2); |
Ingo Molnar | 6f06ccb | 2009-04-20 15:22:22 +0200 | [diff] [blame] | 30 | |
John Kacur | 8b40f52 | 2009-09-24 18:02:18 +0200 | [diff] [blame] | 31 | #endif /* __PERF_CACHE_H */ |