Debugging Linux Kernel Using SystemTap Part-4 - Wildcards
Syntax to probe for all function entries and exits of a single file:
probe kernel.function("*@filename").call {
....
}
probe kernel.function("*@filename").return {
...
}
Example: Let's probe all the functions of kernel/signal.c
probe kernel.function("*@kernel/signal.c").call {
printf("%s\n", ppfunc());
}
probe kernel.function("*@kernel/signal.c").return {
printf("%s\n", ppfunc());
}
ppfunc() prints the function name which is probed.
Partial O/P:
probe kernel.function("*@filename").call {
....
}
probe kernel.function("*@filename").return {
...
}
Example: Let's probe all the functions of kernel/signal.c
probe kernel.function("*@kernel/signal.c").call {
printf("%s\n", ppfunc());
}
probe kernel.function("*@kernel/signal.c").return {
printf("%s\n", ppfunc());
}
ppfunc() prints the function name which is probed.
Partial O/P:
Wildcards in filename:
We can also put wildcards in the file name:
E.g.: probe kernel.function("*@kernel/sys*.c") { printf("%s\n", ppfunc()) } will probe for all the functions present in kernel/sys.c, kernel/sysctl.c, kernel/sysctl_binary.c
Wildcard in Function Names:
probe kernel.function("*open*) { printf("%s\n", ppfunc()) } will probe for all the open functions.
Hey, thanks for the blog article.Really thank you! Great.
ReplyDeleteweb methods training
web methods online training
Best institute for Commerce students
ReplyDeletebest ca colleges in hyderabad
best mec inter colleges in hyderabad
best cec inter colleges in hyderabad
best cma colleges in hyderabad
best degree colleges in hyderabad
best cs colleges in hyderabad