chrome 高cpu占用 性能分析

发布时间 2023-05-03 13:49:32作者: hrdom

Visual Studio 性能探查器

Windows Performance Toolkit

PerfView 应该只能用于.NET

尝试了chrome://tracing/,但是暂时没太看懂里面都是什么意思

 

搜着搜着发现了一个UIforETW,这个好像是专门用于chrome的Event Tracing for Windows (ETW),所以试用了一下

msiexec.exe /i "C:\Users\\Downloads\etwpackage1.58\etwpackage\third_party\wpt10\WPTx64 (OnecoreUAP)-x64_en-us.msi"
msiexec.exe /i "C:\Users\\Downloads\etwpackage1.58\etwpackage\third_party\wpt10\WPTx64 (DesktopEditions)-x64_en-us.msi"
WPT version 10.0.22621.755 was installed.

Setting _NT_SYMBOL_PATH=SRV*C:\symbols*https://msdl.microsoft.com/download/symbols (Microsoft). Set _NT_SYMBOL_PATH yourself or toggle 'Chrome developer' if you want different defaults.

Setting _NT_SYMBOL_PATH=SRV*C:\symbols*https://msdl.microsoft.com/download/symbols;SRV*C:\symbols*https://chromium-browser-symsrv.commondatastorage.googleapis.com (Microsoft plus Chrome). Set _NT_SYMBOL_PATH yourself or toggle 'Chrome developer' if you want different defaults.(这里需要自己设置 符号服务器环境变量 ,我以为是自动设置的)


Starting tracing to disk...
Tracing is started.

Saving trace to disk...
The trace you have just captured "C:\Users\\AppData\Local\Temp\UIForETWkernel.etl" may contain personally identifiable information, including but not necessarily limited to paths to files accessed, paths to registry accessed and process names. Exact information depends on the events that were logged. Please be aware of this when sharing out this trace with other people.
The trace you have just captured "C:\Users\\AppData\Local\Temp\UIForETWuser.etl" may contain personally identifiable information, including but not necessarily limited to paths to files accessed, paths to registry accessed and process names. Exact information depends on the events that were logged. Please be aware of this when sharing out this trace with other people.
Merging trace...
Merged Etl: C:\Users\\Documents\etwtraces\2023-05-03_12-38-18_.etl
Preprocessing trace to identify Chrome processes and summarize CPU usage. This may take a little while...
Finished recording trace.

Copied chrome_regions_of_interest.xml to the WPA Files directory.
Copied Startup10.wpaProfile to %localappdata%\Windows Performance Analyzer