Quantcast
Channel: Common Language Runtime Internals and Architecture forum
Viewing all articles
Browse latest Browse all 1710

Profiler API - Locks, Threading.Monitor.Enter and Exit

$
0
0

I'm using the Profiler API in a project in order to track the locks made using Monitor.Enter, Monitor.Exit, and the lock keyword. I planned to do this by outputting using a pipe, the events from the FunctionEnter3WithInfo and FunctionLeave3WithInfo callbacks.

These callbacks are called when methods are entered and exited, and appear to be functioning fine regarding their implementation - they generate a large output of methods that had been entered and left, but I'm not receiving callbacks for the following:

ENTER: Monitor.Exit

LEAVE: Monitor.Enter and Monitor.Exit

Oddly enough, I do get receive a callback for entering Monitor.Enter. Other than these problematic methods, I appear to be getting calls from the Profiler API for everything else. 

Is there a known issue regarding these methods not being reported by the API? 

Alternatively, if there's a better way of achieving my goal than the way I'm doing it, feel free to point me in the right direction :)

Thanks,

Olu




Viewing all articles
Browse latest Browse all 1710

Trending Articles