Linux Audio

Check our new training course

Loading...
v5.4
 1/* SPDX-License-Identifier: GPL-2.0 */
 2#ifndef __PERF_CACHE_H
 3#define __PERF_CACHE_H
 4
 5#include "strbuf.h"
 6#include <subcmd/pager.h>
 7#include "../ui/ui.h"
 8
 9#include <linux/compiler.h>
10#include <linux/string.h>
11
12#define CMD_EXEC_PATH "--exec-path"
13#define CMD_DEBUGFS_DIR "--debugfs-dir="
14
15#define EXEC_PATH_ENVIRONMENT "PERF_EXEC_PATH"
16#define PERF_DEBUGFS_ENVIRONMENT "PERF_DEBUGFS_DIR"
17#define PERF_TRACEFS_ENVIRONMENT "PERF_TRACEFS_DIR"
18#define PERF_PAGER_ENVIRONMENT "PERF_PAGER"
19
 
20int split_cmdline(char *cmdline, const char ***argv);
21
22#define alloc_nr(x) (((x)+16)*3/2)
23
24static inline int is_absolute_path(const char *path)
25{
26	return path[0] == '/';
27}
28
29char *mkpath(const char *fmt, ...) __printf(1, 2);
30
31#endif /* __PERF_CACHE_H */
v4.10.11
 
 1#ifndef __PERF_CACHE_H
 2#define __PERF_CACHE_H
 3
 4#include "strbuf.h"
 5#include <subcmd/pager.h>
 6#include "../ui/ui.h"
 7
 
 8#include <linux/string.h>
 9
10#define CMD_EXEC_PATH "--exec-path"
11#define CMD_DEBUGFS_DIR "--debugfs-dir="
12
13#define EXEC_PATH_ENVIRONMENT "PERF_EXEC_PATH"
14#define PERF_DEBUGFS_ENVIRONMENT "PERF_DEBUGFS_DIR"
15#define PERF_TRACEFS_ENVIRONMENT "PERF_TRACEFS_DIR"
16#define PERF_PAGER_ENVIRONMENT "PERF_PAGER"
17
18char *alias_lookup(const char *alias);
19int split_cmdline(char *cmdline, const char ***argv);
20
21#define alloc_nr(x) (((x)+16)*3/2)
22
23static inline int is_absolute_path(const char *path)
24{
25	return path[0] == '/';
26}
27
28char *mkpath(const char *fmt, ...) __attribute__((format (printf, 1, 2)));
29
30#endif /* __PERF_CACHE_H */