blob: 9f2e36ef5072e9e8a690cc53fe0c4bee5e6928db [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
John Kacur8b40f522009-09-24 18:02:18 +02002#ifndef __PERF_CACHE_H
3#define __PERF_CACHE_H
Ingo Molnar07800602009-04-20 15:00:56 +02004
Ingo Molnar07800602009-04-20 15:00:56 +02005#include "strbuf.h"
Josh Poimboeuf4b6ab942015-12-15 09:39:39 -06006#include <subcmd/pager.h>
Namhyung Kim59ed16b2012-11-13 22:30:35 +09007#include "../ui/ui.h"
Ingo Molnar07800602009-04-20 15:00:56 +02008
Arnaldo Carvalho de Meloafaed6d2017-06-16 11:57:54 -03009#include <linux/compiler.h>
Josh Poimboeufce990912015-12-15 09:39:33 -060010#include <linux/string.h>
11
Vincent Legollcfed95a2009-10-13 10:18:16 +020012#define CMD_EXEC_PATH "--exec-path"
Vincent Legollcfed95a2009-10-13 10:18:16 +020013#define CMD_DEBUGFS_DIR "--debugfs-dir="
14
Ingo Molnar07800602009-04-20 15:00:56 +020015#define EXEC_PATH_ENVIRONMENT "PERF_EXEC_PATH"
Jason Baron5beeded2009-07-21 14:16:29 -040016#define PERF_DEBUGFS_ENVIRONMENT "PERF_DEBUGFS_DIR"
Steven Rostedt (Red Hat)23773ca2015-02-02 14:35:07 -050017#define PERF_TRACEFS_ENVIRONMENT "PERF_TRACEFS_DIR"
Josh Poimboeuf096d3552015-12-15 09:39:35 -060018#define PERF_PAGER_ENVIRONMENT "PERF_PAGER"
Ingo Molnar07800602009-04-20 15:00:56 +020019
Ingo Molnar07800602009-04-20 15:00:56 +020020int split_cmdline(char *cmdline, const char ***argv);
21
22#define alloc_nr(x) (((x)+16)*3/2)
23
Ingo Molnar07800602009-04-20 15:00:56 +020024static inline int is_absolute_path(const char *path)
25{
26 return path[0] == '/';
27}
Ingo Molnar6f06ccb2009-04-20 15:22:22 +020028
Arnaldo Carvalho de Meloafaed6d2017-06-16 11:57:54 -030029char *mkpath(const char *fmt, ...) __printf(1, 2);
Ingo Molnar6f06ccb2009-04-20 15:22:22 +020030
John Kacur8b40f522009-09-24 18:02:18 +020031#endif /* __PERF_CACHE_H */