Visual Studio 2015 - CPU使用情况分析不起作用?

时间:2021-03-31 03:21:56

I recently upgraded from Visual Studio 2013 Community to Visual Studio 2015 Community.

我最近从Visual Studio 2013社区升级到Visual Studio 2015社区。

I've heavily relied on the "CPU Usage" Tool that can be found by doing the following:

我非常依赖“CPU使用率”工具,可以通过执行以下操作找到:

  1. Click "Debug"
  2. Click "Start Diagnostic Tools without Debugging"
  3. 单击“启动诊断工具而不调试”

  4. Click "CPU Usage" Check box
  5. 单击“CPU使用率”复选框

  6. Click "Start" button
  7. 单击“开始”按钮

When the program is complete, it is supposed to show you the functions and the time spent in each. What I get instead is just the name of my executable that I can keep expanding instead of seeing the function names -- It doesn't know the names of the functions.

程序完成后,它应该显示功能和每个程序所花费的时间。我得到的只是我的可执行文件的名称,我可以继续扩展而不是看到函数名称 - 它不知道函数的名称。

This worked fine on Visual Studio 2013... I would be able to see the function names and everything worked. I tried creating a new "test" solution/project to see whether this works and I get the same results: No function names.

这在Visual Studio 2013上运行良好...我将能够看到函数名称和一切正常。我尝试创建一个新的“测试”解决方案/项目,看看是否有效,我得到了相同的结果:没有函数名称。

Does this work for anybody? I also installed VS2015 on a fresh development box and still have no results. This seems like Microsoft shipped with a Visual Studio bug.

这适用于任何人吗?我还在一个新的开发盒上安装了VS2015但仍然没有结果。这似乎是Microsoft附带的Visual Studio错误。

Note: I'm writing a C++ console application. I've tried this on debug and release builds and ensured that I'm building with debug information.

注意:我正在编写C ++控制台应用程序。我已经在调试和发布版本上尝试了这一点,并确保我正在构建调试信息。

2 个解决方案

#1


4  

It's in the Visual Studio 2015 Update 1 release notes, so I suspect it was broken in the initial release:

它位于Visual Studio 2015 Update 1发行说明中,因此我怀疑它在初始版本中已被破坏:

Profile your CPU Usage while debugging

在调试时分析您的CPU使用情况

Now, you can get a detailed per-function profile of your CPU Usage while you are debugging. You can turn CPU Profiling on and off while debugging and view the results when you are in a break state, which allows you to view a per-function breakdown of CPU Usage of code that executed between breakpoints and during steps. (To use this functionality, open the Diagnostic Tools window (Debug -> Diagnostic Tools), switch to the CPU tab, and then click the "CPU Profiling" button.)

现在,您可以在调试时获得CPU使用情况的详细的每功能配置文件。您可以在调试时打开和关闭CPU性能分析,并在处于中断状态时查看结果,这样您就可以查看断点之间和步骤期间执行的代码的CPU使用率的每个功能细分。 (要使用此功能,请打开Diagnostic Tools窗口(Debug - > Diagnostic Tools),切换到CPU选项卡,然后单击“CPU Profiling”按钮。)

#2


0  

I have also noticed this, but if you use that little search box (top right corner of the results area) and try typing in either the name of the function you're looking for or part of the name and it will expand everything (there's usually a lot to expand) and highlight the function you're looking for. Its the only way I've been able to profile specific functions.

我也注意到了这一点,但是如果你使用那个小搜索框(结果区域的右上角)并尝试键入你正在寻找的功能的名称或名称的一部分,它将扩展所有内容(这里有)通常需要很多扩展)并突出显示您正在寻找的功能。这是我能够分析特定功能的唯一方法。

#1


4  

It's in the Visual Studio 2015 Update 1 release notes, so I suspect it was broken in the initial release:

它位于Visual Studio 2015 Update 1发行说明中,因此我怀疑它在初始版本中已被破坏:

Profile your CPU Usage while debugging

在调试时分析您的CPU使用情况

Now, you can get a detailed per-function profile of your CPU Usage while you are debugging. You can turn CPU Profiling on and off while debugging and view the results when you are in a break state, which allows you to view a per-function breakdown of CPU Usage of code that executed between breakpoints and during steps. (To use this functionality, open the Diagnostic Tools window (Debug -> Diagnostic Tools), switch to the CPU tab, and then click the "CPU Profiling" button.)

现在,您可以在调试时获得CPU使用情况的详细的每功能配置文件。您可以在调试时打开和关闭CPU性能分析,并在处于中断状态时查看结果,这样您就可以查看断点之间和步骤期间执行的代码的CPU使用率的每个功能细分。 (要使用此功能,请打开Diagnostic Tools窗口(Debug - > Diagnostic Tools),切换到CPU选项卡,然后单击“CPU Profiling”按钮。)

#2


0  

I have also noticed this, but if you use that little search box (top right corner of the results area) and try typing in either the name of the function you're looking for or part of the name and it will expand everything (there's usually a lot to expand) and highlight the function you're looking for. Its the only way I've been able to profile specific functions.

我也注意到了这一点,但是如果你使用那个小搜索框(结果区域的右上角)并尝试键入你正在寻找的功能的名称或名称的一部分,它将扩展所有内容(这里有)通常需要很多扩展)并突出显示您正在寻找的功能。这是我能够分析特定功能的唯一方法。