0

I played a bit with strace and ltrace These are wonderful tools. Is there any tool that does the same with the functions of my applications?

I am aware of system tap and ftrace but these require the debug version of the kernel that is something I cant' install at the moment. I don't need kernel or system calls tracing.

I really need something like strace able to discriminate also across thread and display functions per threads.

Do I really have to implement that by using -finstrument-functions and provide a printf of the function that is called?

 THREAD ID A  function #1
 THREAD ID B  function #2
 THREAD ID A  function #3
 THREAD ID A  function #4
 THREAD ID C  function #5

I read this post as reference

Tool to trace local function calls in Linux

Community
  • 1
  • 1
Abruzzo Forte e Gentile
  • 14,423
  • 28
  • 99
  • 173

1 Answers1

1

Yes, profiling is the only way to do this.

All you will get is the function address, which you can map again to its name by dladdr() API.

All the best!!!!

Saran-san
  • 361
  • 3
  • 14