This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: How to show kernel side function invocations?
- From: Serhei Makarov <me at serhei dot io>
- To: systemtap at sourceware dot org
- Date: Thu, 05 Apr 2018 12:00:11 -0400
- Subject: Re: How to show kernel side function invocations?
- References: <CAJQX3Dwt7DWqqvxrHzin+7wh_ZyyC3mYaERa4iX=rueysRxf2g@mail.gmail.com>
> Is it possible to show all the functions invoked at the kernel land
> with the help of systemtap?
Out of the existing example scripts, para-callgraph.stp and para-callgraph-verbose.stp seem to do something similar.
- https://sourceware.org/systemtap/examples/general/para-callgraph.txt
- https://sourceware.org/systemtap/examples/general/para-callgraph.stp
- https://sourceware.org/systemtap/examples/general/para-callgraph-verbose.stp
However, you must select a subset of the functions in kernel to probe (just saying kernel.function("*") will not work, unfortunately) and a particular syscall to examine. Since you can choose functions by file and not just by name, it might still be flexible enough to give you a good trace of what is being done during a syscall if you pick the right files. As in the example:
# stap para-callgraph-verbose.stp 'kernel.function("*@fs/proc*.c")' \
'kernel.function("vfs_read")' -c "cat /proc/sys/vm/* || true"
All the best,
Serhei Makarov