xperf简介
来源:互联网 发布:标准动车组 知乎 编辑:程序博客网 时间:2024/05/08 21:40
Although I'm new to this tool I decided to follow their suggestions because I believe you're going to wonder how you could live without using this tool after using it for the first time.J
So, when starting to write this article I decided to browse the internet to see how many articles from Microsoft I could find because I didn't want to be redundant. As a matter of fact I found several great articles. (Am I late to the party? J ) Some of these articles are very didactic and similar to what I had in mind.
That said, I'm not going to be redundant here, likewise I'm going to give you just an overview about the tool and mention those articles that details the configuration and usage of XPerf so you can get the necessary details from these articles without having to research the internet all over again.
WHAT'S XPERF?
- XPerf is based on ETW ( E vent T racing for W indows) which is a very efficient tracing infrastructure.
- The overhead caused by XPerf is about ~2.5% CPU, in other words, very minimum.
- The tracing can be dynamically enabled or disabled and it doesn't require a reboot.
- XPerf enables you to collect logs, create reports and see charts from the collected data.
WHEN SHOULD YOU USE XPERF?
- When you need to isolate performance problems.
- To get a better understanding of the Operating System.
- Probably other scenarios where you can benefit for tracing the Windows components.
WHERE CAN YOU DOWNLOAD XPERF?
From here or here .
HOW CAN YOU START USING IT?
- Collect logs from a few seconds to 5 minutes.
- Start just before reproducing the symptom.
- Don't forget to setup the symbols.
BASIC COMMANDS
After installing XPerf open a Command Prompt using RunAs Administrator .
Setup symbols:
set _NT_SYMBOL_PATH= srv*C:\symbols*http://msdl.microsoft.com/downloads/symbols
Start XPerf , collecting just general information:
XPerf -on DiagEasy
Reproduce the symptom.
After that use this command to stop the tracing, creating a log file:
XPerf -d trace.etl
To visualize the charts from the data you just collected use:
XPerf trace.etl
XPerf can collect different information for different scenarios.
To do that you need to change the provider. Providers are the Windows components that have the ability to log information.
Sintax:
XPerf –on <provider>
To get a list of all available providers use:
XPerf -providers k
To get call stack information you need to specify the Kernel events that should log the call stack.
This is the way to do that:
Xperf -on <provider> -stackwalk <flags>
Example using provider = diageasy and stackwalk = profile :
XPerf -on diageasy -stackwalk profile
If you want to see other types of flags use:
XPerf -help stackwalk
To send the information to a CSV file use:
XPerf -i trace.etl > output.csv
You can create a PowerShell script which parses the output from the CSV file.
It's possible to create a CSV file with filtered information. To do that use:
XPerf –i trace.etl –a <action_name> > output.csv
Example:
XPerf –i trace.etl –a registry > output.csv
Or:
XPerf –i trace.etl –o output.txt –a registry
Notice the –o parameter above to specify the output file.
In my machine XPerf is in the C:\ETL folder.
Considering that, here is one possible way to use the tool:
C:\ETL> set _NT_SYMBOL_PATH= srv*C:\symbols*http://msdl.microsoft.com/downloads/symbols
C:\ETL> XPerf -on DiagEasy
# Reproduce symptom here…
C:\ETL> XPerf -d trace.etl
# At this point you may want to create a CSV file. See instructions above.
C:\ETL> XPerf trace.etl
Ok, you're probably wondering where the screenshots are. I decided to not use screenshots because some of the links below have all screenshots you need.
REFERENCES
http://msdn.microsoft.com/en-us/library/cc305187.aspx
http://blogs.msdn.com/pigscanfly/archive/tags/xperf/default.aspx
http://msdn.microsoft.com/en-us/performance/default.aspx (download)
http://blogs.msdn.com/ntdebugging/archive/2008/04/03/windows-performance-toolkit-xperf.aspx
XPerf rocks!
- xperf简介
- XPerf - Windows Performance Toolkit
- Stack Walking in Xperf
- XPerf学习(1)
- 安装xperf注意事项
- 微软Xperf使用手册
- xperf工具集的介绍
- xperf - 收集系统事件命令
- 开机时间分析工具WPT Xperf使用
- 利用XPerf进行代码性能分析
- Becoming an Xperf Xpert Part 6: RIP Xperf. Time to Learn Windows Performance Analyzer!
- 性能测试工具xperf初步认识(1)
- 性能测试工具xperf之系统启动(2)
- 微软Xperf Windows Software Development Kit (SDK) for Windows 8.1
- Becoming an Xperf Xpert Part 2: Long Running Logon Scripts, Inconceivable!
- Becoming an Xperf Xpert Part 4: What Did the WDIService Host Ever Do To You?
- Becoming An Xperf Xpert: Part 5 Gaps of Time For Explorer.exe
- Becoming an Xperf Xpert Part 8: Long Service Load, Never Jump to Conclusions
- 【Nginx实战】(一)——Nginx要点内容总结
- UVA-512
- 【eclipse】eclipse资源大全
- 图之单源最短路径
- 【eclipse】eclipse各个插件更新地址
- xperf简介
- 电路与Multisim Multisim14.0调出面包板
- python小工具收集-----GUID2class
- qt编译问题随笔
- 【原创】软件评测
- 【华为OJ】求最小公倍数
- clearcase 常见问题解答
- STL
- ubuntu idea安装配置