0

So, I'm profiling my application, and I'm getting 30% exclusive samples on System.Windows.Forms.Application.Run, of which almost the entirety is on "Function Body". However, I can't see what is exactly happening there, as Visual Studio tells me "Matching symbols could not be found".

I've tried adding manually the System.Windows.Forms.pdb file, which's pathI got from Debug->Windows->Modules, to Options->Debug->Symbols, to no avail.

I also generated the respective pdb file and added it similarly, with no luck.

I've also tried setting Debugging->General->Enable .Net FrameWork Source stepping to true, and disabled Just My Code, in the same menu. No luck at all

Is there any way this can be done? I really want to know what the hell is happening in that function body that's taking a third of CPU time.

Matt Johnson-Pint
  • 230,703
  • 74
  • 448
  • 575
user3742604
  • 97
  • 1
  • 1
  • 8
  • What is the namespace/assembly the function is in? – Cyral Jun 10 '15 at 00:07
  • I believe it's in System.Windows.Forms, as I get from here: https://msdn.microsoft.com/en-us/library/ms157902%28v=vs.110%29.aspx – user3742604 Jun 10 '15 at 00:13
  • Most of your time inside of `Application.Run` is a **good thing**, that means the code is in the message pump and not executing event handlers in your code. 30% is a very low number, I would expect 80 or 90% in a "well behaved" program. I would look at your event handlers and see which one is taking up most of the time and fix that. – Scott Chamberlain Jun 10 '15 at 01:03
  • Thank you for your answer. I find that curious though. I mean shouldn't the majority of the time be spent calculating what I told it to calculate? Anyhow, how can I see which event Handler is taking most of the time? – user3742604 Jun 10 '15 at 10:27
  • Ok, I got it, I understand now better. The Application.Run after all is taking 99,5% of the inclusive samples, so I guess that's a good thing. However, it still is taking 28% of the exclusive samples. What exactly could this mean? – user3742604 Jun 10 '15 at 10:36

0 Answers0