Reputation: 33850
A dump of the GC heap of my managed process revealed that there were plenty of, among other types, large string objects.
I zeroed in on a couple of them:
> dumpheap -type System.String
> !do <address>
That told me what the contents of the string are, among other things that I wasn't very interested in.
So, I followed the string down to its GC root. But first, I wanted to confirm that it was on LOH.
> !gcwhere <address>
> !gcroot <address>
Now that's about as far as I could get.
I'd like to know where (which line of code created it, preferrably !dumpil of that line) along with the method description of the method that created it, the declaring type of that method, the assembly and the app domain that the assembly was loaded in.
Upvotes: 1
Views: 134
Reputation: 59359
The .NET framework does not need that information for the application to run, so it does not store it. There's also no flag similar to the GFlags +ust
setting that would activate such a storage. It's not possible with what you have as tools right now (a dump file or live debugging).
You need a memory profiler like ANTS memory profiler or JetBrains dotMemory. Even those do not collect allocation data by default and you have to activate it.
Screenshot of dotMemory:
Upvotes: 1