tracy icon indicating copy to clipboard operation
tracy copied to clipboard

Call stacks just contain addresses with no symbols

Open kevswims opened this issue 1 year ago • 7 comments

I am just getting started with adding Tracy to an application but I am running into some issues getting symbols to show up in the call stack sampling.

All of the call stacks where I have not added any zones look roughly like this with just addresses for the function aside form some of the standard library and kernel calls:

image

If I add in some zones with the ZoneScopedNS function then I can see some of the function names but not any below the function where I put the zone like this:

image

I am building with debug symbols and the binary is not stripped:

ELF 64-bit LSB pie executable, ARM aarch64, version 1 (GNU/Linux), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, BuildID[sha1]=210a9da7fcb856fcbbc3e8b305020ba524dfde2b, for GNU/Linux 3.14.0, with debug_info, not stripped

We are using Tracy as a shared library for this and we are using the capture tool to run the capture since this is on a remote system over a slow network.

Any ideas to try to get this configured to have the full call stack information would be greatly appreciated.

kevswims avatar Aug 30 '23 02:08 kevswims

I am building with debug symbols and the binary is not stripped:

You are getting some data, which indicates that the symbols are available.

Do you allow for the capture to properly finish? Tracy needs some, sometimes significant amount of time to retrieve all the symbol data. If the profiled application calls exit(), or if you abort the capture with ^C, some of the data may be missing.

wolfpld avatar Aug 30 '23 11:08 wolfpld

I am running the capture using capture -o output.tracy -s 5 and waiting for the capture tool to finish. The application stays running after the capture is finished as well.

kevswims avatar Aug 30 '23 14:08 kevswims

You're asking for the connection to be terminated after 5 seconds.

wolfpld avatar Aug 30 '23 14:08 wolfpld

I tried running a 2 minute capture and I get some of the call stacks filled in but there's still a lot that does not seem to be loading. Is there a way to get a short duration capture but still get all of the symbol data or a way to know when all of the symbol data has been loaded?

kevswims avatar Aug 30 '23 15:08 kevswims

Not without fixes to the disconnection behavior.

wolfpld avatar Aug 30 '23 15:08 wolfpld

That's unfortunate. This is on an embedded system and if I run much more than a 3 minute capture I start to run out of memory on the system and even then I'm still not getting most of the symbols from my executable.

Are there some ways to limit what is collected for the call stacks so it only includes certain symbols or other ways to speed this up so I can get the useful parts in the stacks?

kevswims avatar Aug 30 '23 18:08 kevswims

There are various compile-time defines outlined in the manual that can disable this or that, but probably not much that would suit you.

wolfpld avatar Aug 30 '23 18:08 wolfpld