LLNL / GOTCHA

GOTCHA is a library for wrapping function calls in shared libraries
https://gotcha.readthedocs.io/en/latest/
Other
71 stars 21 forks source link

Bugfix for 146 #147

Closed hariharan-devarajan closed 7 months ago

hariharan-devarajan commented 7 months ago

We need a variable to track if we updated the library's symbol table. If not we should not use them in dlsym. #146

@bertwesarg can u see if this works.

I think, what the app should do is wrap after the library is loaded.

bertwesarg commented 7 months ago

This works with my examples, including the second when removing the filtering. Will test this with the real tool tomorrow. Thanks.

I think, what the app should do is wrap after the library is loaded.

I think I cannot control this. We do the wrapping in a constructor before main, whether the app is actually using OpenCL is not known at this point, and waiting for the first use is not possible without wrapping in place.

hariharan-devarajan commented 7 months ago

I am not still satisfied with this. I think there is some code which already does this. I will dig into it more :)

hariharan-devarajan commented 7 months ago

I will try a second approach and see which I like the most. Will share once I have something .

hariharan-devarajan commented 7 months ago

Closing this PR as #148 is a better solution.