From 2c3c1048746a4622d8c89a29670120dc8fab93c4 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 20:49:45 +0200 Subject: Adding upstream version 6.1.76. Signed-off-by: Daniel Baumann --- tools/perf/util/cache.h | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 tools/perf/util/cache.h (limited to 'tools/perf/util/cache.h') diff --git a/tools/perf/util/cache.h b/tools/perf/util/cache.h new file mode 100644 index 000000000..9f2e36ef5 --- /dev/null +++ b/tools/perf/util/cache.h @@ -0,0 +1,31 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef __PERF_CACHE_H +#define __PERF_CACHE_H + +#include "strbuf.h" +#include +#include "../ui/ui.h" + +#include +#include + +#define CMD_EXEC_PATH "--exec-path" +#define CMD_DEBUGFS_DIR "--debugfs-dir=" + +#define EXEC_PATH_ENVIRONMENT "PERF_EXEC_PATH" +#define PERF_DEBUGFS_ENVIRONMENT "PERF_DEBUGFS_DIR" +#define PERF_TRACEFS_ENVIRONMENT "PERF_TRACEFS_DIR" +#define PERF_PAGER_ENVIRONMENT "PERF_PAGER" + +int split_cmdline(char *cmdline, const char ***argv); + +#define alloc_nr(x) (((x)+16)*3/2) + +static inline int is_absolute_path(const char *path) +{ + return path[0] == '/'; +} + +char *mkpath(const char *fmt, ...) __printf(1, 2); + +#endif /* __PERF_CACHE_H */ -- cgit v1.2.3