summaryrefslogtreecommitdiff
path: root/tools/perf/util/syscalltbl.h
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2017-08-31 17:46:49 +0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2017-09-01 20:45:48 +0300
commit89be3f8ab701180fc0329eff1b076528d64ac56b (patch)
tree05c3a7faa503e8d94b9e13c6a7b0d5e5339b9490 /tools/perf/util/syscalltbl.h
parentc4ee06251d4212a0d55e2371f2db464f6a1e0901 (diff)
downloadlinux-89be3f8ab701180fc0329eff1b076528d64ac56b.tar.xz
perf syscalltbl: Support glob matching on syscall names
With two new methods, one to find the first match, returning its syscall id and its index in whatever internal database it keeps the syscall into, then one to find the next match, if any. Implemented only on arches where we actually read the syscall table from the kernel sources, i.e. x86-64 for now, all the others use the libaudit method for which this returns -1, i.e. just stubs were added, with the actual implementation using whatever libaudit functions for matching that may be available. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Wang Nan <wangnan0@huawei.com> Link: http://lkml.kernel.org/n/tip-i0sj4rxk1a63pfe9gl8z8irs@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/syscalltbl.h')
-rw-r--r--tools/perf/util/syscalltbl.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/perf/util/syscalltbl.h b/tools/perf/util/syscalltbl.h
index e2951510484f..e9fb8786da7c 100644
--- a/tools/perf/util/syscalltbl.h
+++ b/tools/perf/util/syscalltbl.h
@@ -17,4 +17,7 @@ void syscalltbl__delete(struct syscalltbl *tbl);
const char *syscalltbl__name(const struct syscalltbl *tbl, int id);
int syscalltbl__id(struct syscalltbl *tbl, const char *name);
+int syscalltbl__strglobmatch_first(struct syscalltbl *tbl, const char *syscall_glob, int *idx);
+int syscalltbl__strglobmatch_next(struct syscalltbl *tbl, const char *syscall_glob, int *idx);
+
#endif /* __PERF_SYSCALLTBL_H */