Most of trace code in [native or optimized]

I had googled this same problem before, but couldn't come to a sufficient solution. I don't know why I can't see the code for my application in DotTrace. It's not running on IIS. I right clicked the test, selected profile unit tests, and selected sampling as the option, then clicked run to get the below results:

 

0
2 comments

Hi,

 

High values of native or optimized code is a normal situation in some cases. Did you try to find your methods in the snapshot via search (Ctrl+F)?

And could you please try to profile these unit tests with "Tracing" profiling mode and check if there are methods from the unit tests?

0
Avatar
Permanently deleted user

Hi,

I also see high "Native or optimized code" in the sampling logs which I collected with DotTrace 10.0.2. The application which I am profiling is not running on IIS, it is a Windows application developed with C# but it also has native method calls. Obviously this executable calls methods from many other class libraries (dlls). 

My exact question is the following : I already know which native methods are causing "[Native or optimized code]" section. However, it would be better for my analysis results if the duration of these native method calls could be added to the managed method which calls these native methods. (As I wrote in an example below). Is there any possibility of getting this profiling logs?  PS: I do not want to use "Tracing" instead of "Sampling" profiling mode, because Tracing mode causes longer durations for the scenarios. I need durations that are nearer to the actual duration values.

 

Current behavior:

[NativeOrOptimizedCode] : 9s

[Main] : 8s

 

The way I would prefer seeing in the sampling traces:

[Main] : 17s

     -> foo //The method calling native methods : 9s

     -> foo2 : 8s

 

Regards,

Huseyin

 

 

0

Please sign in to leave a comment.