This error occurs because the syntax of the echo command is incorrect. The kprobe_events file in the tracing directory is used to create kernel probes, which can be used to trace function calls and other events in the kernel.

The correct syntax for adding a new kprobe event is:

echo 'p:kprobe_event_name symbol_name' > /sys/kernel/debug/tracing/kprobe_events

In this case, the event name is 'p:th1nk_test sys_enter_splice', and the symbol name is 'sys_enter_splice'. However, there are additional commands in the echo statement that are not part of the valid syntax for a kprobe event, which is causing the "Invalid argument" error.

To fix this issue, remove the additional commands and use the correct syntax for adding a kprobe event:

echo 'p:th1nk_test sys_enter_splice' > /sys/kernel/debug/tracing/kprobe_events

This will create a new kprobe event called 'th1nk_test sys_enter_splice' that will trace the sys_enter_splice function.

echo pth1nk_test sys_enter_splice struct file di-f_pathdentry-d_namename=struct file di-f_pathdentry-d_iname; struct pipe_inode_info si-name=struct pipe_inode_info si-files0-f_pathdentry-d_namename; l

原文地址: https://www.cveoy.top/t/topic/bsmz 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录