如何在Unity中获取有关缓存未命中的分析数据?

问题描述 投票:0回答:1

我正在寻找一种方法来获取针对我的Unity项目的高速缓存未命中的概要分析数据。

我已经在搜索具有这些统计信息的Visual Studio工具。我可以看到Visual Studio具有用于.NET应用程序的工具,该工具可以显示缓存未命中(如此处https://docs.microsoft.com/en-us/visualstudio/profiling/cpu-and-windows-counters?view=vs-2017所述),例如其性能向导,但对于我的Unity项目,它们始终显示为灰色。

我尝试将Visual Studio的性能工具附加到正在运行的Unity项目中,但似乎找不到所需的数据。

不幸的是,Unity的探查器似乎没有显示我正在寻找的缓存未命中统计信息。

我正在使用单声道,但愿意切换到IL2CPP,这时我主要是在探索统一性能。

我想从优化中删除猜测工作。有什么我想念的吗?

编辑1:这是我测试过的。

我使用在播放器选项中选择的IL2CPP创建了测试项目的内部版本

[在Visual Studio中,我转到Debug / Performance Profiler,我选择了“ Executable”目标,并使用了“ Performance Wizard”选项。单击“开始”后,我使用选项“工具”,单击下一步,对要分析的应用程序使用“可执行文件”,单击下一步,选择我创建的版本的.exe,单击下一步并完成。

然后我失败了:

Profiling started.
Instrumenting <my path to my exe> in place
Info VSP3049: Small functions will be excluded from instrumentation.
Microsoft (R) VSInstr Post-Link Instrumentation 15.8.18219.1 x86
Unable to obtain debug information. Link with the /PROFILE linker switch.
PRF0002: Instrumentation failed with these options: /u "<my path to exe> /excludesmallfuncs.  Please check the output window for additional details.
Data written to <my path>200126(5).vsp.
Profiling finished.
Profiling complete.

[我尝试研究Error VSP1011: Unable to obtain debug information. Link with the /Profile linker switch,但不确定是否相关。

我安装了VS2013,并尝试了相同的步骤,但它给了我相同的错误。

windows visual-studio unity3d profiling
1个回答
0
投票

我终于找到了一个很好的工具。

看起来像英特尔的VTune非常易于使用,并且提供了很好的信息。当然,它是抽样的,没有显示确切的信息,但是它为我提供了研究的热点。

© www.soinside.com 2019 - 2024. All rights reserved.