Is there a .NET performance counter to show the rate of p/invoke calls made? I've just noticed that the application I'm debugging was making a call into native code from managed land within a tight loop. The intended implementation was for a p/invoke call to be made once and then cached. I'm wondering if I could have noticed this mistake via a CLR Interop or Remoting .NET performance counter. Any ideas?
views:
289answers:
1
+2
A:
Try the ".NET CLR Interop" for "# of marshalling" performance counter.
See this article for more http://msdn.microsoft.com/en-us/library/ms998551.aspx.
Bob King
2008-09-19 19:57:57
Many of the pinvoke calls don't have parameters to be marshaled; Do you know if the "# of marshalling" counter is affected then?
Jeffrey LeCours
2008-09-19 20:04:21
Unfortunately, I haven't used it enough to know for sure.
Bob King
2008-09-22 20:31:05