Xperf Analysis Basics(转)
FQ不易,转载
http://randomascii.wordpress.com/2011/08/23/xperf-analysis-basics/
I started writing a description of how to examine CPU Sampling data in xperf and realized that I needed a basics article to link back to. Here it is. Learn this before you go further.
Symbols
Without symbols you can’t do much, so configuring your symbol path is important. I use a variation on this batch file prior to running xperfview. Configure the “localbuilds” and “OurSymbolServer” directories appropriately, but leave the Microsoft symbol server as is.
@rem Add local build directories
set SYMS=c:\build\localbuilds
@rem Put symbol servers at the end to avoid network trips looking for local symbols.
set SYMS=%SYMS%;SRV*c:\symbols*\\OurSymbolServer\symbols
@rem Microsoft’s symbol server.
set SYMS=%SYMS%;SRV*c:\symbols*http://msdl.microsoft.com/download/symbols
set _NT_SYMBOL_PATH=%SYMS%
If this dialog keeps popping up when you load symbols in xperfview:

then it means you’ve hit a UAC (User Account Control – admin/non-admin) bug. Follow the link to solve it.
You can also configure symbols by going to Trace->Configure Symbol Paths.
You load symbols by going to Trace->Load Symbols, or right clicking and selecting Load Symbols.
It’s worth mentioning that symbols are compressed and cached to c:\symcache. This is an efficient symbol cache that is used exclusively by xperfview. Set the _NT_SYMCACHE_PATH variable if you want to configure the location. I just leave it at its default.
Zoomin’ In, Zoomin’ Out
Navigating the main window in xperfview is mostly a matter of zooming in and out. The obvious ways of doing this are in the right-click context menu. This menu lets you zoom in to the current selection, or zoom all the way out (Unzoom). I find this set of options frustrating. I like to zoom in and out a little bit. Zoom to selection is okay, I guess, but to have the only zoom-out option be “all the way out” is a bit silly.
The solution is to make sure you have a mouse with a mouse wheel. Hold down the control key and roll the wheel. That’s the way real programmers do it. I can’t use xperfview without a mouse wheel.
Enabling/Disabling/Reordering the Graphs
Xperfview defaults to having a particular set of graphs visible. The choice of graphs is biased towards people who are working on optimizing Windows itself, and is not as good a choice for those of us who are not actively working on the Windows scheduler. With that in mind, I recommend that you click on the flyout on the left side of the xperfview window and enable and disable graphs until it matches the correct set of graphs, conveniently shown here:

If you want CPU sampling by CPU, then go for it, but I think you’ll find it is usually not worth it.
In addition, you can change the order of graphs in order to get all of your favorites together. Just drag them around in this list to reorder them, and then double-click on the one you want to see.
Xperfview will remember the enabled/disabled state. That is good.
Xperfview will not remember the order of the graphs. You can’t win them all.
Selections
Selecting a region of interest in a trace is important because that lets you select which part of the trace you will invoke a summary table for. The diamonds on the CPU Scheduling graph and some other graphs are useful because they mark key points and because when selecting you can snap to them.
Once you’ve got a selection you can replicate it to other graphs by right clicking and selecting Clone Selection. This is often very useful.
That’s all folks
That’s enough for now. I’ll add more basics later if they seem worth it.
Xperf Analysis Basics(转)的更多相关文章
- Factoextra R Package: Easy Multivariate Data Analyses and Elegant Visualization
factoextra is an R package making easy to extract and visualize the output of exploratory multivaria ...
- 使用Python对Twitter进行数据挖掘(Mining Twitter Data with Python)
目录 1.Collecting data 1.1 Register Your App 1.2 Accessing the Data 1.3 Streaming 2.Text Pre-processin ...
- Mining Twitter Data with Python
目录 1.Collecting data 1.1 Register Your App 1.2 Accessing the Data 1.3 Streaming 2.Text Pre-processin ...
- Xperf Basics: Recording a Trace(转)
http://randomascii.wordpress.com/2011/08/18/xperf-basics-recording-a-trace/ This post is obsolete ...
- Xperf Basics: Recording a Trace (the easy way)(转)
http://randomascii.wordpress.com/2013/04/20/xperf-basics-recording-a-trace-the-easy-way/ Some ti ...
- An Introduction to Stock Market Data Analysis with R (Part 1)
Around September of 2016 I wrote two articles on using Python for accessing, visualizing, and evalua ...
- 课程一(Neural Networks and Deep Learning),第二周(Basics of Neural Network programming)—— 4、Logistic Regression with a Neural Network mindset
Logistic Regression with a Neural Network mindset Welcome to the first (required) programming exerci ...
- Security Testing Basics
Security Testing BasicsSoftware security testing is the process of assessing and testing a system to ...
- Basics of Algorithmic Trading: Concepts and Examples
https://www.investopedia.com/articles/active-trading/101014/basics-algorithmic-trading-concepts-and- ...
随机推荐
- phpstorm
9XVKERIY9F-eyJsaWNlbnNlSWQiOiI5WFZLRVJJWTlGIiwibGljZW5zZWVOYW1lIjoiYXNoZXIgY2hlbiIsImFzc2lnbmVlTmFtZ ...
- asp.net GDI+绘制矩形渐变
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.We ...
- [转载] Android逃逸技术汇编
本文转载自: http://blogs.360.cn/360mobile/2016/10/24/android_escape/ 摘 要 传统逃逸技术涉及网络攻防和病毒分析两大领域,网络攻防领域涉 ...
- 同一web系统,不同端口的跨域问题
部署web系统的时候,发现了跨域问题,子系统是用Iframe嵌入到系统里面的,导致父窗口获取子系统的webService和图片时发现跨域问题,如下图所示:问题1:父窗口获取子系统的对象跨域 原因:用这 ...
- HTTP协议-引自孤傲苍狼博客
一.什么是HTTP协议 HTTP是hypertext transfer protocol(超文本传输协议)的简写,它是TCP/IP协议的一个应用层协议,用于定义WEB浏览器与WEB服务器之间交换数据的 ...
- AngularJs自定义指令详解(2) - template
一些用于定义行为的指令,可能不需要使用template参数. 当指定template参数时,其值可以是一个字符串,表示一段HTML文本,也可以是一个函数,这函数接受两个参数:tElement和tAtt ...
- php get_magic_quotes_gpc()函数
magic_quotes_gpc函数在php中的作用是判断解析用户提示的数据,如包括有:post.get.cookie过来的数据增加转义字符“\”,以确保这些数据不会引起程序,特别是数据库语句因为特殊 ...
- Frogger
Freddy Frog is sitting on a stone in the middle of a lake. Suddenly he notices Fiona Frog who is sit ...
- 将src非空的属性注入到des中
package lizikj.bigwheel.common.vo.merchandise.util; import java.lang.reflect.Field; import lizikj.bi ...
- HTTP 头部
通用头域(即通用头) 通用头域包含请求和响应消息都支持的头域,通用头域包含Cache-Control. Connection.Date.Pragma.Transfer-Encoding.Upgra ...