vmprof / vmprof-python

vmprof - a statistical program profiler
http://vmprof.com
Other
433 stars 54 forks source link

"resolving addr" extremely slow #226

Open pankajp opened 3 years ago

pankajp commented 3 years ago

In a massive application embedding python written in c++ which links against boost and uses templates heavily, the resolving addr after finishing profiling is extremely slow. One of the runs for example took about 90 seconds to finish, but then resolving about 2000 addrs took 8800 seconds. I see a few very slow symbols, some taking from tens to hundreds of seconds, and the worst one taking about 1800 seconds. Is there a way to make it faster w/o disabling native profiling? If not, maybe implementing a timeout or so of 1s for each symbol resolution make it acceptable.

pankajp commented 3 years ago

As of now, I'm using a workaround of using libdl.dladdr() via ctypes to resolve the symbols, but obviously that does not work for a significant number of cases.