vmprof-python icon indicating copy to clipboard operation
vmprof-python copied to clipboard

"resolving addr" extremely slow

Open pankajp opened this issue 4 years ago • 1 comments

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 avatar Oct 02 '20 15:10 pankajp

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.

pankajp avatar Oct 27 '20 19:10 pankajp