Closed gabcavic closed 2 years ago
Hi Gabriele, I think it is a question of whether BFD (binutils) works well under WSL. We have not tried it. Perhaps you could try compiling the code with -gdwarf-4 to see if that helps? Thanks,
On Nov 28, 2022, at 4:01 AM, Gabriele Cavicchioli @.***> wrote:
Good morning to everyone, II've just started using taucmdr and tau to profile my C code and I cannot make it work correctly. I've been running Tau on a WSL2 machine on top of my Windows PC. Particularly tau is not able to resolve the name of the functions being called. If I do not instrument my code at compiler level I get this kind of behaviour when I look at the profile with Paraprof
https://user-images.githubusercontent.com/38323760/204272390-f169f905-ce71-4d03-a71c-3f03c40a298a.png Otherwise, if I instrument my code, then the name are resolved, but the function names are not displayed, only the function addresss in memory as an hexadecimale number.
I understand that Tau may not have the same performance when run on a WSL, however name resolving is fine with simpler tools as gprof. Are there some known issues or limitations that could be the cause of this bug. Do you have any idea how to solve it?
— Reply to this email directly, view it on GitHub https://github.com/ParaToolsInc/taucmdr/issues/419, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAUHIOLUDEOWWBRKXRAOIPLWKSNH7ANCNFSM6AAAAAASNH63H4. You are receiving this because you are subscribed to this thread.
@gabcavic On recent Ubuntu distributions, the gcc compilers bundled with Ubuntu cause gcc to build position-independent executables by default, which breaks symbol resolution in TAU. This may be related to that issue. Can you try changing the Makefile to add the arguments -no-pie -gdwarf-4
to the compiler invocation?
I tried the following combination of compiler flags:
In case 1, I still find the decribed bug, while 2 and 3 both solve the issue as you can see from the image below. It is indeed a problem with the Ubuntu's gcc and not directly connected to WSL.
Thank you very much for your help!
Glad that this fixes the problem! We hope to add support for PIE executables to a future release of TAU.
Let us know if you have any additional questions.
Good morning to everyone, II've just started using taucmdr and tau to profile my C code and I cannot make it work correctly. I've been running Tau on a WSL2 machine on top of my Windows PC. Particularly tau is not able to resolve the name of the functions being called. If I do not instrument my code at compiler level I get this kind of behaviour when I look at the profile with Paraprof
Otherwise, if I instrument my code, then the name are resolved, but the function names are not displayed, only the function addresss in memory as an hexadecimale number.
I understand that Tau may not have the same performance when run on a WSL, however name resolving is fine with simpler tools as gprof. Are there some known issues or limitations that could be the cause of this bug. Do you have any idea how to solve it?