开发者

Using a memory profiler that monitors multiple projects

I am working on a Silverlight 4 project and there is a major memory leak apparently left in before I took over. I have tried two different profilers that hook into VIsual Studio 2010 and I noticed that the data wasn't changing between snapshots. It was then I realized that it wasn't showing most of my data, nor any custom classes.

What I believe is happening is that it is only showing my memory usage for the "startup project" but there are a bunch of other supporting projects that are actually doing the heavy lifting that contain the leak. Is there a profiler that can show multiple project's memory usage?

So far I have used ANTS and something from memprofiler.com . I tried WinDbg but I couldn't get it to work and all the instructions for using it seem fairly old.

开发者_JAVA技巧

Any help is greatly appreciated.

edit: The solution found was to properly set up ANTS to point at the website hosting the application which would finally show everything. The debugged local version would not show the same data.

Edit 2: Connecting to the silverlight app on the web seems to be as good as it gets.


The problem with trying to attach to many processes is that the application would have to communicate with multiple COM profilers (1 per process) and this complexity may not have been built in - however nothing should be stopping you run multiple hosts/profilers at the same time.

NOTE: I've used ClrProfiler4 to find memory leaks in a silverlight app (found we had (re)discovered the context menu memory leak in the Silverlight toolkit)

It worked quite well, not the prettiest of profilers but what do you expect for free.


I was able to do some fixing to the project through the help of ANTS, their support page RedGate Support helped some but I just don't think they have the best recommendations for how to profile a Silverlight App.

From what I have been hearing its just not that easy to profile a silverlight app currently, and what information I was getting from ANTS was I guess all that I can expect without using more "hands on" tools. In case someone else needs to profile in silverlight when I continue getting rid of memory leaks I'll be working off these sites below

Hunting Down Memory Leaks in Silverlight

MSDN Magazine

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜