Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bin/xcapture-bpf
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def extract_system_call_ids(unistd_64_fh):
for name_prefix in ['__NR_', '__NR3264_']:
for line in unistd_64_fh.readlines():
tokens = line.split()
if tokens and len(tokens) == 3 and tokens[0] == '#define':
if tokens and len(tokens) == 3 and tokens[0] == '#define' and tokens[2].isnumeric() is True:
_, s_name, s_id = tokens
s_id = int(s_id)
if s_name.startswith(name_prefix):
Expand Down
4 changes: 4 additions & 0 deletions bin/xcapture-bpf.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,11 @@ struct thread_state_t {
BPF_HASH(tsa, u32, struct thread_state_t, 16384);

TRACEPOINT_PROBE(raw_syscalls, sys_enter) {
#if defined(__x86_64__)
if (args->id == __NR_poll || args->id == __NR_getrusage)
#elif defined(__aarch64__)
if (args->id == __NR_getrusage)
#endif
return 0;

struct thread_state_t t_empty = {};
Expand Down