How to trace just system call events with ftrace without showing any other functions in the Linux kernel?
问题 For example, to monitor all mkdir calls made, the best I could come up with was: #!/bin/sh set -eux d=debug/tracing mkdir -p debug if ! mountpoint -q debug; then mount -t debugfs nodev debug fi # Stop tracing. echo 0 > "${d}/tracing_on" # Clear previous traces. echo > "${d}/trace" # Enable tracing mkdir echo sys_enter_mkdir > "${d}/set_event" # Set tracer type. echo function > "${d}/current_tracer" # Filter only sys_mkdir as a workaround. echo SyS_mkdir > "${d}/set_ftrace_filter" # Start