Garbage Collector overhead

Questions about YourKit .NET Profiler
Post Reply
kohlerm
Posts: 5
Joined: Mon Sep 19, 2005 11:47 am

Garbage Collector overhead

Post by kohlerm »

Hi,
In sampling mode do the time reported for a method include GC time if a GC happened during the execution of the method?
I assume for tracing mode thats the case, correct?

Regards,
Markus
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Re: Garbage Collector overhead

Post by Anton Katilin »

Hello Markus

It depends on what kind of time is measured for particular method, CPU time or wall time:
http://www.yourkit.com/docs/net60/help/times.jsp

In case of CPU time sampler accounts each thread CPU time spent since previous sample. If thread did not use CPU between samples (e.g. it was paused) nothing will be added.

In case of wall time method time will be increased with the time elapsed since previous sample. So, if there was a pause due to e.g. GC it will be included.

Similar for tracing.

Best regards,
Anton
kohlerm
Posts: 5
Joined: Mon Sep 19, 2005 11:47 am

Re: Garbage Collector overhead

Post by kohlerm »

Thanks Anton!
Regards,
Markus
Post Reply