Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between ftrace and strace in Linux

Tags:

linux

both strace and ftrace seem to be used for tracing function calls in Linux. What's the difference?

like image 671
FlyGuy352 Avatar asked May 23 '26 18:05

FlyGuy352


1 Answers

strace is a utility which allows you to trace the system calls that an application makes. When an application makes a system call, it is basically asking the kernel to do something, eg file access. Use the command man strace to get strace documentation and man syscalls to get information on system calls.

ftrace is a tool used during kernel development and allows the developer to see what functions are being called within the kernel. The documentation is here and states:

Ftrace is an internal tracer designed to help out developers and designers of systems to find what is going on inside the kernel. It can be used for debugging or analyzing latencies and performance issues that take place outside of user-space.

like image 138
Graeme Avatar answered May 26 '26 08:05

Graeme



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!