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(转)的更多相关文章

  1. 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 ...

  2. 使用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 ...

  3. 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 ...

  4. Xperf Basics: Recording a Trace(转)

    http://randomascii.wordpress.com/2011/08/18/xperf-basics-recording-a-trace/   This post is obsolete ...

  5. 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 ...

  6. 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 ...

  7. 课程一(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 ...

  8. Security Testing Basics

    Security Testing BasicsSoftware security testing is the process of assessing and testing a system to ...

  9. Basics of Algorithmic Trading: Concepts and Examples

    https://www.investopedia.com/articles/active-trading/101014/basics-algorithmic-trading-concepts-and- ...

随机推荐

  1. 用BlendFunc实现舞台灯光和刮刮卡效果

    [转]http://code.lovemiao.com/?p=136#more-136 之前写过一篇<不规则形状按钮的点击判定>,利用了CCRenderTexture创建一块画布,可以在上 ...

  2. codeforces 361 E - Mike and Geometry Problem

    原题: Description Mike wants to prepare for IMO but he doesn't know geometry, so his teacher gave him ...

  3. 客户端连接linux经常间隔性断开链接

    起因 在使用SecureCRT通过telnet或SSH访问linux时,总是出现过段时间操作就会断开连接提示重连的问题.起初以为是网络不稳定造成的,但我测试发现在服务器端一直可以ping通客户端IP, ...

  4. sendEmail的使用

    坑!坑!坑!今天又弄了一天如何发送邮件,首先用sendmail,postfix.....等,都试过了,各种报错,然后就从早上弄到现在,在群里问问题的时候,一位好心的大哥说了他用的是sendEmail, ...

  5. Xml文件操作的其中一个使用方法:

    XmlNodeList students = doc.DocumentElement.ChildNodes;//Student节点集合 foreach (XmlNode stu in students ...

  6. 清除SQLServer日志的两种方法

    日志文件满而造成SQL数据库无法写入文件时,可用两种方法:一种方法:清空日志.1.打开查询分析器,输入命令DUMP TRANSACTION 数据库名 WITH NO_LOG2.再打开企业管理器--右键 ...

  7. Bootstrap 栅格系统(转载)

    源地址:http://www.cnblogs.com/linjiqin/p/3559800.html Bootstrap 栅格系统 目录1.简介2.栅格选项3.列偏移4.嵌套列5.列排序 1.简介Bo ...

  8. linux学习之——基础命令

    Linux体系基础命令: Linux是一个命令行组成的操作体系!精华在命令行,岂论图形界面成长到什么水平这个原理是不会变的,Linux命令有许多壮大的效用:从简单的磁盘操作.文件存取.到举办庞大的多媒 ...

  9. C++主要数据类型在计算机中所占字节大小

    遇到了数据存储的大端和小端问题,这你妹的看的一头雾水,发现我基本知识严重匮乏啊,先了解C++各数据类型在自己机子上占多少字节吧,以及这些数据类型所占字节大小与神马有关.各种查资料然后写代码检验,小结于 ...

  10. Android开发涉及有点概念&相关知识点(待写)

    前言,承接之前的 IOS开发涉及有点概念&相关知识点,这次归纳的是Android开发相关,好废话不说了.. 先声明下,Android开发涉及概念比IOS杂很多,可能有很多都题不到的.. 首先由 ...