[Garbage collection] Entry in Call Stack

Hi All,

One of our teams used dotTrace to run profiles and noticed that one of the Dispose methods was pegged at 100%. Here's the screenshot:

The other 2 screenshots showed the percentage at between 6-8%. But in all 3 cases, the reported time was between 6k and 8k milliseonds - which is excessively high! I ran a number of tests, including synthetic stress + real-world tests, and cannot reproduce anything remotely close to this.  I did, however, want to confirm precisely what the "[Garbage collection]" line represents. I eventually found a SO post that asked a very similar question but there wasn't a clear response...

https://stackoverflow.com/questions/3618322/what-does-dottrace-performance-profiler-mean-by-garbage-collection 

With that said, I was hoping somebody could address these questions:

  • Does "[Garbage collection]" represent a GC.Collect call by the runtime or does it possibly indicate that it was forced by dotTrace?
  • A code review for the Dispose method in question shows nothing noteworthy. My only plausible explanation is that the system in question was excessively bogged down (CPU or memory) or may be related to dotTrace itself. Does anybody agree/disagree?

Thanks!

0
1 comment

Hi Scott,

[Garbage collection] node, in this case, represents a time which was spent by your application on garbage collection (under this call stack). dotTrace doesn't force a GC.

I would recommend using Timeline profiling mode in this case; it is more useful and convenient for investigating issues with GC. Please see https://www.jetbrains.com/help/profiler/CLR_Activity.html and https://www.jetbrains.com/help/profiler/Optimize_App_Performance_and_Memory_Traffic.html pages for details.

Please let me know if you have additional questions.

0

Please sign in to leave a comment.