* How to show kernel side function invocations?
@ 2018-03-30 15:48 Shiyao MA
2018-04-01 5:27 ` Daniel Meir Doron
2018-04-05 16:00 ` Serhei Makarov
0 siblings, 2 replies; 3+ messages in thread
From: Shiyao MA @ 2018-03-30 15:48 UTC (permalink / raw)
To: systemtap
Hi,
Suppose I run the command `ls'.
Strace only shows the syscall invocations.
Is it possible to show all the functions invoked at the kernel land
with the help of systemtap?
--
Best,
Shiyao
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: How to show kernel side function invocations?
2018-03-30 15:48 How to show kernel side function invocations? Shiyao MA
@ 2018-04-01 5:27 ` Daniel Meir Doron
2018-04-05 16:00 ` Serhei Makarov
1 sibling, 0 replies; 3+ messages in thread
From: Daniel Meir Doron @ 2018-04-01 5:27 UTC (permalink / raw)
To: Shiyao MA; +Cc: systemtap
Hi,
There are many examples in systemtap to probe kernel side of things. You
can find them here: https://sourceware.org/systemtap/examples/
Here is an example of strace on kernel side:
https://sourceware.org/systemtap/examples/process/strace.stp
There are many options like printing backtrace (
https://sourceware.org/systemtap/examples/profiling/pf4.stp) and so much
more...
Daniel.
On Fri, Mar 30, 2018 at 6:47 PM, Shiyao MA <i@introo.me> wrote:
> Hi,
>
> Suppose I run the command `ls'.
>
> Strace only shows the syscall invocations.
>
> Is it possible to show all the functions invoked at the kernel land
> with the help of systemtap?
>
>
>
> --
> Best,
> Shiyao
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: How to show kernel side function invocations?
2018-03-30 15:48 How to show kernel side function invocations? Shiyao MA
2018-04-01 5:27 ` Daniel Meir Doron
@ 2018-04-05 16:00 ` Serhei Makarov
1 sibling, 0 replies; 3+ messages in thread
From: Serhei Makarov @ 2018-04-05 16:00 UTC (permalink / raw)
To: systemtap
> 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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-04-05 16:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-30 15:48 How to show kernel side function invocations? Shiyao MA
2018-04-01 5:27 ` Daniel Meir Doron
2018-04-05 16:00 ` Serhei Makarov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).