Visual Studio CPU高利用率 [英] Visual Studio CPU High Usage

查看:469
本文介绍了Visual Studio CPU高利用率的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我拥有任何Visual Studio(2010专业版,2012专业版和2015社区版)的一周,几分钟后,我开始一个项目,甚至是空的,没有任何接触,就启动了一个完全消耗一个核心的线程,其中100%用法。
从任务管理器中,我已经看到 devenv.exe 正在消耗25%的CPU,我有4个内核,所以100/4 = 25。



通过使用Process Explorer,我看到的是连续运行的 clr.dll clr.dll!GetCLRFunction + 10793 )。



这是线程的堆栈跟踪:

  ntoskrnl.exe!KeWaitForMultipleObjects + 0xc0a 
ntoskrnl.exe!KeAcquireSpinLockAtDpcLevel + 0x712
ntoskrnl.exe!KeWaitForSingleObject + 0x19f
ntoskrnl.exe!PoStartNextPowerIrp + 0xba0
ntoskrnl.exe + PoNext .exe!IoFreeErrorLogEntry + 0x297
System.ni.dll + 0x19ab70
System.ni.dll + 0x1de979
System.ni.dll + 0x19ab70
System.ni.dll + 0x199d42
System.ni.dll + 0x1ded86
System.ni.dll + 0x1de5fa
System.ni.dll + 0x1de397
System.ni.dll + 0x1da636
系统。 ni.dll + 0x1c755e
System.ni.dll + 0x19ebfb
System.ni.dll + 0x19eccf
clr.dll + 0x1396
clr.dll + 0x291f
clr 。 dll!PreBindAssemblyEx + 0x1822c
clr.dll!PreBindAssemblyEx + 0x183af
mscorlib.ni.dll + 0x2f1213
mscorlib.ni.dll + 0x2f103e
mscorlib.ni.dll + 0x2ffb72
mscorlib.ni.dll + 0x30a366
mscorlib.ni.dll + 0x2ffd30
mscorlib.ni.dll + 0x3aebef
mscorlib.ni.dll + 0x3aeaba
clr.dll + 0x291f
clr.dll + 0x9aff
clr.dll!PreBindAssembly + 0xb165
clr.dll!PreBindAssembly + 0x9653
clr.dll!PreBindAssembly + 0x96bd
clr。 dll!PreBindAssembly + 0x978a
clr.dll!PreBindAssembly + 0x9805
clr.dll!PreBindAssembly + 0xb0f9
clr.dll!PreBindAssembly + 0xa166
clr.dll!GetCLRFunction + 0x107 b $ b ntdll.dll!RtlInitializeExceptionChain + 0x63
ntdll.dll!RtlInitializeExceptionChain + 0x36

有人从以上几行中了解到什么吗?



在互联网上,我发现了一些建议,以禁用Visual Studio的一个或另一个插件/扩展,但没有一个被解决。问题,而且我在所有VS版本上都有问题离子(具有不同的扩展名,并且同时发生)



我认为这与我最近更新的.net Framework 4.5〜4.6有关。
我怎么知道问题出在哪里以及如何解决?

解决方案

看看为什么Visual Studio会引起这种问题您需要安装Windows Performance Toolkit(这是
(可以取消选择所有其他条目)



运行 WPRUI.exe ,依次选择第一级 CPU使用率并点击开始。捕获1分钟的CPU使用率,现在单击保存将数据保存到ETL文件中。



现在,双击生成的ETL文件以在Windows Performance Analyzer(WPA.exe)中打开ETL,拖放CPU使用率(已采样)进行分析窗格:





现在在WPA中加载调试符号并扩展 devenv.exe





在我的情况下,Telerik Extension导致Visual Studio内部的CPU使用率。


It's a week that I have any Visual Studio (2010 professional, 2012 professional and 2015 community edition) that, after few minutes I started a project even empty, without touching anything, start a thread that consumes entirely one core, 100% usage. From task manager I've seen that devenv.exe is consuming 25% of CPU, I have 4 cores so 100/4=25.

By using Process Explorer I've seen that is clr.dll (clr.dll!GetCLRFunction+10793) that is running continuosly.

here is the stack trace of the thread:

ntoskrnl.exe!KeWaitForMultipleObjects+0xc0a 
ntoskrnl.exe!KeAcquireSpinLockAtDpcLevel+0x712
ntoskrnl.exe!KeWaitForSingleObject+0x19f
ntoskrnl.exe!PoStartNextPowerIrp+0xba0
ntoskrnl.exe!PoStartNextPowerIrp+0x183d
ntoskrnl.exe!IoFreeErrorLogEntry+0x297
System.ni.dll+0x19ab70
System.ni.dll+0x1de979
System.ni.dll+0x19ab70
System.ni.dll+0x199d42
System.ni.dll+0x1ded86
System.ni.dll+0x1de5fa
System.ni.dll+0x1de397
System.ni.dll+0x1da636
System.ni.dll+0x1c755e
System.ni.dll+0x19ebfb
System.ni.dll+0x19eccf
clr.dll+0x1396
clr.dll+0x291f
clr.dll!PreBindAssemblyEx+0x1822c
clr.dll!PreBindAssemblyEx+0x183af
mscorlib.ni.dll+0x2f1213
mscorlib.ni.dll+0x2f103e
mscorlib.ni.dll+0x2ffb72
mscorlib.ni.dll+0x30a366
mscorlib.ni.dll+0x2ffd30
mscorlib.ni.dll+0x3aebef
mscorlib.ni.dll+0x3aeaba
clr.dll+0x291f
clr.dll+0x9aff
clr.dll!PreBindAssembly+0xb165
clr.dll!PreBindAssembly+0x9653
clr.dll!PreBindAssembly+0x96bd
clr.dll!PreBindAssembly+0x978a
clr.dll!PreBindAssembly+0x9805
clr.dll!PreBindAssembly+0xb0f9
clr.dll!PreBindAssembly+0xa166
clr.dll!GetCLRFunction+0x107dc
ntdll.dll!RtlInitializeExceptionChain+0x63
ntdll.dll!RtlInitializeExceptionChain+0x36

Does anyone understand something from the above lines??

On Internet I've found several suggestion to disable one or another plugin/extension of visual studio, by none of them solved the problem, and moreover I have the problem on all the VS version (with different extension and happened at the same time)

I think it's something related to the .net framework 4.5 ~4.6 that I have updated recently. How can I understand where is the problem and how to solve it?

解决方案

To see why Visual Studio causes such a high cpu usage you need to install the Windows Performance Toolkit, which is part of the Windows 10 SDK (if you use Windows 7, use the SDK Build 15086, which is the last version that works on Windows 7, for Windows 8,8.1 or Windows 10 use the WPT from latest Windows 10 SDK).

(all other entries can be unselected)

Run WPRUI.exe, select First Level, CPU Usage and click on start. Capture 1 minute of the CPU usage, now click on Save to save the data into a ETL file.

Now make a double click on the generated ETL file to open the ETL in Windows Performance Analyzer (WPA.exe), drag and drop the CPU Usage (Sampled) to analyze pane:

Now load debug symbols in WPA and expand the stack of the devenv.exe

In my case the Telerik Extension causes CPU usage inside Visual Studio.

这篇关于Visual Studio CPU高利用率的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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