Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to trace syscall via ftrace

I'm using ftrace to get trace for sys_read call in kernel. With function or graph tracers, setting set_ftrace_filter to sys_write fails

# echo sys_read > tracing/set_ftrace_filter                                                                                                                                            
-sh: echo: write error: Invalid argument

Here are my ftrace kconfigs

# zcat /proc/config.gz | grep -i ftrace
CONFIG_HAVE_DYNAMIC_FTRACE=y
CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
CONFIG_FTRACE=y
CONFIG_FTRACE_SYSCALLS=y
CONFIG_DYNAMIC_FTRACE=y
CONFIG_FTRACE_MCOUNT_RECORD=y
# CONFIG_FTRACE_STARTUP_TEST is not set        

I do not have sys_read or sys_write in available_filter_functions as well. I'm using 3.14 kernel on an arm platform. Please help.

like image 993
3uphoric Avatar asked Oct 27 '25 09:10

3uphoric


1 Answers

If you haven't figured already

# egrep -i "^sys_read$|^sys_write$" tracing/available_filter_functions
SyS_read
SyS_write
like image 152
VenkatC Avatar answered Oct 29 '25 00:10

VenkatC



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!