I have a Visual Studio project that contains a C# windows application which references an F# class. When I run the Visual Studio 2010 performance profiler in instrumentation mode I get no instrumentation information for the F# class other than where it was called by the C# application.
When I run in sampling mode it works fine.
I’ve tried running the project in VS2012 and get the same issue.
How do I get Visual Studio to show the instrumentation info for the F# class?
When you run in instrumentation mode, the profiler injects a bit of code at the entry/exit points of every method to record the performance data; however, it only injects this profiling code into the assembly you're actually profiling (e.g., your C# application) and not any of the referenced assemblies.
So, you need to profile the F# assembly directly. I'll assume it's a library, in which case you need to specify your C# application as the start program -- so the profiler will start the C# app but will actually instrument and profile the F# library. See the MSDN article How to: Specify the Binary to Start for the settings to do this.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With