plasma-umass / coz

Coz: Causal Profiling
Other
4.08k stars 159 forks source link

Source files not loaded for 'dlopen'-loaded shared libraries #160

Closed nick-schultz closed 4 years ago

nick-schultz commented 4 years ago

I have an application whose main function manually loads a shared library via dlopen and calls its entry point function.

The profile.coz is showing both throughput and latency points, however the source line is only ever the main function.

How do I get the coz profiler to also include the source files from the loaded shared library?

emeryberger commented 4 years ago

I was able to reproduce this bug and we'll have to look into it. In the meanwhile, there's an easy workaround: instead of using the entry point function, export a separate function and invoke it after the dlopen via dlsym. This should work fine.

emeryberger commented 4 years ago

@nick-schultz please let me know if this is a feasible solution for you. Thanks.

nick-schultz commented 4 years ago

Hi @emeryberger , I was able to use the --binary-scope option to search through a directory containing all of the shared libs. This added the missing shared library, as well as other related libs

Thanks.