After reading the dottrace documentation I realized that:
- Dead objects are objects deleted before the end point of the snapshot.
- Garbage objects are objects allocated after the starting point and deleted 开发者_高级运维before the end point - in other words, "Garbage objects" is a subset of "Dead objects".
But after doing some profiling sessions, I could see that sometimes the number of "Garbage objects" is by far greater than the number of "Dead objects" of the same class (for example System.String). How should I interpret this phenomenon?
I found the answer by myself: "Dead objects" are the objects allocated BEFORE point A and freed before point B while "Garbage objects" are allocated AFTER point A and freed before point B.
精彩评论