1

I'm trying to use the Google Performance Tools, specifically the official release in the 64-bit Ubuntu 14.04 repository, to debug an application and its associated .so library.

Running with minimal changes, just ensuring -g is set, gets me a trace, but only a few symbols from the main executable. Adding ProfilerRegisterThread() to the threads in the library as suggested in the rather minimal documentation actually makes things worse, with even fewer symbols being output, just the hex addresses.

How does one go about profiling threads in libraries properly?

Ken Y-N
  • 14,644
  • 21
  • 71
  • 114

1 Answers1

0

pprof uses addr2line for address to symbol resolution. addr2line will not work if ASLR is enabled. Try disabling ASLR.

Another possibility is to implement the HTTP server interface for pprof and use something like libbacktrace to implement address to symbol resolution.

Erwan Legrand
  • 4,148
  • 26
  • 26