forked from Minki/linux
89be3f8ab7
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>
24 lines
625 B
C
24 lines
625 B
C
#ifndef __PERF_SYSCALLTBL_H
|
|
#define __PERF_SYSCALLTBL_H
|
|
|
|
struct syscalltbl {
|
|
union {
|
|
int audit_machine;
|
|
struct {
|
|
int nr_entries;
|
|
void *entries;
|
|
} syscalls;
|
|
};
|
|
};
|
|
|
|
struct syscalltbl *syscalltbl__new(void);
|
|
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 */
|