Page 1 of 1

Empty Snapshot

Posted: Tue Feb 08, 2011 6:55 pm
by sbhaktha
Hi,

I am new to .net profiler. I am trying to get snapshots of a process after attaching to it, but I get empty snapshots (blank). I am not sure what could be wrong.
Also, I have a question about setting up symbols. The documentation mentions that the path specified under Tools --> Options --> Preferences --> Symbol File Path "is used to define how native symbol files should be located". What about symbols for managed components? Where should they be specified?

Is my blank snapshot problem possibly related to symbol paths?

Are there any log files generated in case of errors?

I would greatly appreciate your help as I am trying to track down a possible memory leak that is important to track down...

thanks,
Sumithra

Re: Empty Snapshot

Posted: Wed Feb 09, 2011 3:41 pm
by Andreas Suurkuusk
The symbol file path is not used when attaching to a process. But when importing a memory dump from another machine, it might be necessary to define the symbol path, so the profiler can retrieve the correct version of the data access library for the .NET runtime.

In your case, the empty snapshot might be caused by the snapshot being collected at a "bad" time. When attaching, no synchronization is made with the profiled process, so there's a risk that the snapshot is collected during a garbage collection, in which case it is not always possible to analyse the managed memory (e.g. if the runtime has moved instances in memory, but not yet updated all references).

Unfortunately, the profiler currently does not detect these cases, it just doesn't get any data from the runtime, which will cause an empty snapshot.

Are you repeatedly seeing empty snapshots? If your application is causing very frequent GCs, the risk of a "bad" snapshot will increase. If possible, try to collect the snapshot at a time where there's not much memory activity.

Attaching to a process will provide you with less detailed information and is only recommended if you cannot start the profiled application from the profiler for some reason. If possible, try to use any of the "Profile ..." commands instead.