Commit | Line | Data |
---|---|---|
834978fd | 1 | /* |
ab5be9fa | 2 | * Copyright (C) 2014 David Goulet <dgoulet@efficios.com> |
834978fd | 3 | * |
ab5be9fa | 4 | * SPDX-License-Identifier: GPL-2.0-only |
834978fd | 5 | * |
834978fd DG |
6 | */ |
7 | ||
0dbc2034 GB |
8 | #ifndef LTTNG_SYSCALL_H |
9 | #define LTTNG_SYSCALL_H | |
834978fd | 10 | |
c9e313bc | 11 | #include <common/hashtable/hashtable.hpp> |
834978fd DG |
12 | #include <lttng/event.h> |
13 | ||
c9e313bc | 14 | #include "trace-kernel.hpp" |
834978fd DG |
15 | |
16 | /* | |
17 | * Default size of the kernel system call array. With this size, we usually | |
18 | * reallocate twice considering a 32 bit compat layer also. | |
19 | */ | |
20 | #define SYSCALL_TABLE_INIT_SIZE 256 | |
21 | ||
22 | /* Maximum length of a syscall name. */ | |
23 | #define SYSCALL_NAME_LEN 255 | |
24 | ||
25 | /* | |
26 | * Represent a kernel syscall and used when we are populating the internal | |
27 | * list. | |
28 | */ | |
29 | struct syscall { | |
30 | uint32_t index; | |
31 | uint32_t bitness; | |
32 | char name[SYSCALL_NAME_LEN]; | |
33 | /* Used by the list syscalls command. */ | |
34 | struct lttng_ht_node_str node; | |
35 | }; | |
36 | ||
37 | /* | |
38 | * Allocated once when listing all syscalls at boot time. This is an array | |
39 | * indexed by the syscall index provided in the listing. | |
40 | */ | |
41 | extern struct syscall *syscall_table; | |
42 | ||
43 | /* Use to list kernel system calls. */ | |
7d268848 | 44 | int syscall_init_table(int tracer_fd); |
834978fd | 45 | ssize_t syscall_table_list(struct lttng_event **events); |
834978fd | 46 | |
0dbc2034 | 47 | #endif /* LTTNG_SYSCALL_H */ |