Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tools/statsnoop: bring back the syscall__ prefix #4668

Merged
merged 1 commit into from
Jul 10, 2023
Merged
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
8 changes: 4 additions & 4 deletions tools/statsnoop.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,12 @@
return 0;
};

int stat_entry(struct pt_regs *ctx, const char __user *filename)
int syscall__stat_entry(struct pt_regs *ctx, const char __user *filename)
{
return trace_entry(ctx, filename);
}

int statx_entry(struct pt_regs *ctx, int dfd, const char __user *filename)
int syscall__statx_entry(struct pt_regs *ctx, int dfd, const char __user *filename)
{
return trace_entry(ctx, filename);
}
Expand Down Expand Up @@ -129,9 +129,9 @@ def try_attach_syscall_probes(syscall):
syscall_fnname = b.get_syscall_fnname(syscall)
if BPF.ksymname(syscall_fnname) != -1:
if syscall == "statx":
b.attach_kprobe(event=syscall_fnname, fn_name="statx_entry")
b.attach_kprobe(event=syscall_fnname, fn_name="syscall__statx_entry")
else:
b.attach_kprobe(event=syscall_fnname, fn_name="stat_entry")
b.attach_kprobe(event=syscall_fnname, fn_name="syscall__stat_entry")
b.attach_kretprobe(event=syscall_fnname, fn_name="trace_return")

try_attach_syscall_probes("stat")
Expand Down