Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Profiling C# and mscorlib.ni.dll

Tags:

I am currently profiling a console application with CPU sampling. The OS is Windows 8 Enterprise 64 bit with Microsoft Visual Studio Ultimate 2012 Update 4. I see that the 34% of Exclusive Samples is inside the mscorlib.ni.dll. Then on the Modules view I open the mscorlib.ni.dll and I see that all calls are made to unknwon lines.

I downloaded them firstly with ngen following these instruction: http://blogs.msdn.com/b/visualstudioalm/archive/2012/12/10/creating-ngen-pdbs-for-profiling-reports.aspx but with no luck. Despite the presence of the pdb in the correct position and correctly referenced on the VS options.

After this I tried to get all possible symbols with this PS script: http://knagis.miga.lv/gen_ngen_pdb.txt but still no luck. Even if the pdb is (still) there.

Does someone has already had this issue? I have seen another answer Code profiling to improve performance : see CPU cycles inside mscorlib.dll? but does not resolve at all...

Enrico

like image 238
Kendar Avatar asked Apr 16 '14 09:04

Kendar


People also ask

What is profiling in C?

In software engineering, profiling ("program profiling", "software profiling") is a form of dynamic program analysis that measures, for example, the space (memory) or time complexity of a program, the usage of particular instructions, or the frequency and duration of function calls.

What does profiling your code means?

What is code profiling? Code profiling examines the application code to ensure it is optimized, resulting in high application performance. It analyzes the memory, CPU, and network utilized by each software component or routine.

What is profiling in testing?

Profiling is what you do when your performance testing shows a problem. It helps you identify those parts of your system that contribute the most to the performance problem and shows you where to concentrate your efforts.

What is profiling in debugging?

debugging --- getting the code to work as you intended; profiling --- assessing how the code carries out a given scientific task on a given platform and how its performance might be improved; validation --- assessing how accurately the code carries out a given scientific task.


1 Answers

Have a look at the reference project for .net in mscorelib. I am copying the text here:

In order to configure Visual Studio 2013 do the following in the Tools -> Options -> Debugging -> General menu:

  • Disable just my code
  • Disable step over properties and operators
  • Disable require source files to exactly match the original version
  • Enable .NET framework source stepping
  • Enable source server support I can imagine that not all classes are supported, some will have proprietary code in it, however a list of supported DLL's in regards to mscorelib can be found here.

enter image description here

like image 89
Walter Verhoeven Avatar answered Nov 25 '22 03:11

Walter Verhoeven