.NET 分配分析
我需要一种方法来跟踪 .NET 应用程序中在调试应用程序过程中的单个步骤中发生的所有分配。我的意思是,当我在调试器中单步执行代码时,我想查看单个步骤中发生了什么分配。有没有工具或方法可以做到这一点?我尝试了几种内存分析器,包括 CLR 分析器、JetBrains 和 .NET Memory Profiler 3.5,但它们似乎都没有提供这种功能。
I need a way to track all allocations in a .NET application that happen during a single step in the process of debugging my application. I mean, when I'm in the debugger, stepping through code, I would like to see for a single step what allocation took place. Is there a tool or a way to do it? I tried several memory profilers including CLR profiler, JetBrains and .NET Memory Profiler 3.5 and none of them seems to provide this kind of funcionality.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用 WinDBG 进行类似的操作,
这应该会在所有 AllocateObject/FastAllocateObject 上中断,并将 MethodTable 传递给 log.txt 中的这些函数。随着分配对象数量的增加,它可能会变得非常慢
You could use WinDBG with something like this
This should break on all AllocateObject/FastAllocateObject and dump MethodTable passed to these functions in log.txt .. It will probably get very slow as number of allocated objects increase