.NET调试:如何在Win-7中启用GCStress? [英] .NET Debugging: How to enable GCStress in Win-7?

查看:109
本文介绍了.NET调试:如何在Win-7中启用GCStress?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在调试GC堆损坏,并进入要尝试在WinDbg + PageHeap + AppVerifier + GCStress下运行程序的步骤.

我在 http://social.msdn.microsoft.com上找到/Forums/zh-CN/clr/thread/0fcb5bb1-0cd8-40e4-96d9-f0cb8b6cdbdf [

I am debugging a GC heap corruption and came to the step where I want to try running the program under WinDbg+PageHeap+AppVerifier+GCStress.

I found at http://social.msdn.microsoft.com/Forums/en/clr/thread/0fcb5bb1-0cd8-40e4-96d9-f0cb8b6cdbdf[^] that I can enable GCStress like this:

<small>reg.exe add "HKLM\SOFTWARE\Microsoft\.NETFramework" /f  /v HeapVerify  /t REG_DWORD  /d 1  <br />
reg.exe add "HKLM\SOFTWARE\Microsoft\.NETFramework" /f  /v StressLog  /t REG_DWORD  /d 1  <br />
reg.exe add "HKLM\SOFTWARE\Microsoft\.NETFramework" /f  /v GCStress  /t REG_DWORD  /d 3  <br />
reg.exe add "HKLM\SOFTWARE\Microsoft\.NETFramework" /f  /v FastGcStress  /t REG_DWORD  /d 2</small>



[尝试这种方法-永远启动程序,我从注册表中删除了最后两个条目以使其正常工作,这可能是该方法本身存在问题. ]

或在
http://social.msdn.microsoft.com/论坛/en/clr/thread/33920b39-690c-42c8-b04a-0f1f7176835a [



[ trying this method - takes the program forever to launch, I deleted the last two entries from the registry to have it work, probably something is wrong with the approach itself. ]

or at http://social.msdn.microsoft.com/Forums/en/clr/thread/33920b39-690c-42c8-b04a-0f1f7176835a[^] described the other method:

<br />
    <small>(DWORD) StressLog = 1  <br />
    (DWORD) LogFacility = 0xffffffff  <br />
    (DWORD) StressLogSize = 65536</small>





Which way is correct or is there another correct way?

推荐答案

我读到这是一个已知问题,它将在下一版本中修复.NET Framework.

建议改用Itz,以解决应用程序配置文件中的后台GC设置问题.
I read that itz a known issue which will be fixed in the next version of the .NET Framework.

Itz recommeded to disable background GC setting in the application configuration file, as the work around.
<configuration>

    <runtime>

        <gcConcurrent enabled="false"/>

    </runtime>

</configuration>


这篇关于.NET调试:如何在Win-7中启用GCStress?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆