diff options
author | Jani Nikula <jani.nikula@intel.com> | 2017-09-28 15:56:49 +0300 |
---|---|---|
committer | Jani Nikula <jani.nikula@intel.com> | 2017-09-28 15:56:49 +0300 |
commit | 32f35b863451884e856f0f577474740561a87fad (patch) | |
tree | 2d1d55c7e2d23e27197bf84246c5f23070eb0fce /tools/perf/util/syscalltbl.c | |
parent | ae7617f0ef1820be033eef93859a6bb6174a843f (diff) | |
parent | 754270c7c56292e97d0eff924a5d5d83f92add07 (diff) | |
download | op-kernel-dev-32f35b863451884e856f0f577474740561a87fad.zip op-kernel-dev-32f35b863451884e856f0f577474740561a87fad.tar.gz |
Merge drm-upstream/drm-next into drm-intel-next-queued
Need MST sideband message transaction to power up/down nodes.
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Diffstat (limited to 'tools/perf/util/syscalltbl.c')
-rw-r--r-- | tools/perf/util/syscalltbl.c | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/tools/perf/util/syscalltbl.c b/tools/perf/util/syscalltbl.c index bbb4c19..19e5db9 100644 --- a/tools/perf/util/syscalltbl.c +++ b/tools/perf/util/syscalltbl.c @@ -19,6 +19,7 @@ #ifdef HAVE_SYSCALL_TABLE #include <linux/compiler.h> #include <string.h> +#include "string2.h" #include "util.h" #if defined(__x86_64__) @@ -105,6 +106,27 @@ int syscalltbl__id(struct syscalltbl *tbl, const char *name) return sc ? sc->id : -1; } +int syscalltbl__strglobmatch_next(struct syscalltbl *tbl, const char *syscall_glob, int *idx) +{ + int i; + struct syscall *syscalls = tbl->syscalls.entries; + + for (i = *idx + 1; i < tbl->syscalls.nr_entries; ++i) { + if (strglobmatch(syscalls[i].name, syscall_glob)) { + *idx = i; + return syscalls[i].id; + } + } + + return -1; +} + +int syscalltbl__strglobmatch_first(struct syscalltbl *tbl, const char *syscall_glob, int *idx) +{ + *idx = -1; + return syscalltbl__strglobmatch_next(tbl, syscall_glob, idx); +} + #else /* HAVE_SYSCALL_TABLE */ #include <libaudit.h> @@ -131,4 +153,15 @@ int syscalltbl__id(struct syscalltbl *tbl, const char *name) { return audit_name_to_syscall(name, tbl->audit_machine); } + +int syscalltbl__strglobmatch_next(struct syscalltbl *tbl __maybe_unused, + const char *syscall_glob __maybe_unused, int *idx __maybe_unused) +{ + return -1; +} + +int syscalltbl__strglobmatch_first(struct syscalltbl *tbl, const char *syscall_glob, int *idx) +{ + return syscalltbl__strglobmatch_next(tbl, syscall_glob, idx); +} #endif /* HAVE_SYSCALL_TABLE */ |