CLR Profiler - 附加到现有进程

发布于 2024-07-05 11:02:28 字数 241 浏览 7 评论 0原文

我想使用 .Net 2.0 上的 CLR 配置文件之类的工具来查看在任何给定时间(ASP.Net 工作进程的)哪些对象在堆中占用了更多空间。

但是,CLR Profiler 只允许我启动一个应用程序,而不能附加到现有应用程序。 我认为这是因为它也跟踪分配和 GC,但我对此不太感兴趣。 我只想要一些能够拍摄堆当前状态的快照,并向我显示其中有什么以及每种类型有多少对象,以及每种对象类型总共使用了多少字节。

有任何想法吗?

I would like to use something like CLR Profiles on .Net 2.0 to see what objects are taking more space in the heap at any given time (of an ASP.Net worker process).

However, the CLR Profiler only lets me START an app, not attach to an existing one. I assume this is because it tracks allocations and GC too, but i'm not very interested in that. I would just like something that takes a snapshot of the current state of the heap, and shows me what is there and how many objects of each kind there are, and how many bytes total are being used by each object type.

Any ideas?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

云雾 2024-07-12 11:02:28
  • 附加调试器

cdb -p

  • load .net 调试器扩展

.loadby sos mscorwks

  • 以 CLRProfiler 理解的格式转储堆

!TraverseHeap heap.txt

  • 分离调试器

qd load heap.txt

  • 在 clrprofiler 应用程序中
  • Attach a debugger

cdb -p

  • load .net debugger extensions

.loadby sos mscorwks

  • dump the heap in a format the CLRProfiler understands

!TraverseHeap heap.txt

  • detach debugger

qd

  • load heap.txt in the clrprofiler app
初与友歌 2024-07-12 11:02:28

.Net Memory Profiler 正是您所需要的。 它不是免费的,但有试用版。 事实上,我通过这次试验来发现我们上一个项目的漏洞。 一个显着的特点是:

通过以下方式轻松识别内存泄漏
收集并比较快照
.NET内存

我认为这就是您所寻找的。

.Net Memory Profiler is exactly what you need. It's not free but there's a trial version. Actually I used the trial to find leaks on our last project. One notable feature is:

Easily identify memory leaks by
collecting and comparing snapshots of
.NET memory

I think this is what your looking for.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文