Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 #ifndef PERF_STRING_H
0003 #define PERF_STRING_H
0004 
0005 #include <linux/string.h>
0006 #include <linux/types.h>
0007 #include <sys/types.h> // pid_t
0008 #include <stddef.h>
0009 #include <string.h>
0010 
0011 extern const char *graph_dotted_line;
0012 extern const char *dots;
0013 
0014 s64 perf_atoll(const char *str);
0015 bool strglobmatch(const char *str, const char *pat);
0016 bool strglobmatch_nocase(const char *str, const char *pat);
0017 bool strlazymatch(const char *str, const char *pat);
0018 static inline bool strisglob(const char *str)
0019 {
0020     return strpbrk(str, "*?[") != NULL;
0021 }
0022 int strtailcmp(const char *s1, const char *s2);
0023 
0024 char *asprintf_expr_inout_ints(const char *var, bool in, size_t nints, int *ints);
0025 
0026 static inline char *asprintf_expr_in_ints(const char *var, size_t nints, int *ints)
0027 {
0028     return asprintf_expr_inout_ints(var, true, nints, ints);
0029 }
0030 
0031 static inline char *asprintf_expr_not_in_ints(const char *var, size_t nints, int *ints)
0032 {
0033     return asprintf_expr_inout_ints(var, false, nints, ints);
0034 }
0035 
0036 char *asprintf__tp_filter_pids(size_t npids, pid_t *pids);
0037 
0038 char *strpbrk_esc(char *str, const char *stopset);
0039 char *strdup_esc(const char *str);
0040 
0041 unsigned int hex(char c);
0042 
0043 #endif /* PERF_STRING_H */