<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Pointless Blathering : Device Drivers General</title><link>http://blogs.msdn.com/peterwie/archive/tags/Device+Drivers+General/default.aspx</link><description>Tags: Device Drivers General</description><dc:language>en</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>New KMDF white-paper out on writing a bus driver</title><link>http://blogs.msdn.com/peterwie/archive/2008/10/21/new-kmdf-white-paper-out-on-writing-a-bus-driver.aspx</link><pubDate>Tue, 21 Oct 2008 20:48:59 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9010098</guid><dc:creator>PeterWie</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/peterwie/comments/9010098.aspx</comments><wfw:commentRss>http://blogs.msdn.com/peterwie/commentrss.aspx?PostID=9010098</wfw:commentRss><description>&lt;p&gt;Penny Orwick has been working on a white paper that talks abut using KMDF to write a bus driver.&amp;#160; It’s been stalled waiting for us lazy developers to review it, but it finally came out last night:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.microsoft.com/whdc/driver/wdf/KMDFBusDrv.mspx"&gt;http://www.microsoft.com/whdc/driver/wdf/KMDFBusDrv.mspx&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9010098" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/peterwie/archive/tags/Device+Drivers+General/default.aspx">Device Drivers General</category><category domain="http://blogs.msdn.com/peterwie/archive/tags/KMDF/default.aspx">KMDF</category></item><item><title>Measuring DPC time</title><link>http://blogs.msdn.com/peterwie/archive/2008/10/06/measuring-dpc-time.aspx</link><pubDate>Tue, 07 Oct 2008 03:59:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8980372</guid><dc:creator>PeterWie</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/peterwie/comments/8980372.aspx</comments><wfw:commentRss>http://blogs.msdn.com/peterwie/commentrss.aspx?PostID=8980372</wfw:commentRss><description>&lt;P&gt;At the DDC this year we had some very useful “community forums”.&amp;nbsp; I generally come out of these feeling like I've been beaten with a sack of oranges, and this year was no exception.&amp;nbsp; But one question in particular struck my eye – someone was saying that MS didn’t provide any useful tools for figuring out why the DPC latency they were seeing on notebooks was so poor.&amp;nbsp; When he asked about this my first thought was “I bet XPerf can do that”.&lt;/P&gt;
&lt;P&gt;XPerf, for those who haven’t seen it, is part of a performance toolkit that the Windows performance team &lt;A href="http://www.microsoft.com/whdc/system/sysperf/perftools.mspx" mce_href="http://www.microsoft.com/whdc/system/sysperf/perftools.mspx"&gt;released&lt;/A&gt;.&amp;nbsp; It collects ETW events reported by various system components and then provides an … interesting … UI to pull all of those events together into graphs and visualize what in the world is going on.&lt;/P&gt;
&lt;P&gt;The down-side of XPerf is that it can be very hard to use.&amp;nbsp; Every time I approach this tool I think “wow that’s a lot of data to make sense of”.&amp;nbsp; But I would think that we can use it to collect information about what DPCs are running and how long they run for.&lt;/P&gt;
&lt;P&gt;Once I installed XPerf I went into the installation directory and looked at the tools that it provides.&amp;nbsp; There are two interesting tools – XPerf.exe and xperfview.exe.&amp;nbsp; The first allows you to easily start and stop trace sessions, merge trace logs and do some data processing on the resulting logs.&amp;nbsp; The second is the GUI visualization tool and lets you see your trace data.&amp;nbsp; Let’s start with XPerf:&lt;/P&gt;
&lt;DIV class=csharpcode&gt;&lt;PRE class=alt&gt;C:\xperf&amp;gt;xperf&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE class=alt&gt;    Microsoft (R) Windows (R) Performance Analyzer Version 4.1.6512&lt;/PRE&gt;&lt;PRE&gt;    Performance Analyzer Command Line&lt;/PRE&gt;&lt;PRE class=alt&gt;    Copyright (c) Microsoft Corporation. All rights reserved.&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE class=alt&gt;    Usage: xperf options ...&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE class=alt&gt;        xperf -help view             &lt;SPAN class=kwrd&gt;for&lt;/SPAN&gt; xperfview, the graphical user interface&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE class=alt&gt;        xperf -help start            &lt;SPAN class=kwrd&gt;for&lt;/SPAN&gt; logger start options&lt;/PRE&gt;&lt;PRE&gt;        xperf -help providers        &lt;SPAN class=kwrd&gt;for&lt;/SPAN&gt; known tracing flags&lt;/PRE&gt;&lt;PRE class=alt&gt;        xperf -help stackwalk        &lt;SPAN class=kwrd&gt;for&lt;/SPAN&gt; stack walking options&lt;/PRE&gt;&lt;PRE&gt;        xperf -help stop             &lt;SPAN class=kwrd&gt;for&lt;/SPAN&gt; logger stop options&lt;/PRE&gt;&lt;PRE class=alt&gt;        xperf -help merge            &lt;SPAN class=kwrd&gt;for&lt;/SPAN&gt; merge multiple trace files&lt;/PRE&gt;&lt;PRE&gt;        xperf -help processing       &lt;SPAN class=kwrd&gt;for&lt;/SPAN&gt; trace processing options&lt;/PRE&gt;&lt;PRE class=alt&gt;        xperf -help symbols          &lt;SPAN class=kwrd&gt;for&lt;/SPAN&gt; symbol decoding configuration&lt;/PRE&gt;&lt;PRE&gt;        xperf -help query            &lt;SPAN class=kwrd&gt;for&lt;/SPAN&gt; query options&lt;/PRE&gt;&lt;PRE class=alt&gt;        xperf -help mark             &lt;SPAN class=kwrd&gt;for&lt;/SPAN&gt; mark and mark-flush&lt;/PRE&gt;&lt;PRE&gt;        xperf -help format           &lt;SPAN class=kwrd&gt;for&lt;/SPAN&gt; time and timespan formats on the command line&lt;/PRE&gt;&lt;/DIV&gt;
&lt;STYLE type=text/css&gt;

.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/STYLE&gt;

&lt;P&gt;Well we want to use this to start a trace session, so let’s start with xperf –help start:&lt;/P&gt;
&lt;DIV class=csharpcode&gt;&lt;PRE class=alt&gt;C:\xperf&amp;gt;xperf -help start&lt;/PRE&gt;&lt;PRE&gt;    Trace start options:&lt;/PRE&gt;&lt;PRE class=alt&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE&gt;    xperf [-start|-update [LoggerName]] -on Flags|Groups options ...&lt;/PRE&gt;&lt;PRE class=alt&gt;            or -flush [LoggerName] ...&lt;/PRE&gt;&lt;PRE&gt;            or -SetProfInt [&amp;lt;n&amp;gt;] [cached]&lt;/PRE&gt;&lt;PRE class=alt&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE&gt;    User provider format &lt;SPAN class=kwrd&gt;for&lt;/SPAN&gt; -on: (GUID|KnownProviderName)[:Flags[:Level]]&lt;/PRE&gt;&lt;PRE class=alt&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE&gt;        -start      LoggerName       Start a logging session &lt;SPAN class=kwrd&gt;for&lt;/SPAN&gt; LoggerName&lt;/PRE&gt;&lt;PRE class=alt&gt;        -update     LoggerName       Update a logging session &lt;SPAN class=kwrd&gt;for&lt;/SPAN&gt; LoggerName&lt;/PRE&gt;&lt;PRE&gt;        -flush      LoggerName       Flush a logging session &lt;SPAN class=kwrd&gt;for&lt;/SPAN&gt; LoggerName&lt;/PRE&gt;&lt;PRE class=alt&gt;        -on         Flags|Groups     For kernel logging sessions, the sequence of&lt;/PRE&gt;&lt;PRE&gt;                                     kernel flags and groups to be enabled,&lt;/PRE&gt;&lt;PRE class=alt&gt;                                     separated by &lt;SPAN class=str&gt;'+'&lt;/SPAN&gt;.  For user logging&lt;/PRE&gt;&lt;PRE&gt;                                     sessions, the sequence of providers to be&lt;/PRE&gt;&lt;PRE class=alt&gt;                                     enabled, separated by &lt;SPAN class=str&gt;'+'&lt;/SPAN&gt;.  The accepted&lt;/PRE&gt;&lt;PRE&gt;                                     provider format &lt;SPAN class=kwrd&gt;is&lt;/SPAN&gt;:&lt;/PRE&gt;&lt;PRE class=alt&gt;                                     (GUID|KnownProviderName)[:Flags[:Level]].&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE class=alt&gt;                                     Use &lt;SPAN class=str&gt;"xperf -help providers"&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;for&lt;/SPAN&gt; a list of&lt;/PRE&gt;&lt;PRE&gt;                                     valid flags&lt;/PRE&gt;&lt;PRE class=alt&gt;        -f          filename         Log events to specified file; &lt;SPAN class=kwrd&gt;default&lt;/SPAN&gt;:&lt;/PRE&gt;&lt;PRE&gt;                                     \kernel.etl &lt;SPAN class=kwrd&gt;for&lt;/SPAN&gt; kernel traces and \user.etl&lt;/PRE&gt;&lt;PRE class=alt&gt;                                     &lt;SPAN class=kwrd&gt;for&lt;/SPAN&gt; user traces&lt;/PRE&gt;&lt;PRE&gt;        -BufferSize Size             Set trace buffer size to Size KB (4 KB -&lt;/PRE&gt;&lt;PRE class=alt&gt;                                     1024 KB); &lt;SPAN class=kwrd&gt;default&lt;/SPAN&gt;: 64 KB&lt;/PRE&gt;&lt;PRE&gt;        -MinBuffers n                Set minimum number of trace buffers to n;&lt;/PRE&gt;&lt;PRE class=alt&gt;                                     &lt;SPAN class=kwrd&gt;default&lt;/SPAN&gt;: 64&lt;/PRE&gt;&lt;PRE&gt;        -MaxBuffers n                Set maximum number of trace buffers to n;&lt;/PRE&gt;&lt;PRE class=alt&gt;                                     &lt;SPAN class=kwrd&gt;default&lt;/SPAN&gt;: 320&lt;/PRE&gt;&lt;PRE&gt;        -MaxFile    Size             Set maximum file size to Size MB&lt;/PRE&gt;&lt;PRE class=alt&gt;        -FlushTimer n                Set the flush timer to n seconds&lt;/PRE&gt;&lt;PRE&gt;        -BootTrace  Flags|Groups|off Config the Event Tracing For Windows Logger &lt;/PRE&gt;&lt;PRE class=alt&gt;                                     to trace boot.  Set flags &lt;SPAN class=kwrd&gt;as&lt;/SPAN&gt; &lt;SPAN class=str&gt;"off"&lt;/SPAN&gt; to turn &lt;/PRE&gt;&lt;PRE&gt;                                     off boot tracing.  All loggering control can&lt;/PRE&gt;&lt;PRE class=alt&gt;                                     be used &lt;SPAN class=kwrd&gt;in&lt;/SPAN&gt; conjunction with &lt;SPAN class=kwrd&gt;this&lt;/SPAN&gt;.  Use &lt;SPAN class=kwrd&gt;in&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;                                     conjunction with -f to log to a file other &lt;/PRE&gt;&lt;PRE class=alt&gt;                                     than \Perf.etl.&lt;/PRE&gt;&lt;PRE&gt;        -RealTime                    Enable real time tracing&lt;/PRE&gt;&lt;PRE class=alt&gt;        -Buffering                   Enable buffering mode tracing&lt;/PRE&gt;&lt;PRE&gt;        -FileMode   Mode             Set the File Mode; &lt;SPAN class=kwrd&gt;default&lt;/SPAN&gt;: Sequential.&lt;/PRE&gt;&lt;PRE class=alt&gt;                                     Mode: Sequential, Circular, Append, NewFile&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE class=alt&gt;        -ClockType  ClockType        Set the clock type; &lt;SPAN class=kwrd&gt;default&lt;/SPAN&gt;: PerfCounter.&lt;/PRE&gt;&lt;PRE&gt;                                     Type: Cycle, PerfCounter, SystemTime.&lt;/PRE&gt;&lt;PRE class=alt&gt;        -StackWalk  flags|@file      Enable stack walking &lt;SPAN class=kwrd&gt;for&lt;/SPAN&gt; the events&lt;/PRE&gt;&lt;PRE&gt;                                     specified &lt;SPAN class=kwrd&gt;as&lt;/SPAN&gt; Flag+Flag+..., or parse &lt;SPAN class=str&gt;'file'&lt;/SPAN&gt; &lt;/PRE&gt;&lt;PRE class=alt&gt;                                     file &lt;SPAN class=kwrd&gt;for&lt;/SPAN&gt; flags. Run &lt;SPAN class=str&gt;"xperf -help stackwalk"&lt;/SPAN&gt; &lt;/PRE&gt;&lt;PRE&gt;                                     &lt;SPAN class=kwrd&gt;for&lt;/SPAN&gt; more information.&lt;/PRE&gt;&lt;PRE class=alt&gt;        -Pids       pid [...]        Apply flags to processes pid [...].  Used &lt;SPAN class=kwrd&gt;in&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;                                     conjunction with &lt;SPAN class=kwrd&gt;private&lt;/SPAN&gt; loggers.&lt;/PRE&gt;&lt;PRE class=alt&gt;        -PidNewProcess &amp;lt;command-line&amp;gt;   Apply flags to a &lt;SPAN class=kwrd&gt;new&lt;/SPAN&gt; process xperf will &lt;/PRE&gt;&lt;PRE&gt;                                     start with &amp;lt;command-line&amp;gt;.  Used &lt;SPAN class=kwrd&gt;in&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE class=alt&gt;                                     conjunction with &lt;SPAN class=kwrd&gt;private&lt;/SPAN&gt; loggers.&lt;/PRE&gt;&lt;PRE&gt;        -heap                        Enable heap tracing &lt;SPAN class=kwrd&gt;in&lt;/SPAN&gt; processes specified &lt;/PRE&gt;&lt;PRE class=alt&gt;                                     by Pids and PidNewProcess.&lt;/PRE&gt;&lt;PRE&gt;        -critsec                     Enable critical section tracing &lt;SPAN class=kwrd&gt;in&lt;/SPAN&gt; processes&lt;/PRE&gt;&lt;PRE class=alt&gt;                                     specified by Pids and PidNewProcess.&lt;/PRE&gt;&lt;PRE&gt;        -SetProfInt [&amp;lt;n&amp;gt;] [cached]   Set sampled profile interval to &amp;lt;n&amp;gt; [1221 ..&lt;/PRE&gt;&lt;PRE class=alt&gt;                                     10000000].  If &lt;SPAN class=str&gt;"cached"&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;is&lt;/SPAN&gt; specified,&lt;/PRE&gt;&lt;PRE&gt;                                     intervals are cached &lt;SPAN class=kwrd&gt;in&lt;/SPAN&gt; ETW and reapplied&lt;/PRE&gt;&lt;PRE class=alt&gt;                                     whenever &lt;SPAN class=kwrd&gt;new&lt;/SPAN&gt; ETW kernel loggers with sampled&lt;/PRE&gt;&lt;PRE&gt;                                     profile are started. [Default: &amp;lt;n&amp;gt; = 10000; &lt;/PRE&gt;&lt;PRE class=alt&gt;                                     not cached]&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE class=alt&gt;    Multiple loggers can be started &lt;SPAN class=kwrd&gt;using&lt;/SPAN&gt; multiple -start options, each followed by&lt;/PRE&gt;&lt;PRE&gt;    the options to be applied to that logger.  If LoggerName, or -start LoggerName,&lt;/PRE&gt;&lt;PRE class=alt&gt;    &lt;SPAN class=kwrd&gt;is&lt;/SPAN&gt; omitted, the Kernel Logger &lt;SPAN class=kwrd&gt;is&lt;/SPAN&gt; implied.  Only a single instance of Kernel &lt;/PRE&gt;&lt;PRE&gt;    Logger can exist at any time.  If one of the loggers fails to start, all the &lt;/PRE&gt;&lt;PRE class=alt&gt;    already started loggers are stopped.&lt;/PRE&gt;&lt;/DIV&gt;
&lt;STYLE type=text/css&gt;

.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/STYLE&gt;

&lt;P&gt;The only required argument to –start is a set of flags.&amp;nbsp; The definition of Flags says to look at xperf providers to see what the possible flags are.&amp;nbsp; The help for that command says:&lt;/P&gt;
&lt;DIV class=csharpcode&gt;&lt;PRE class=alt&gt;C:\xperf&amp;gt;xperf -help providers&lt;/PRE&gt;&lt;PRE&gt;    Providers Query options:&lt;/PRE&gt;&lt;PRE class=alt&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE&gt;    xperf -providers [Installed|I] [Registered|R] [KernelFlags|KF] [KernelGroups|KG] [Kernel|K]&lt;/PRE&gt;&lt;PRE class=alt&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE&gt;    Query all installed/known and registered providers, &lt;SPAN class=kwrd&gt;as&lt;/SPAN&gt; well &lt;SPAN class=kwrd&gt;as&lt;/SPAN&gt; all known kernel flags and groups.&lt;/PRE&gt;&lt;PRE class=alt&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE&gt;    The following options are supported:&lt;/PRE&gt;&lt;PRE class=alt&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE&gt;        I,  Installed    : include Installed/known providers&lt;/PRE&gt;&lt;PRE class=alt&gt;        R,  Registered   : include Registered providers&lt;/PRE&gt;&lt;PRE&gt;        KF, KernelFlags  : include Kernel Flags&lt;/PRE&gt;&lt;PRE class=alt&gt;        KG, KernelGroups : include Kernel Groups&lt;/PRE&gt;&lt;PRE&gt;        K,  Kernel       : include Kernel flags and groups; shortcut &lt;SPAN class=kwrd&gt;for&lt;/SPAN&gt; &lt;SPAN class=str&gt;"KF KG"&lt;/SPAN&gt;.&lt;/PRE&gt;&lt;PRE class=alt&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE&gt;    If no options are specified, all providers are included &lt;SPAN class=kwrd&gt;in&lt;/SPAN&gt; the output.&lt;/PRE&gt;&lt;/DIV&gt;
&lt;STYLE type=text/css&gt;

.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/STYLE&gt;

&lt;P&gt;We want to look at DPC’s, so let’s dump just the kernel providers (if only because dumping all of them would probably exceed what I can post in one blog entry &lt;IMG alt=Smile src="http://messenger.msn.com/MMM2006-04-19_17.00/Resource/emoticons/regular_smile.gif" mce_src="http://messenger.msn.com/MMM2006-04-19_17.00/Resource/emoticons/regular_smile.gif"&gt;).&lt;/P&gt;
&lt;DIV class=csharpcode&gt;&lt;PRE class=alt&gt;C:\xperf&amp;gt;xperf -providers K&lt;/PRE&gt;&lt;PRE&gt;Kernel Flags:&lt;/PRE&gt;&lt;PRE class=alt&gt;       PROC_THREAD    : Process and Thread create/delete&lt;/PRE&gt;&lt;PRE&gt;       LOADER         : Kernel and user mode Image Load/Unload events&lt;/PRE&gt;&lt;PRE class=alt&gt;       PROFILE        : CPU Sample profile&lt;/PRE&gt;&lt;PRE&gt;       CSWITCH        : Context Switch&lt;/PRE&gt;&lt;PRE class=alt&gt;       COMPACT_CSWITCH: Compact Context Switch&lt;/PRE&gt;&lt;PRE&gt;       DISPATCHER     : CPU Scheduler&lt;/PRE&gt;&lt;PRE class=alt&gt;       DPC            : DPC Events&lt;/PRE&gt;&lt;PRE&gt;       INTERRUPT      : Interrupt events&lt;/PRE&gt;&lt;PRE class=alt&gt;       SYSCALL        : System calls&lt;/PRE&gt;&lt;PRE&gt;       PRIORITY       : Priority change events&lt;/PRE&gt;&lt;PRE class=alt&gt;       ALPC           : Advanced Local Procedure Call&lt;/PRE&gt;&lt;PRE&gt;       PERF_COUNTER   : Process Perf Counters&lt;/PRE&gt;&lt;PRE class=alt&gt;       DISK_IO        : Disk I/O&lt;/PRE&gt;&lt;PRE&gt;       DISK_IO_INIT   : Disk I/O Initiation&lt;/PRE&gt;&lt;PRE class=alt&gt;       FILE_IO        : File system operation end times and results&lt;/PRE&gt;&lt;PRE&gt;       FILE_IO_INIT   : File system operation (create/open/close/read/write)&lt;/PRE&gt;&lt;PRE class=alt&gt;       HARD_FAULTS    : Hard Page Faults&lt;/PRE&gt;&lt;PRE&gt;       FILENAME       : FileName (e.g., FileName create/delete/rundown)&lt;/PRE&gt;&lt;PRE class=alt&gt;       SPLIT_IO       : Split I/O&lt;/PRE&gt;&lt;PRE&gt;       REGISTRY       : Registry tracing&lt;/PRE&gt;&lt;PRE class=alt&gt;       DRIVERS        : Driver events&lt;/PRE&gt;&lt;PRE&gt;       POWER          : Power management events&lt;/PRE&gt;&lt;PRE class=alt&gt;       NETWORKTRACE   : Network events (e.g., tcp/udp send/receive)&lt;/PRE&gt;&lt;PRE&gt;       VIRT_ALLOC     : Virtual allocation reserve and release&lt;/PRE&gt;&lt;PRE class=alt&gt;       MEMINFO        : Memory List Info&lt;/PRE&gt;&lt;PRE&gt;       ALL_FAULTS     : All page faults including hard, Copy on write, demand zero faults, etc.&lt;/PRE&gt;&lt;PRE class=alt&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE&gt;Kernel Groups:&lt;/PRE&gt;&lt;PRE class=alt&gt;       Base           : PROC_THREAD+LOADER+DISK_IO+HARD_FAULTS+PROFILE+MEMINFO&lt;/PRE&gt;&lt;PRE&gt;       Diag           : PROC_THREAD+LOADER+DISK_IO+HARD_FAULTS+DPC+INTERRUPT+CSWITCH+PERF_COUNTER+COMPACT_CSWITCH&lt;/PRE&gt;&lt;PRE class=alt&gt;       DiagEasy       : PROC_THREAD+LOADER+DISK_IO+HARD_FAULTS+DPC+INTERRUPT+CSWITCH+PERF_COUNTER&lt;/PRE&gt;&lt;PRE&gt;       Latency        : PROC_THREAD+LOADER+DISK_IO+HARD_FAULTS+DPC+INTERRUPT+CSWITCH+PROFILE&lt;/PRE&gt;&lt;PRE class=alt&gt;       FileIO         : PROC_THREAD+LOADER+DISK_IO+HARD_FAULTS+FILE_IO+FILE_IO_INIT&lt;/PRE&gt;&lt;PRE&gt;       IOTrace        : PROC_THREAD+LOADER+DISK_IO+HARD_FAULTS+CSWITCH&lt;/PRE&gt;&lt;PRE class=alt&gt;       ResumeTrace    : PROC_THREAD+LOADER+DISK_IO+HARD_FAULTS+PROFILE+POWER&lt;/PRE&gt;&lt;PRE&gt;       SysProf        : PROC_THREAD+LOADER+PROFILE&lt;/PRE&gt;&lt;PRE class=alt&gt;       Network        : PROC_THREAD+LOADER+NETWORKTRACE&lt;/PRE&gt;&lt;/DIV&gt;
&lt;STYLE type=text/css&gt;

.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/STYLE&gt;

&lt;P&gt;That “Latency” group sounds interesting – it includes DPCs and interrupts along with process/thread create/delete and loader events (both of which it turns out are needed if you want to see what process anything is happening in).&amp;nbsp; So let’s start up a trace session for “Latency”.&amp;nbsp; &lt;/P&gt;
&lt;DIV class=csharpcode&gt;&lt;PRE class=alt&gt;C:\xperf&amp;gt;xperf -on Latency&lt;/PRE&gt;&lt;/DIV&gt;
&lt;STYLE type=text/css&gt;

.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/STYLE&gt;

&lt;P&gt;Now to create some “load” I'll use WMP to watch the stock footage of a bear in the river.&amp;nbsp; Then I exit WMP and stop the trace:&lt;/P&gt;
&lt;DIV class=csharpcode&gt;&lt;PRE class=alt&gt;C:\xperf&amp;gt;xperf -stop&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE class=alt&gt;C:\xperf&amp;gt;dir \kernel.etl&lt;/PRE&gt;&lt;PRE&gt; Volume &lt;SPAN class=kwrd&gt;in&lt;/SPAN&gt; drive C &lt;SPAN class=kwrd&gt;is&lt;/SPAN&gt; Safe&lt;/PRE&gt;&lt;PRE class=alt&gt; Volume Serial Number &lt;SPAN class=kwrd&gt;is&lt;/SPAN&gt; 042D-D2B2&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE class=alt&gt; Directory of C:\&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE class=alt&gt;10/06/2008  04:52 PM        16,384,000 kernel.etl&lt;/PRE&gt;&lt;PRE&gt;               1 File(s)     16,384,000 bytes&lt;/PRE&gt;&lt;PRE class=alt&gt;               0 Dir(s)  57,208,664,064 bytes free&lt;/PRE&gt;&lt;/DIV&gt;
&lt;STYLE type=text/css&gt;

.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/STYLE&gt;

&lt;P&gt;By default the kernel logger dumped all 16 MB of output into c:\kernel.etl.&amp;nbsp; Now if we want to see what’s in that file we can load it up with xperfview:&lt;/P&gt;
&lt;DIV class=csharpcode&gt;&lt;PRE class=alt&gt;C:\xperf&amp;gt;xperfview \kernel.etl&lt;/PRE&gt;&lt;/DIV&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/peterwie/WindowsLiveWriter/MeasuringDPCtime_EA29/image_4.png" mce_href="http://blogs.msdn.com/blogfiles/peterwie/WindowsLiveWriter/MeasuringDPCtime_EA29/image_4.png"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=image border=0 alt=image src="http://blogs.msdn.com/blogfiles/peterwie/WindowsLiveWriter/MeasuringDPCtime_EA29/image_thumb_1.png" width=639 height=484 mce_src="http://blogs.msdn.com/blogfiles/peterwie/WindowsLiveWriter/MeasuringDPCtime_EA29/image_thumb_1.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;These are two of 15 different graphs that XPerf makes available from the .ETL file.&amp;nbsp; Here we can see the CPU time for both of my CPUs as well as a count of disk I/O operations in flight over the collection period.&amp;nbsp; I have pulled out the menu of “frames” that you can enable (clicking on the chevron in the middle will make it disappear or reappear).&lt;/P&gt;
&lt;P&gt;Let’s say that I want to drill in on this a little bit, and look at CPU time just for a single process – say WMPLAYER.EXE since I was watching a video.&amp;nbsp; I can select the “CPU Sampling by Process” option from the frame list:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/peterwie/WindowsLiveWriter/MeasuringDPCtime_EA29/image_8.png" mce_href="http://blogs.msdn.com/blogfiles/peterwie/WindowsLiveWriter/MeasuringDPCtime_EA29/image_8.png"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=image border=0 alt=image src="http://blogs.msdn.com/blogfiles/peterwie/WindowsLiveWriter/MeasuringDPCtime_EA29/image_thumb_3.png" width=644 height=232 mce_src="http://blogs.msdn.com/blogfiles/peterwie/WindowsLiveWriter/MeasuringDPCtime_EA29/image_thumb_3.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;And then click the down arrow next to “Processes” and select just WMPLAYER.EXE (The short cut to do this is to click All, then click it again to unselect everything, then scroll and find just the one or two processes that you need").&amp;nbsp; If we do this with Disk Utilization as well, and remove the intervening frames we can get a side-by-side view of CPU activity and disk I/O for one process that looks like this:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/peterwie/WindowsLiveWriter/MeasuringDPCtime_EA29/image_10.png" mce_href="http://blogs.msdn.com/blogfiles/peterwie/WindowsLiveWriter/MeasuringDPCtime_EA29/image_10.png"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=image border=0 alt=image src="http://blogs.msdn.com/blogfiles/peterwie/WindowsLiveWriter/MeasuringDPCtime_EA29/image_thumb_4.png" width=636 height=484 mce_src="http://blogs.msdn.com/blogfiles/peterwie/WindowsLiveWriter/MeasuringDPCtime_EA29/image_thumb_4.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We can also overlay the DPC activity on top of the CPU graph if we want.&amp;nbsp; Right click in the CPU Sampling by processor frame and choose “Overlay Graph” then “DPC CPU Usage” and “All” processors:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/peterwie/WindowsLiveWriter/MeasuringDPCtime_EA29/image_12.png" mce_href="http://blogs.msdn.com/blogfiles/peterwie/WindowsLiveWriter/MeasuringDPCtime_EA29/image_12.png"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=image border=0 alt=image src="http://blogs.msdn.com/blogfiles/peterwie/WindowsLiveWriter/MeasuringDPCtime_EA29/image_thumb_5.png" width=644 height=230 mce_src="http://blogs.msdn.com/blogfiles/peterwie/WindowsLiveWriter/MeasuringDPCtime_EA29/image_thumb_5.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;The red and blue lines are CPU 0 and CPU 1 respectively, with the yellow line still showing normal CPU utilization for WMPLAYER.EXE.&lt;/P&gt;
&lt;P&gt;XPerfView also has the ability to show you your data in pivot-table form.&amp;nbsp; Let’s say we want to look at DPC CPU Utilization.&amp;nbsp; Right click on any frame showing DPC data (either the merged graph we just setup above, or re-enable the DPC frame from the frame list) and choose “Summary Table” and you’ll get something like this:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/peterwie/WindowsLiveWriter/MeasuringDPCtime_EA29/image_14.png" mce_href="http://blogs.msdn.com/blogfiles/peterwie/WindowsLiveWriter/MeasuringDPCtime_EA29/image_14.png"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=image border=0 alt=image src="http://blogs.msdn.com/blogfiles/peterwie/WindowsLiveWriter/MeasuringDPCtime_EA29/image_thumb_6.png" width=644 height=362 mce_src="http://blogs.msdn.com/blogfiles/peterwie/WindowsLiveWriter/MeasuringDPCtime_EA29/image_thumb_6.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is showing us every DPC event in the .ETL file.&amp;nbsp; The columns on the left of the yellow line control how the data is grouped and the columns to the right of the line show us the aggregate results for that grouping.&amp;nbsp; Here we’re grouped by module name and we can see the total count and average and max duration of all of the DPCs for that module.&amp;nbsp; NDIS stands out with a 2.6 ms DPC.&amp;nbsp; If you want to see every DPC in a particular module (sorted by “Enter Time”) you can click the + box next to the name and the view will expand.&lt;/P&gt;
&lt;P&gt;Let’s say we want to see all the entries grouped not just by module but by the actual DPC routine within that module.&amp;nbsp; The function column shows us the address of the DPC routine that was executed.&amp;nbsp; If we drag that to the right of the yellow line we get a new grouping:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/peterwie/WindowsLiveWriter/MeasuringDPCtime_EA29/image_16.png" mce_href="http://blogs.msdn.com/blogfiles/peterwie/WindowsLiveWriter/MeasuringDPCtime_EA29/image_16.png"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=image border=0 alt=image src="http://blogs.msdn.com/blogfiles/peterwie/WindowsLiveWriter/MeasuringDPCtime_EA29/image_thumb_7.png" width=636 height=484 mce_src="http://blogs.msdn.com/blogfiles/peterwie/WindowsLiveWriter/MeasuringDPCtime_EA29/image_thumb_7.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;For each module we can see which DPC function is being called the most and which one is taking up so much time.&amp;nbsp; You can use this to find out other things, like which threads in WMP are taking up time and what thread routine they are running.&amp;nbsp; Go back and enable the CPU Utilization by processor frame then get a summary table for that:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/peterwie/WindowsLiveWriter/MeasuringDPCtime_EA29/image_18.png" mce_href="http://blogs.msdn.com/blogfiles/peterwie/WindowsLiveWriter/MeasuringDPCtime_EA29/image_18.png"&gt;&lt;IMG style="BORDER-RIGHT-WIDTH: 0px; DISPLAY: inline; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px" title=image border=0 alt=image src="http://blogs.msdn.com/blogfiles/peterwie/WindowsLiveWriter/MeasuringDPCtime_EA29/image_thumb_8.png" width=644 height=470 mce_src="http://blogs.msdn.com/blogfiles/peterwie/WindowsLiveWriter/MeasuringDPCtime_EA29/image_thumb_8.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;This would all be more impressive if symbol loading were working.&amp;nbsp; In theory XPerf can load symbols and use them to determine the name of the function rather than just showing an address or “Unknown”.&amp;nbsp; However I’ve rarely gotten symbol loading to work, and when it does work it still seems pretty fragile.&amp;nbsp; If you use xperf –help symbols it provides some help on getting symbols working.&lt;/P&gt;
&lt;P&gt;There’s one more handy trick that I found while I was trying to get symbols to work.&amp;nbsp; XPerf.exe has some processing options too.&amp;nbsp; XPerf –help processing shows us a list of the options:&lt;/P&gt;
&lt;DIV class=csharpcode&gt;&lt;PRE class=alt&gt;C:\xperf&amp;gt;xperf -help processing&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE class=alt&gt;    Trace Post-Processing options:&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE class=alt&gt;        xperf -I &amp;lt;trace file&amp;gt; ... [-o output] [-symbols ...] [-target {human|machine}]&lt;/PRE&gt;&lt;PRE&gt;                           [-a action ... [-a action ...] ...]&lt;/PRE&gt;&lt;PRE class=alt&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE&gt;        -I       trace file       The trace file to be processed.&lt;/PRE&gt;&lt;PRE class=alt&gt;        -o       output file      Optional, the name of the file that output goes to.  If not&lt;/PRE&gt;&lt;PRE&gt;                                  given, stdout &lt;SPAN class=kwrd&gt;is&lt;/SPAN&gt; used.&lt;/PRE&gt;&lt;PRE class=alt&gt;        -symbols [options]        Enable and configure symbol decoding support.&lt;/PRE&gt;&lt;PRE&gt; See &lt;SPAN class=str&gt;"xperf&lt;/PRE&gt;&lt;PRE class=alt&gt;                                  -help symbols"&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;for&lt;/SPAN&gt; detailed help&lt;/PRE&gt;&lt;PRE&gt;        -target  {human|machine}  Select the target audience of the output. Default &lt;SPAN class=kwrd&gt;is&lt;/SPAN&gt; human.&lt;/PRE&gt;&lt;PRE class=alt&gt;        -quiet                    Do not print progress information.&lt;/PRE&gt;&lt;PRE&gt;        -tle                      Process the trace even &lt;SPAN class=kwrd&gt;in&lt;/SPAN&gt; the presence of lost events.&lt;/PRE&gt;&lt;PRE class=alt&gt;        -tti                      Process the trace even &lt;SPAN class=kwrd&gt;in&lt;/SPAN&gt; the presence of time inversions.&lt;/PRE&gt;&lt;PRE&gt;        -a       action ...       Optional, the actions to take.  Default action &lt;SPAN class=kwrd&gt;is&lt;/SPAN&gt; to dump&lt;/PRE&gt;&lt;PRE class=alt&gt;                                  the &lt;SPAN class=kwrd&gt;event&lt;/SPAN&gt; &lt;SPAN class=kwrd&gt;in&lt;/SPAN&gt; text form.&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE class=alt&gt;    Examples:&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE class=alt&gt;        xperf -I trace.etl -o &lt;SPAN class=kwrd&gt;out&lt;/SPAN&gt;.csv      : dump the events &lt;SPAN class=kwrd&gt;in&lt;/SPAN&gt; trace.etl to file &lt;SPAN class=kwrd&gt;out&lt;/SPAN&gt;.csv&lt;/PRE&gt;&lt;PRE&gt;        xperf -help registry               : print help on action registry&lt;/PRE&gt;&lt;PRE class=alt&gt;        xperf -I trace.etl -a registry     : print registry access statistics to stdout&lt;/PRE&gt;&lt;PRE&gt;        xperf -I trace32.etl trace64.etl -o &lt;SPAN class=kwrd&gt;out&lt;/SPAN&gt;.csv : dump the events &lt;SPAN class=kwrd&gt;in&lt;/SPAN&gt; trace32.etl and trace64.etl to file &lt;SPAN class=kwrd&gt;out&lt;/SPAN&gt;.csv&lt;/PRE&gt;&lt;PRE class=alt&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE&gt;    Available Actions:&lt;/PRE&gt;&lt;PRE class=alt&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE&gt;        boot             Show boot and shutdown statistics&lt;/PRE&gt;&lt;PRE class=alt&gt;        bootprefetch     Show boot-time prefetching information&lt;/PRE&gt;&lt;PRE&gt;        cpudisk          Show CPU/Disk activity report&lt;/PRE&gt;&lt;PRE class=alt&gt;        cswitch          Show Context Switch data&lt;/PRE&gt;&lt;PRE&gt;        diskio           Show Disk IO Statistics&lt;/PRE&gt;&lt;PRE class=alt&gt;        dpcisr           Show DPC/ISR Statistics&lt;/PRE&gt;&lt;PRE&gt;        drvdelay         Show Driver delays&lt;/PRE&gt;&lt;PRE class=alt&gt;        dumper           Dump events &lt;SPAN class=kwrd&gt;in&lt;/SPAN&gt; the trace &lt;SPAN class=kwrd&gt;in&lt;/SPAN&gt; text form&lt;/PRE&gt;&lt;PRE&gt;        filename         Show File Names &lt;SPAN class=kwrd&gt;in&lt;/SPAN&gt; the trace&lt;/PRE&gt;&lt;PRE class=alt&gt;        focuschange      Show the Windows thread focus change events &lt;SPAN class=kwrd&gt;in&lt;/SPAN&gt; the trace&lt;/PRE&gt;&lt;PRE&gt;        hardfault        Show hard fault statistics by process and file.&lt;/PRE&gt;&lt;PRE class=alt&gt;        marks            Show Marks Information&lt;/PRE&gt;&lt;PRE&gt;        pagefault        Show page fault information &lt;SPAN class=kwrd&gt;in&lt;/SPAN&gt; the trace&lt;/PRE&gt;&lt;PRE class=alt&gt;        perfctrs         Show process performance counters.&lt;/PRE&gt;&lt;PRE&gt;        pnp              Show PnP events &lt;SPAN class=kwrd&gt;in&lt;/SPAN&gt; the trace&lt;/PRE&gt;&lt;PRE class=alt&gt;        prefetch         Show Prefetch Information&lt;/PRE&gt;&lt;PRE&gt;        process          Show process, thread, image information&lt;/PRE&gt;&lt;PRE class=alt&gt;        profile          Show Sampled profiler data&lt;/PRE&gt;&lt;PRE&gt;        readyBoot        Show ReadyBoot statistics&lt;/PRE&gt;&lt;PRE class=alt&gt;        registry         Show Registry Access Statistics&lt;/PRE&gt;&lt;PRE&gt;        services         Show service status information&lt;/PRE&gt;&lt;PRE class=alt&gt;        shutdown         Show shutdown statistics&lt;/PRE&gt;&lt;PRE&gt;        stack            Show Stack Information&lt;/PRE&gt;&lt;PRE class=alt&gt;        suspend          Show Suspend Transition Information&lt;/PRE&gt;&lt;PRE&gt;        sysconfig        Show System Configuration&lt;/PRE&gt;&lt;PRE class=alt&gt;        tracestats       Show Trace Statistics&lt;/PRE&gt;&lt;PRE&gt;        winlogon         Show Winlogon events &lt;SPAN class=kwrd&gt;in&lt;/SPAN&gt; the trace&lt;/PRE&gt;&lt;PRE class=alt&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE&gt;    xperf -help &amp;lt;action&amp;gt; [&amp;lt;action&amp;gt; ...] &lt;SPAN class=kwrd&gt;for&lt;/SPAN&gt; detailed help&lt;/PRE&gt;&lt;PRE class=alt&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE&gt;    If no action &lt;SPAN class=kwrd&gt;is&lt;/SPAN&gt; present, dumper will be invoked.&lt;/PRE&gt;&lt;/DIV&gt;
&lt;STYLE type=text/css&gt;

.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/STYLE&gt;

&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Since this all started with DPC latency, let’s try out that dpcisr action, which will “Show DPC/ISR Statistics” and see what it has:&lt;/P&gt;
&lt;DIV class=csharpcode&gt;&lt;PRE class=alt&gt;C:\xperf&amp;gt;xperf -I \kernel.etl -symbols verbose -a dpcisr&lt;/PRE&gt;&lt;PRE&gt;xperf: Using symbol path: srv*c:\DownstreamStore*http:&lt;SPAN class=rem&gt;//msdl.microsoft.com/download/symbols&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE class=alt&gt;xperf: Using executable path: srv*c:\DownstreamStore*http:&lt;SPAN class=rem&gt;//msdl.microsoft.com/download/symbols&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE&gt;xperf: Using SymCache path: c:\DownstreamStore&lt;/PRE&gt;&lt;PRE class=alt&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE&gt;--------------------------&lt;/PRE&gt;&lt;PRE class=alt&gt;DPC Info&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE class=alt&gt;--------------------------&lt;/PRE&gt;&lt;PRE&gt;CPU Usage Summing By Module For the Whole Trace&lt;/PRE&gt;&lt;PRE class=alt&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE&gt;CPU Usage from 0 us to 24682000 us:&lt;/PRE&gt;&lt;PRE class=alt&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE&gt;     CPU 0 Usage      CPU 1 Usage&lt;/PRE&gt;&lt;PRE class=alt&gt;     usec      %      usec      % Module&lt;/PRE&gt;&lt;PRE&gt;      248   0.00         0   0.00 CLASSPNP.SYS&lt;/PRE&gt;&lt;PRE class=alt&gt;       31   0.00         0   0.00 HTTP.sys&lt;/PRE&gt;&lt;PRE&gt;      562   0.00         0   0.00 NETIO.SYS&lt;/PRE&gt;&lt;PRE class=alt&gt;       17   0.00         0   0.00 Ntfs.sys&lt;/PRE&gt;&lt;PRE&gt;     5121   0.02         0   0.00 USBPORT.SYS&lt;/PRE&gt;&lt;PRE class=alt&gt;      273   0.00         0   0.00 afd.sys&lt;/PRE&gt;&lt;PRE&gt;    16752   0.07       135   0.00 ataport.SYS&lt;/PRE&gt;&lt;PRE class=alt&gt;      101   0.00        36   0.00 b57nd60x.sys&lt;/PRE&gt;&lt;PRE&gt;        1   0.00         0   0.00 fltmgr.sys&lt;/PRE&gt;&lt;PRE class=alt&gt;        5   0.00         0   0.00 hal.dll&lt;/PRE&gt;&lt;PRE&gt;     3851   0.02         0   0.00 i8042prt.sys&lt;/PRE&gt;&lt;PRE class=alt&gt;       14   0.00         0   0.00 luafv.sys&lt;/PRE&gt;&lt;PRE&gt;   981815   3.98         0   0.00 ndis.sys&lt;/PRE&gt;&lt;PRE class=alt&gt;      239   0.00         0   0.00 netbt.sys&lt;/PRE&gt;&lt;PRE&gt;     2364   0.01       227   0.00 ntkrnlpa.exe&lt;/PRE&gt;&lt;PRE class=alt&gt;    37360   0.15         0   0.00 portcls.sys&lt;/PRE&gt;&lt;PRE&gt;      119   0.00       103   0.00 rassstp.sys&lt;/PRE&gt;&lt;PRE class=alt&gt;      317   0.00         0   0.00 rdbss.sys&lt;/PRE&gt;&lt;PRE&gt;       27   0.00        17   0.00 srv.sys&lt;/PRE&gt;&lt;PRE class=alt&gt;        4   0.00         0   0.00 srvnet.sys&lt;/PRE&gt;&lt;PRE&gt;    62926   0.25     49358   0.20 tcpip.sys&lt;/PRE&gt;&lt;PRE class=alt&gt;     5054   0.02         0   0.00 usbhub.sys&lt;/PRE&gt;&lt;PRE&gt;        6   0.00         0   0.00 watchdog.sys&lt;/PRE&gt;&lt;PRE class=alt&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE&gt;Total = 43599&lt;/PRE&gt;&lt;PRE class=alt&gt;Elapsed Time, &amp;gt;        0 usecs AND &amp;lt;=        1 usecs,     49, or   0.11%&lt;/PRE&gt;&lt;PRE&gt;Elapsed Time, &amp;gt;        1 usecs AND &amp;lt;=        2 usecs,    379, or   0.87%&lt;/PRE&gt;&lt;PRE class=alt&gt;Elapsed Time, &amp;gt;        2 usecs AND &amp;lt;=        4 usecs,  10388, or  23.83%&lt;/PRE&gt;&lt;PRE&gt;Elapsed Time, &amp;gt;        4 usecs AND &amp;lt;=        8 usecs,   9765, or  22.40%&lt;/PRE&gt;&lt;PRE class=alt&gt;Elapsed Time, &amp;gt;        8 usecs AND &amp;lt;=       16 usecs,   7806, or  17.90%&lt;/PRE&gt;&lt;PRE&gt;Elapsed Time, &amp;gt;       16 usecs AND &amp;lt;=       32 usecs,   3885, or   8.91%&lt;/PRE&gt;&lt;PRE class=alt&gt;Elapsed Time, &amp;gt;       32 usecs AND &amp;lt;=       64 usecs,   5375, or  12.33%&lt;/PRE&gt;&lt;PRE&gt;Elapsed Time, &amp;gt;       64 usecs AND &amp;lt;=      128 usecs,   5175, or  11.87%&lt;/PRE&gt;&lt;PRE class=alt&gt;Elapsed Time, &amp;gt;      128 usecs AND &amp;lt;=      256 usecs,    639, or   1.47%&lt;/PRE&gt;&lt;PRE&gt;Elapsed Time, &amp;gt;      256 usecs AND &amp;lt;=      512 usecs,     55, or   0.13%&lt;/PRE&gt;&lt;PRE class=alt&gt;Elapsed Time, &amp;gt;      512 usecs AND &amp;lt;=     1024 usecs,     55, or   0.13%&lt;/PRE&gt;&lt;PRE&gt;Elapsed Time, &amp;gt;     1024 usecs AND &amp;lt;=     2048 usecs,     22, or   0.05%&lt;/PRE&gt;&lt;PRE class=alt&gt;Elapsed Time, &amp;gt;     2048 usecs AND &amp;lt;=     4096 usecs,      6, or   0.01%&lt;/PRE&gt;&lt;PRE&gt;Total,                                                 43599&lt;/PRE&gt;&lt;PRE class=alt&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE&gt;Total = 10 &lt;SPAN class=kwrd&gt;for&lt;/SPAN&gt; module CLASSPNP.SYS&lt;/PRE&gt;&lt;PRE class=alt&gt;Elapsed Time, &amp;gt;        0 usecs AND &amp;lt;=        1 usecs,      2, or  20.00%&lt;/PRE&gt;&lt;PRE&gt;Elapsed Time, &amp;gt;        1 usecs AND &amp;lt;=        2 usecs,      3, or  30.00%&lt;/PRE&gt;&lt;PRE class=alt&gt;Elapsed Time, &amp;gt;        2 usecs AND &amp;lt;=        4 usecs,      0, or   0.00%&lt;/PRE&gt;&lt;PRE&gt;Elapsed Time, &amp;gt;        4 usecs AND &amp;lt;=        8 usecs,      0, or   0.00%&lt;/PRE&gt;&lt;PRE class=alt&gt;Elapsed Time, &amp;gt;        8 usecs AND &amp;lt;=       16 usecs,      0, or   0.00%&lt;/PRE&gt;&lt;PRE&gt;Elapsed Time, &amp;gt;       16 usecs AND &amp;lt;=       32 usecs,      0, or   0.00%&lt;/PRE&gt;&lt;PRE class=alt&gt;Elapsed Time, &amp;gt;       32 usecs AND &amp;lt;=       64 usecs,      5, or  50.00%&lt;/PRE&gt;&lt;PRE&gt;Total,                                                    10&lt;/PRE&gt;&lt;PRE class=alt&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE&gt;Total = 8 &lt;SPAN class=kwrd&gt;for&lt;/SPAN&gt; module HTTP.sys&lt;/PRE&gt;&lt;PRE class=alt&gt;Elapsed Time, &amp;gt;        0 usecs AND &amp;lt;=        1 usecs,      0, or   0.00%&lt;/PRE&gt;&lt;PRE&gt;Elapsed Time, &amp;gt;        1 usecs AND &amp;lt;=        2 usecs,      1, or  12.50%&lt;/PRE&gt;&lt;PRE class=alt&gt;Elapsed Time, &amp;gt;        2 usecs AND &amp;lt;=        4 usecs,      3, or  37.50%&lt;/PRE&gt;&lt;PRE&gt;Elapsed Time, &amp;gt;        4 usecs AND &amp;lt;=        8 usecs,      4, or  50.00%&lt;/PRE&gt;&lt;PRE class=alt&gt;Total,                                                     8&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE class=alt&gt;Total = 124 &lt;SPAN class=kwrd&gt;for&lt;/SPAN&gt; module NETIO.SYS&lt;/PRE&gt;&lt;PRE&gt;Elapsed Time, &amp;gt;        0 usecs AND &amp;lt;=        1 usecs,      0, or   0.00%&lt;/PRE&gt;&lt;PRE class=alt&gt;Elapsed Time, &amp;gt;        1 usecs AND &amp;lt;=        2 usecs,      0, or   0.00%&lt;/PRE&gt;&lt;PRE&gt;Elapsed Time, &amp;gt;        2 usecs AND &amp;lt;=        4 usecs,     57, or  45.97%&lt;/PRE&gt;&lt;PRE class=alt&gt;Elapsed Time, &amp;gt;        4 usecs AND &amp;lt;=        8 usecs,     61, or  49.19%&lt;/PRE&gt;&lt;PRE&gt;Elapsed Time, &amp;gt;        8 usecs AND &amp;lt;=       16 usecs,      5, or   4.03%&lt;/PRE&gt;&lt;PRE class=alt&gt;Elapsed Time, &amp;gt;       16 usecs AND &amp;lt;=       32 usecs,      1, or   0.81%&lt;/PRE&gt;&lt;PRE&gt;Total,                                                   124&lt;/PRE&gt;&lt;PRE class=alt&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE&gt;Total = 5 &lt;SPAN class=kwrd&gt;for&lt;/SPAN&gt; module Ntfs.sys&lt;/PRE&gt;&lt;PRE class=alt&gt;Elapsed Time, &amp;gt;        0 usecs AND &amp;lt;=        1 usecs,      0, or   0.00%&lt;/PRE&gt;&lt;PRE&gt;Elapsed Time, &amp;gt;        1 usecs AND &amp;lt;=        2 usecs,      0, or   0.00%&lt;/PRE&gt;&lt;PRE class=alt&gt;Elapsed Time, &amp;gt;        2 usecs AND &amp;lt;=        4 usecs,      4, or  80.00%&lt;/PRE&gt;&lt;PRE&gt;Elapsed Time, &amp;gt;        4 usecs AND &amp;lt;=        8 usecs,      1, or  20.00%&lt;/PRE&gt;&lt;PRE class=alt&gt;Total,                                                     5&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE class=alt&gt;Total = 481 &lt;SPAN class=kwrd&gt;for&lt;/SPAN&gt; module USBPORT.SYS&lt;/PRE&gt;&lt;PRE&gt;Elapsed Time, &amp;gt;        0 usecs AND &amp;lt;=        1 usecs,      0, or   0.00%&lt;/PRE&gt;&lt;PRE class=alt&gt;Elapsed Time, &amp;gt;        1 usecs AND &amp;lt;=        2 usecs,      0, or   0.00%&lt;/PRE&gt;&lt;PRE&gt;Elapsed Time, &amp;gt;        2 usecs AND &amp;lt;=        4 usecs,     81, or  16.84%&lt;/PRE&gt;&lt;PRE class=alt&gt;Elapsed Time, &amp;gt;        4 usecs AND &amp;lt;=        8 usecs,     64, or  13.31%&lt;/PRE&gt;&lt;PRE&gt;Elapsed Time, &amp;gt;        8 usecs AND &amp;lt;=       16 usecs,    257, or  53.43%&lt;/PRE&gt;&lt;PRE class=alt&gt;Elapsed Time, &amp;gt;       16 usecs AND &amp;lt;=       32 usecs,     76, or  15.80%&lt;/PRE&gt;&lt;PRE&gt;Elapsed Time, &amp;gt;       32 usecs AND &amp;lt;=       64 usecs,      3, or   0.62%&lt;/PRE&gt;&lt;PRE class=alt&gt;Total,                                                   481&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE class=alt&gt;Total = 44 &lt;SPAN class=kwrd&gt;for&lt;/SPAN&gt; module afd.sys&lt;/PRE&gt;&lt;PRE&gt;Elapsed Time, &amp;gt;        0 usecs AND &amp;lt;=        1 usecs,      0, or   0.00%&lt;/PRE&gt;&lt;PRE class=alt&gt;Elapsed Time, &amp;gt;        1 usecs AND &amp;lt;=        2 usecs,      1, or   2.27%&lt;/PRE&gt;&lt;PRE&gt;Elapsed Time, &amp;gt;        2 usecs AND &amp;lt;=        4 usecs,      3, or   6.82%&lt;/PRE&gt;&lt;PRE class=alt&gt;Elapsed Time, &amp;gt;        4 usecs AND &amp;lt;=        8 usecs,     30, or  68.18%&lt;/PRE&gt;&lt;PRE&gt;Elapsed Time, &amp;gt;        8 usecs AND &amp;lt;=       16 usecs,      9, or  20.45%&lt;/PRE&gt;&lt;PRE class=alt&gt;Elapsed Time, &amp;gt;       16 usecs AND &amp;lt;=       32 usecs,      1, or   2.27%&lt;/PRE&gt;&lt;PRE&gt;Total,                                                    44&lt;/PRE&gt;&lt;PRE class=alt&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE&gt;Total = 736 &lt;SPAN class=kwrd&gt;for&lt;/SPAN&gt; module ataport.SYS&lt;/PRE&gt;&lt;PRE class=alt&gt;Elapsed Time, &amp;gt;        0 usecs AND &amp;lt;=        1 usecs,      0, or   0.00%&lt;/PRE&gt;&lt;PRE&gt;Elapsed Time, &amp;gt;        1 usecs AND &amp;lt;=        2 usecs,      0, or   0.00%&lt;/PRE&gt;&lt;PRE class=alt&gt;Elapsed Time, &amp;gt;        2 usecs AND &amp;lt;=        4 usecs,     15, or   2.04%&lt;/PRE&gt;&lt;PRE&gt;Elapsed Time, &amp;gt;        4 usecs AND &amp;lt;=        8 usecs,     28, or   3.80%&lt;/PRE&gt;&lt;PRE class=alt&gt;Elapsed Time, &amp;gt;        8 usecs AND &amp;lt;=       16 usecs,    207, or  28.13%&lt;/PRE&gt;&lt;PRE&gt;Elapsed Time, &amp;gt;       16 usecs AND &amp;lt;=       32 usecs,    335, or  45.52%&lt;/PRE&gt;&lt;PRE class=alt&gt;Elapsed Time, &amp;gt;       32 usecs AND &amp;lt;=       64 usecs,    139, or  18.89%&lt;/PRE&gt;&lt;PRE&gt;Elapsed Time, &amp;gt;       64 usecs AND &amp;lt;=      128 usecs,     12, or   1.63%&lt;/PRE&gt;&lt;PRE class=alt&gt;Total,                                                   736&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE class=alt&gt;Total = 50 &lt;SPAN class=kwrd&gt;for&lt;/SPAN&gt; module b57nd60x.sys&lt;/PRE&gt;&lt;PRE&gt;Elapsed Time, &amp;gt;        0 usecs AND &amp;lt;=        1 usecs,      0, or   0.00%&lt;/PRE&gt;&lt;PRE class=alt&gt;Elapsed Time, &amp;gt;        1 usecs AND &amp;lt;=        2 usecs,     23, or  46.00%&lt;/PRE&gt;&lt;PRE&gt;Elapsed Time, &amp;gt;        2 usecs AND &amp;lt;=        4 usecs,     19, or  38.00%&lt;/PRE&gt;&lt;PRE class=alt&gt;Elapsed Time, &amp;gt;        4 usecs AND &amp;lt;=        8 usecs,      6, or  12.00%&lt;/PRE&gt;&lt;PRE&gt;Elapsed Time, &amp;gt;        8 usecs AND &amp;lt;=       16 usecs,      1, or   2.00%&lt;/PRE&gt;&lt;PRE class=alt&gt;Elapsed Time, &amp;gt;       16 usecs AND &amp;lt;=       32 usecs,      1, or   2.00%&lt;/PRE&gt;&lt;PRE&gt;Total,                                                    50&lt;/PRE&gt;&lt;PRE class=alt&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE&gt;Total = 1 &lt;SPAN class=kwrd&gt;for&lt;/SPAN&gt; module fltmgr.sys&lt;/PRE&gt;&lt;PRE class=alt&gt;Elapsed Time, &amp;gt;        0 usecs AND &amp;lt;=        1 usecs,      0, or   0.00%&lt;/PRE&gt;&lt;PRE&gt;Elapsed Time, &amp;gt;        1 usecs AND &amp;lt;=        2 usecs,      1, or 100.00%&lt;/PRE&gt;&lt;PRE class=alt&gt;Total,                                                     1&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE class=alt&gt;Total = 1 &lt;SPAN class=kwrd&gt;for&lt;/SPAN&gt; module hal.dll&lt;/PRE&gt;&lt;PRE&gt;Elapsed Time, &amp;gt;        0 usecs AND &amp;lt;=        1 usecs,      0, or   0.00%&lt;/PRE&gt;&lt;PRE class=alt&gt;Elapsed Time, &amp;gt;        1 usecs AND &amp;lt;=        2 usecs,      0, or   0.00%&lt;/PRE&gt;&lt;PRE&gt;Elapsed Time, &amp;gt;        2 usecs AND &amp;lt;=        4 usecs,      0, or   0.00%&lt;/PRE&gt;&lt;PRE class=alt&gt;Elapsed Time, &amp;gt;        4 usecs AND &amp;lt;=        8 usecs,      1, or 100.00%&lt;/PRE&gt;&lt;PRE&gt;Total,                                                     1&lt;/PRE&gt;&lt;PRE class=alt&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE&gt;Total = 329 &lt;SPAN class=kwrd&gt;for&lt;/SPAN&gt; module i8042prt.sys&lt;/PRE&gt;&lt;PRE class=alt&gt;Elapsed Time, &amp;gt;        0 usecs AND &amp;lt;=        1 usecs,      0, or   0.00%&lt;/PRE&gt;&lt;PRE&gt;Elapsed Time, &amp;gt;        1 usecs AND &amp;lt;=        2 usecs,      0, or   0.00%&lt;/PRE&gt;&lt;PRE class=alt&gt;Elapsed Time, &amp;gt;        2 usecs AND &amp;lt;=        4 usecs,      0, or   0.00%&lt;/PRE&gt;&lt;PRE&gt;Elapsed Time, &amp;gt;        4 usecs AND &amp;lt;=        8 usecs,      9, or   2.74%&lt;/PRE&gt;&lt;PRE class=alt&gt;Elapsed Time, &amp;gt;        8 usecs AND &amp;lt;=       16 usecs,    298, or  90.58%&lt;/PRE&gt;&lt;PRE&gt;Elapsed Time, &amp;gt;       16 usecs AND &amp;lt;=       32 usecs,     22, or   6.69%&lt;/PRE&gt;&lt;PRE class=alt&gt;Total,                                                   329&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE class=alt&gt;Total = 5 &lt;SPAN class=kwrd&gt;for&lt;/SPAN&gt; module luafv.sys&lt;/PRE&gt;&lt;PRE&gt;Elapsed Time, &amp;gt;        0 usecs AND &amp;lt;=        1 usecs,      0, or   0.00%&lt;/PRE&gt;&lt;PRE class=alt&gt;Elapsed Time, &amp;gt;        1 usecs AND &amp;lt;=        2 usecs,      1, or  20.00%&lt;/PRE&gt;&lt;PRE&gt;Elapsed Time, &amp;gt;        2 usecs AND &amp;lt;=        4 usecs,      3, or  60.00%&lt;/PRE&gt;&lt;PRE class=alt&gt;Elapsed Time, &amp;gt;        4 usecs AND &amp;lt;=        8 usecs,      1, or  20.00%&lt;/PRE&gt;&lt;PRE&gt;Total,                                                     5&lt;/PRE&gt;&lt;PRE class=alt&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE&gt;Total = 32833 &lt;SPAN class=kwrd&gt;for&lt;/SPAN&gt; module ndis.sys&lt;/PRE&gt;&lt;PRE class=alt&gt;Elapsed Time, &amp;gt;        0 usecs AND &amp;lt;=        1 usecs,      0, or   0.00%&lt;/PRE&gt;&lt;PRE&gt;Elapsed Time, &amp;gt;        1 usecs AND &amp;lt;=        2 usecs,    178, or   0.54%&lt;/PRE&gt;&lt;PRE class=alt&gt;Elapsed Time, &amp;gt;        2 usecs AND &amp;lt;=        4 usecs,   9073, or  27.63%&lt;/PRE&gt;&lt;PRE&gt;Elapsed Time, &amp;gt;        4 usecs AND &amp;lt;=        8 usecs,   7653, or  23.31%&lt;/PRE&gt;&lt;PRE class=alt&gt;Elapsed Time, &amp;gt;        8 usecs AND &amp;lt;=       16 usecs,   4082, or  12.43%&lt;/PRE&gt;&lt;PRE&gt;Elapsed Time, &amp;gt;       16 usecs AND &amp;lt;=       32 usecs,   1930, or   5.88%&lt;/PRE&gt;&lt;PRE class=alt&gt;Elapsed Time, &amp;gt;       32 usecs AND &amp;lt;=       64 usecs,   4425, or  13.48%&lt;/PRE&gt;&lt;PRE&gt;Elapsed Time, &amp;gt;       64 usecs AND &amp;lt;=      128 usecs,   4727, or  14.40%&lt;/PRE&gt;&lt;PRE class=alt&gt;Elapsed Time, &amp;gt;      128 usecs AND &amp;lt;=      256 usecs,    627, or   1.91%&lt;/PRE&gt;&lt;PRE&gt;Elapsed Time, &amp;gt;      256 usecs AND &amp;lt;=      512 usecs,     55, or   0.17%&lt;/PRE&gt;&lt;PRE class=alt&gt;Elapsed Time, &amp;gt;      512 usecs AND &amp;lt;=     1024 usecs,     55, or   0.17%&lt;/PRE&gt;&lt;PRE&gt;Elapsed Time, &amp;gt;     1024 usecs AND &amp;lt;=     2048 usecs,     22, or   0.07%&lt;/PRE&gt;&lt;PRE class=alt&gt;Elapsed Time, &amp;gt;     2048 usecs AND &amp;lt;=     4096 usecs,      6, or   0.02%&lt;/PRE&gt;&lt;PRE&gt;Total,                                                 32833&lt;/PRE&gt;&lt;PRE class=alt&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE&gt;Total = 10 &lt;SPAN class=kwrd&gt;for&lt;/SPAN&gt; module netbt.sys&lt;/PRE&gt;&lt;PRE class=alt&gt;Elapsed Time, &amp;gt;        0 usecs AND &amp;lt;=        1 usecs,      0, or   0.00%&lt;/PRE&gt;&lt;PRE&gt;Elapsed Time, &amp;gt;        1 usecs AND &amp;lt;=        2 usecs,      0, or   0.00%&lt;/PRE&gt;&lt;PRE class=alt&gt;Elapsed Time, &amp;gt;        2 usecs AND &amp;lt;=        4 usecs,      0, or   0.00%&lt;/PRE&gt;&lt;PRE&gt;Elapsed Time, &amp;gt;        4 usecs AND &amp;lt;=        8 usecs,      0, or   0.00%&lt;/PRE&gt;&lt;PRE class=alt&gt;Elapsed Time, &amp;gt;        8 usecs AND &amp;lt;=       16 usecs,      0, or   0.00%&lt;/PRE&gt;&lt;PRE&gt;Elapsed Time, &amp;gt;       16 usecs AND &amp;lt;=       32 usecs,     10, or 100.00%&lt;/PRE&gt;&lt;PRE class=alt&gt;Total,                                                    10&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE class=alt&gt;Total = 597 &lt;SPAN class=kwrd&gt;for&lt;/SPAN&gt; module ntkrnlpa.exe&lt;/PRE&gt;&lt;PRE&gt;Elapsed Time, &amp;gt;        0 usecs AND &amp;lt;=        1 usecs,     43, or   7.20%&lt;/PRE&gt;&lt;PRE class=alt&gt;Elapsed Time, &amp;gt;        1 usecs AND &amp;lt;=        2 usecs,    129, or  21.61%&lt;/PRE&gt;&lt;PRE&gt;Elapsed Time, &amp;gt;        2 usecs AND &amp;lt;=        4 usecs,    344, or  57.62%&lt;/PRE&gt;&lt;PRE class=alt&gt;Elapsed Time, &amp;gt;        4 usecs AND &amp;lt;=        8 usecs,     50, or   8.38%&lt;/PRE&gt;&lt;PRE&gt;Elapsed Time, &amp;gt;        8 usecs AND &amp;lt;=       16 usecs,      4, or   0.67%&lt;/PRE&gt;&lt;PRE class=alt&gt;Elapsed Time, &amp;gt;       16 usecs AND &amp;lt;=       32 usecs,      3, or   0.50%&lt;/PRE&gt;&lt;PRE&gt;Elapsed Time, &amp;gt;       32 usecs AND &amp;lt;=       64 usecs,     23, or   3.85%&lt;/PRE&gt;&lt;PRE class=alt&gt;Elapsed Time, &amp;gt;       64 usecs AND &amp;lt;=      128 usecs,      1, or   0.17%&lt;/PRE&gt;&lt;PRE&gt;Total,                                                   597&lt;/PRE&gt;&lt;PRE class=alt&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE&gt;Total = 2087 &lt;SPAN class=kwrd&gt;for&lt;/SPAN&gt; module portcls.sys&lt;/PRE&gt;&lt;PRE class=alt&gt;Elapsed Time, &amp;gt;        0 usecs AND &amp;lt;=        1 usecs,      0, or   0.00%&lt;/PRE&gt;&lt;PRE&gt;Elapsed Time, &amp;gt;        1 usecs AND &amp;lt;=        2 usecs,      0, or   0.00%&lt;/PRE&gt;&lt;PRE class=alt&gt;Elapsed Time, &amp;gt;        2 usecs AND &amp;lt;=        4 usecs,      1, or   0.05%&lt;/PRE&gt;&lt;PRE&gt;Elapsed Time, &amp;gt;        4 usecs AND &amp;lt;=        8 usecs,    216, or  10.35%&lt;/PRE&gt;&lt;PRE class=alt&gt;Elapsed Time, &amp;gt;        8 usecs AND &amp;lt;=       16 usecs,    675, or  32.34%&lt;/PRE&gt;&lt;PRE&gt;Elapsed Time, &amp;gt;       16 usecs AND &amp;lt;=       32 usecs,   1076, or  51.56%&lt;/PRE&gt;&lt;PRE class=alt&gt;Elapsed Time, &amp;gt;       32 usecs AND &amp;lt;=       64 usecs,    119, or   5.70%&lt;/PRE&gt;&lt;PRE&gt;Total,                                                  2087&lt;/PRE&gt;&lt;PRE class=alt&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE&gt;Total = 100 &lt;SPAN class=kwrd&gt;for&lt;/SPAN&gt; module rassstp.sys&lt;/PRE&gt;&lt;PRE class=alt&gt;Elapsed Time, &amp;gt;        0 usecs AND &amp;lt;=        1 usecs,      0, or   0.00%&lt;/PRE&gt;&lt;PRE&gt;Elapsed Time, &amp;gt;        1 usecs AND &amp;lt;=        2 usecs,     37, or  37.00%&lt;/PRE&gt;&lt;PRE class=alt&gt;Elapsed Time, &amp;gt;        2 usecs AND &amp;lt;=        4 usecs,     62, or  62.00%&lt;/PRE&gt;&lt;PRE&gt;Elapsed Time, &amp;gt;        4 usecs AND &amp;lt;=        8 usecs,      1, or   1.00%&lt;/PRE&gt;&lt;PRE class=alt&gt;Total,                                                   100&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE class=alt&gt;Total = 99 &lt;SPAN class=kwrd&gt;for&lt;/SPAN&gt; module rdbss.sys&lt;/PRE&gt;&lt;PRE&gt;Elapsed Time, &amp;gt;        0 usecs AND &amp;lt;=        1 usecs,      0, or   0.00%&lt;/PRE&gt;&lt;PRE class=alt&gt;Elapsed Time, &amp;gt;        1 usecs AND &amp;lt;=        2 usecs,      0, or   0.00%&lt;/PRE&gt;&lt;PRE&gt;Elapsed Time, &amp;gt;        2 usecs AND &amp;lt;=        4 usecs,     87, or  87.88%&lt;/PRE&gt;&lt;PRE class=alt&gt;Elapsed Time, &amp;gt;        4 usecs AND &amp;lt;=        8 usecs,      8, or   8.08%&lt;/PRE&gt;&lt;PRE&gt;Elapsed Time, &amp;gt;        8 usecs AND &amp;lt;=       16 usecs,      4, or   4.04%&lt;/PRE&gt;&lt;PRE class=alt&gt;Total,                                                    99&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE class=alt&gt;Total = 13 &lt;SPAN class=kwrd&gt;for&lt;/SPAN&gt; module srv.sys&lt;/PRE&gt;&lt;PRE&gt;Elapsed Time, &amp;gt;        0 usecs AND &amp;lt;=        1 usecs,      0, or   0.00%&lt;/PRE&gt;&lt;PRE class=alt&gt;Elapsed Time, &amp;gt;        1 usecs AND &amp;lt;=        2 usecs,      1, or   7.69%&lt;/PRE&gt;&lt;PRE&gt;Elapsed Time, &amp;gt;        2 usecs AND &amp;lt;=        4 usecs,      8, or  61.54%&lt;/PRE&gt;&lt;PRE class=alt&gt;Elapsed Time, &amp;gt;        4 usecs AND &amp;lt;=        8 usecs,      4, or  30.77%&lt;/PRE&gt;&lt;PRE&gt;Total,                                                    13&lt;/PRE&gt;&lt;PRE class=alt&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE&gt;Total = 2 &lt;SPAN class=kwrd&gt;for&lt;/SPAN&gt; module srvnet.sys&lt;/PRE&gt;&lt;PRE class=alt&gt;Elapsed Time, &amp;gt;        0 usecs AND &amp;lt;=        1 usecs,      0, or   0.00%&lt;/PRE&gt;&lt;PRE&gt;Elapsed Time, &amp;gt;        1 usecs AND &amp;lt;=        2 usecs,      1, or  50.00%&lt;/PRE&gt;&lt;PRE class=alt&gt;Elapsed Time, &amp;gt;        2 usecs AND &amp;lt;=        4 usecs,      1, or  50.00%&lt;/PRE&gt;&lt;PRE&gt;Total,                                                     2&lt;/PRE&gt;&lt;PRE class=alt&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE&gt;Total = 4998 &lt;SPAN class=kwrd&gt;for&lt;/SPAN&gt; module tcpip.sys&lt;/PRE&gt;&lt;PRE class=alt&gt;Elapsed Time, &amp;gt;        0 usecs AND &amp;lt;=        1 usecs,      1, or   0.02%&lt;/PRE&gt;&lt;PRE&gt;Elapsed Time, &amp;gt;        1 usecs AND &amp;lt;=        2 usecs,      0, or   0.00%&lt;/PRE&gt;&lt;PRE class=alt&gt;Elapsed Time, &amp;gt;        2 usecs AND &amp;lt;=        4 usecs,     48, or   0.96%&lt;/PRE&gt;&lt;PRE&gt;Elapsed Time, &amp;gt;        4 usecs AND &amp;lt;=        8 usecs,   1242, or  24.85%&lt;/PRE&gt;&lt;PRE class=alt&gt;Elapsed Time, &amp;gt;        8 usecs AND &amp;lt;=       16 usecs,   2179, or  43.60%&lt;/PRE&gt;&lt;PRE&gt;Elapsed Time, &amp;gt;       16 usecs AND &amp;lt;=       32 usecs,    421, or   8.42%&lt;/PRE&gt;&lt;PRE class=alt&gt;Elapsed Time, &amp;gt;       32 usecs AND &amp;lt;=       64 usecs,    660, or  13.21%&lt;/PRE&gt;&lt;PRE&gt;Elapsed Time, &amp;gt;       64 usecs AND &amp;lt;=      128 usecs,    435, or   8.70%&lt;/PRE&gt;&lt;PRE class=alt&gt;Elapsed Time, &amp;gt;      128 usecs AND &amp;lt;=      256 usecs,     12, or   0.24%&lt;/PRE&gt;&lt;PRE&gt;Total,                                                  4998&lt;/PRE&gt;&lt;PRE class=alt&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE&gt;Total = 1060 &lt;SPAN class=kwrd&gt;for&lt;/SPAN&gt; module usbhub.sys&lt;/PRE&gt;&lt;PRE class=alt&gt;Elapsed Time, &amp;gt;        0 usecs AND &amp;lt;=        1 usecs,      0, or   0.00%&lt;/PRE&gt;&lt;PRE&gt;Elapsed Time, &amp;gt;        1 usecs AND &amp;lt;=        2 usecs,      0, or   0.00%&lt;/PRE&gt;&lt;PRE class=alt&gt;Elapsed Time, &amp;gt;        2 usecs AND &amp;lt;=        4 usecs,    579, or  54.62%&lt;/PRE&gt;&lt;PRE&gt;Elapsed Time, &amp;gt;        4 usecs AND &amp;lt;=        8 usecs,    386, or  36.42%&lt;/PRE&gt;&lt;PRE class=alt&gt;Elapsed Time, &amp;gt;        8 usecs AND &amp;lt;=       16 usecs,     85, or   8.02%&lt;/PRE&gt;&lt;PRE&gt;Elapsed Time, &amp;gt;       16 usecs AND &amp;lt;=       32 usecs,      9, or   0.85%&lt;/PRE&gt;&lt;PRE class=alt&gt;Elapsed Time, &amp;gt;       32 usecs AND &amp;lt;=       64 usecs,      1, or   0.09%&lt;/PRE&gt;&lt;PRE&gt;Total,                                                  1060&lt;/PRE&gt;&lt;PRE class=alt&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE&gt;Total = 6 &lt;SPAN class=kwrd&gt;for&lt;/SPAN&gt; module watchdog.sys&lt;/PRE&gt;&lt;PRE class=alt&gt;Elapsed Time, &amp;gt;        0 usecs AND &amp;lt;=        1 usecs,      3, or  50.00%&lt;/PRE&gt;&lt;PRE&gt;Elapsed Time, &amp;gt;        1 usecs AND &amp;lt;=        2 usecs,      3, or  50.00%&lt;/PRE&gt;&lt;PRE class=alt&gt;Total,                                                     6&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE class=alt&gt;All Module =  43599,  Total = 43599,   EQUAL&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE class=alt&gt;--------------------------&lt;/PRE&gt;&lt;PRE&gt;Usage From 0 ms to 24682 ms, Summing In 1 second intervals. Intervals=25&lt;/PRE&gt;&lt;PRE class=alt&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE&gt;                             CPU 0 Usage       CPU 1 Usage&lt;/PRE&gt;&lt;PRE class=alt&gt;Start (ms) End (ms)        (usec)      %     (usec)      %&lt;/PRE&gt;&lt;PRE&gt;         0-1000      :     33992,   3.40       897,   0.09&lt;/PRE&gt;&lt;PRE class=alt&gt;      1000-2000      :     24437,   2.44      1332,   0.13&lt;/PRE&gt;&lt;PRE&gt;      2000-3000      :     42317,   4.23      4510,   0.45&lt;/PRE&gt;&lt;PRE class=alt&gt;      3000-4000      :     40179,   4.02      1757,   0.18&lt;/PRE&gt;&lt;PRE&gt;      4000-5000      :     34190,   3.42       988,   0.10&lt;/PRE&gt;&lt;PRE class=alt&gt;      5000-6000      :     19434,   1.94      2066,   0.21&lt;/PRE&gt;&lt;PRE&gt;      6000-7000      :     25339,   2.53      2618,   0.26&lt;/PRE&gt;&lt;PRE class=alt&gt;      7000-8000      :     46758,   4.68      1691,   0.17&lt;/PRE&gt;&lt;PRE&gt;      8000-9000      :     81696,   8.17      1998,   0.20&lt;/PRE&gt;&lt;PRE class=alt&gt;      9000-10000     :     77932,   7.79      1500,   0.15&lt;/PRE&gt;&lt;PRE&gt;     10000-11000     :     64336,   6.43      1684,   0.17&lt;/PRE&gt;&lt;PRE class=alt&gt;     11000-12000     :     45099,   4.51      2311,   0.23&lt;/PRE&gt;&lt;PRE&gt;     12000-13000     :     59469,   5.95      1890,   0.19&lt;/PRE&gt;&lt;PRE class=alt&gt;     13000-14000     :     44035,   4.40      2393,   0.24&lt;/PRE&gt;&lt;PRE&gt;     14000-15000     :     50393,   5.04      2455,   0.25&lt;/PRE&gt;&lt;PRE class=alt&gt;     15000-16000     :     71508,   7.15      1694,   0.17&lt;/PRE&gt;&lt;PRE&gt;     16000-17000     :     56853,   5.69      2054,   0.21&lt;/PRE&gt;&lt;PRE class=alt&gt;     17000-18000     :     63219,   6.32      4046,   0.40&lt;/PRE&gt;&lt;PRE&gt;     18000-19000     :     62428,   6.24      4742,   0.47&lt;/PRE&gt;&lt;PRE class=alt&gt;     19000-20000     :     33793,   3.38      1134,   0.11&lt;/PRE&gt;&lt;PRE&gt;     20000-21000     :     28147,   2.81       759,   0.08&lt;/PRE&gt;&lt;PRE class=alt&gt;     21000-22000     :     30630,   3.06       640,   0.06&lt;/PRE&gt;&lt;PRE&gt;     22000-23000     :     33294,   3.33       710,   0.07&lt;/PRE&gt;&lt;PRE class=alt&gt;     23000-24000     :     26121,   2.61      1819,   0.18&lt;/PRE&gt;&lt;PRE&gt;     24000-24682     :     21608,   3.17      2177,   0.32&lt;/PRE&gt;&lt;PRE class=alt&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE&gt;--------------------------&lt;/PRE&gt;&lt;PRE class=alt&gt;Interrupt Info&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE class=alt&gt;--------------------------&lt;/PRE&gt;&lt;PRE&gt;CPU Usage Summing By Module For the Whole Trace&lt;/PRE&gt;&lt;PRE class=alt&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE&gt;CPU Usage from 0 us to 24682000 us:&lt;/PRE&gt;&lt;PRE class=alt&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE&gt;     CPU 0 Usage      CPU 1 Usage&lt;/PRE&gt;&lt;PRE class=alt&gt;     usec      %      usec      % Module&lt;/PRE&gt;&lt;PRE&gt;    10420   0.04         0   0.00 USBPORT.SYS&lt;/PRE&gt;&lt;PRE class=alt&gt;    46437   0.19         0   0.00 VIDEOPRT.SYS&lt;/PRE&gt;&lt;PRE&gt;      125   0.00         0   0.00 acpi.sys&lt;/PRE&gt;&lt;PRE class=alt&gt;     7657   0.03         0   0.00 ataport.SYS&lt;/PRE&gt;&lt;PRE&gt;     8722   0.04         0   0.00 i8042prt.sys&lt;/PRE&gt;&lt;PRE class=alt&gt;    72940   0.30         0   0.00 ndis.sys&lt;/PRE&gt;&lt;PRE&gt;    13633   0.06         0   0.00 portcls.sys&lt;/PRE&gt;&lt;PRE class=alt&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE&gt;Total = 48319&lt;/PRE&gt;&lt;PRE class=alt&gt;Elapsed Time, &amp;gt;        0 usecs AND &amp;lt;=        1 usecs,      0, or   0.00%&lt;/PRE&gt;&lt;PRE&gt;Elapsed Time, &amp;gt;        1 usecs AND &amp;lt;=        2 usecs,  12026, or  24.89%&lt;/PRE&gt;&lt;PRE class=alt&gt;Elapsed Time, &amp;gt;        2 usecs AND &amp;lt;=        4 usecs,  24954, or  51.64%&lt;/PRE&gt;&lt;PRE&gt;Elapsed Time, &amp;gt;        4 usecs AND &amp;lt;=        8 usecs,   9693, or  20.06%&lt;/PRE&gt;&lt;PRE class=alt&gt;Elapsed Time, &amp;gt;        8 usecs AND &amp;lt;=       16 usecs,   1611, or   3.33%&lt;/PRE&gt;&lt;PRE&gt;Elapsed Time, &amp;gt;       16 usecs AND &amp;lt;=       32 usecs,     29, or   0.06%&lt;/PRE&gt;&lt;PRE class=alt&gt;Elapsed Time, &amp;gt;       32 usecs AND &amp;lt;=       64 usecs,      6, or   0.01%&lt;/PRE&gt;&lt;PRE&gt;Total,                                                 48319&lt;/PRE&gt;&lt;PRE class=alt&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE&gt;Total = 2256 &lt;SPAN class=kwrd&gt;for&lt;/SPAN&gt; module USBPORT.SYS&lt;/PRE&gt;&lt;PRE class=alt&gt;Elapsed Time, &amp;gt;        0 usecs AND &amp;lt;=        1 usecs,      0, or   0.00%&lt;/PRE&gt;&lt;PRE&gt;Elapsed Time, &amp;gt;        1 usecs AND &amp;lt;=        2 usecs,      0, or   0.00%&lt;/PRE&gt;&lt;PRE class=alt&gt;Elapsed Time, &amp;gt;        2 usecs AND &amp;lt;=        4 usecs,    602, or  26.68%&lt;/PRE&gt;&lt;PRE&gt;Elapsed Time, &amp;gt;        4 usecs AND &amp;lt;=        8 usecs,   1556, or  68.97%&lt;/PRE&gt;&lt;PRE class=alt&gt;Elapsed Time, &amp;gt;        8 usecs AND &amp;lt;=       16 usecs,     97, or   4.30%&lt;/PRE&gt;&lt;PRE&gt;Elapsed Time, &amp;gt;       16 usecs AND &amp;lt;=       32 usecs,      0, or   0.00%&lt;/PRE&gt;&lt;PRE class=alt&gt;Elapsed Time, &amp;gt;       32 usecs AND &amp;lt;=       64 usecs,      1, or   0.04%&lt;/PRE&gt;&lt;PRE&gt;Total,                                                  2256&lt;/PRE&gt;&lt;PRE class=alt&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE&gt;Total = 20976 &lt;SPAN class=kwrd&gt;for&lt;/SPAN&gt; module VIDEOPRT.SYS&lt;/PRE&gt;&lt;PRE class=alt&gt;Elapsed Time, &amp;gt;        0 usecs AND &amp;lt;=        1 usecs,      0, or   0.00%&lt;/PRE&gt;&lt;PRE&gt;Elapsed Time, &amp;gt;        1 usecs AND &amp;lt;=        2 usecs,  12026, or  57.33%&lt;/PRE&gt;&lt;PRE class=alt&gt;Elapsed Time, &amp;gt;        2 usecs AND &amp;lt;=        4 usecs,   7821, or  37.29%&lt;/PRE&gt;&lt;PRE&gt;Elapsed Time, &amp;gt;        4 usecs AND &amp;lt;=        8 usecs,   1081, or   5.15%&lt;/PRE&gt;&lt;PRE class=alt&gt;Elapsed Time, &amp;gt;        8 usecs AND &amp;lt;=       16 usecs,     43, or   0.20%&lt;/PRE&gt;&lt;PRE&gt;Elapsed Time, &amp;gt;       16 usecs AND &amp;lt;=       32 usecs,      1, or   0.00%&lt;/PRE&gt;&lt;PRE class=alt&gt;Elapsed Time, &amp;gt;       32 usecs AND &amp;lt;=       64 usecs,      4, or   0.02%&lt;/PRE&gt;&lt;PRE&gt;Total,                                                 20976&lt;/PRE&gt;&lt;PRE class=alt&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE&gt;Total = 11 &lt;SPAN class=kwrd&gt;for&lt;/SPAN&gt; module acpi.sys&lt;/PRE&gt;&lt;PRE class=alt&gt;Elapsed Time, &amp;gt;        0 usecs AND &amp;lt;=        1 usecs,      0, or   0.00%&lt;/PRE&gt;&lt;PRE&gt;Elapsed Time, &amp;gt;        1 usecs AND &amp;lt;=        2 usecs,      0, or   0.00%&lt;/PRE&gt;&lt;PRE class=alt&gt;Elapsed Time, &amp;gt;        2 usecs AND &amp;lt;=        4 usecs,      0, or   0.00%&lt;/PRE&gt;&lt;PRE&gt;Elapsed Time, &amp;gt;        4 usecs AND &amp;lt;=        8 usecs,      0, or   0.00%&lt;/PRE&gt;&lt;PRE class=alt&gt;Elapsed Time, &amp;gt;        8 usecs AND &amp;lt;=       16 usecs,     11, or 100.00%&lt;/PRE&gt;&lt;PRE&gt;Total,                                                    11&lt;/PRE&gt;&lt;PRE class=alt&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE&gt;Total = 811 &lt;SPAN class=kwrd&gt;for&lt;/SPAN&gt; module ataport.SYS&lt;/PRE&gt;&lt;PRE class=alt&gt;Elapsed Time, &amp;gt;        0 usecs AND &amp;lt;=        1 usecs,      0, or   0.00%&lt;/PRE&gt;&lt;PRE&gt;Elapsed Time, &amp;gt;        1 usecs AND &amp;lt;=        2 usecs,      0, or   0.00%&lt;/PRE&gt;&lt;PRE class=alt&gt;Elapsed Time, &amp;gt;        2 usecs AND &amp;lt;=        4 usecs,      0, or   0.00%&lt;/PRE&gt;&lt;PRE&gt;Elapsed Time, &amp;gt;        4 usecs AND &amp;lt;=        8 usecs,    225, or  27.74%&lt;/PRE&gt;&lt;PRE class=alt&gt;Elapsed Time, &amp;gt;        8 usecs AND &amp;lt;=       16 usecs,    574, or  70.78%&lt;/PRE&gt;&lt;PRE&gt;Elapsed Time, &amp;gt;       16 usecs AND &amp;lt;=       32 usecs,     12, or   1.48%&lt;/PRE&gt;&lt;PRE class=alt&gt;Total,                                                   811&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE class=alt&gt;Total = 1178 &lt;SPAN class=kwrd&gt;for&lt;/SPAN&gt; module i8042prt.sys&lt;/PRE&gt;&lt;PRE&gt;Elapsed Time, &amp;gt;        0 usecs AND &amp;lt;=        1 usecs,      0, or   0.00%&lt;/PRE&gt;&lt;PRE class=alt&gt;Elapsed Time, &amp;gt;        1 usecs AND &amp;lt;=        2 usecs,      0, or   0.00%&lt;/PRE&gt;&lt;PRE&gt;Elapsed Time, &amp;gt;        2 usecs AND &amp;lt;=        4 usecs,      0, or   0.00%&lt;/PRE&gt;&lt;PRE class=alt&gt;Elapsed Time, &amp;gt;        4 usecs AND &amp;lt;=        8 usecs,    905, or  76.83%&lt;/PRE&gt;&lt;PRE&gt;Elapsed Time, &amp;gt;        8 usecs AND &amp;lt;=       16 usecs,    260, or  22.07%&lt;/PRE&gt;&lt;PRE class=alt&gt;Elapsed Time, &amp;gt;       16 usecs AND &amp;lt;=       32 usecs,     12, or   1.02%&lt;/PRE&gt;&lt;PRE&gt;Elapsed Time, &amp;gt;       32 usecs AND &amp;lt;=       64 usecs,      1, or   0.08%&lt;/PRE&gt;&lt;PRE class=alt&gt;Total,                                                  1178&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE class=alt&gt;Total = 20976 &lt;SPAN class=kwrd&gt;for&lt;/SPAN&gt; module ndis.sys&lt;/PRE&gt;&lt;PRE&gt;Elapsed Time, &amp;gt;        0 usecs AND &amp;lt;=        1 usecs,      0, or   0.00%&lt;/PRE&gt;&lt;PRE class=alt&gt;Elapsed Time, &amp;gt;        1 usecs AND &amp;lt;=        2 usecs,      0, or   0.00%&lt;/PRE&gt;&lt;PRE&gt;Elapsed Time, &amp;gt;        2 usecs AND &amp;lt;=        4 usecs,  16181, or  77.14%&lt;/PRE&gt;&lt;PRE class=alt&gt;Elapsed Time, &amp;gt;        4 usecs AND &amp;lt;=        8 usecs,   4713, or  22.47%&lt;/PRE&gt;&lt;PRE&gt;Elapsed Time, &amp;gt;        8 usecs AND &amp;lt;=       16 usecs,     81, or   0.39%&lt;/PRE&gt;&lt;PRE class=alt&gt;Elapsed Time, &amp;gt;       16 usecs AND &amp;lt;=       32 usecs,      1, or   0.00%&lt;/PRE&gt;&lt;PRE&gt;Total,                                                 20976&lt;/PRE&gt;&lt;PRE class=alt&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE&gt;Total = 2111 &lt;SPAN class=kwrd&gt;for&lt;/SPAN&gt; module portcls.sys&lt;/PRE&gt;&lt;PRE class=alt&gt;Elapsed Time, &amp;gt;        0 usecs AND &amp;lt;=        1 usecs,      0, or   0.00%&lt;/PRE&gt;&lt;PRE&gt;Elapsed Time, &amp;gt;        1 usecs AND &amp;lt;=        2 usecs,      0, or   0.00%&lt;/PRE&gt;&lt;PRE class=alt&gt;Elapsed Time, &amp;gt;        2 usecs AND &amp;lt;=        4 usecs,    350, or  16.58%&lt;/PRE&gt;&lt;PRE&gt;Elapsed Time, &amp;gt;        4 usecs AND &amp;lt;=        8 usecs,   1213, or  57.46%&lt;/PRE&gt;&lt;PRE class=alt&gt;Elapsed Time, &amp;gt;        8 usecs AND &amp;lt;=       16 usecs,    545, or  25.82%&lt;/PRE&gt;&lt;PRE&gt;Elapsed Time, &amp;gt;       16 usecs AND &amp;lt;=       32 usecs,      3, or   0.14%&lt;/PRE&gt;&lt;PRE class=alt&gt;Total,                                                  2111&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE class=alt&gt;All Module =  48319,  Total = 48319,   EQUAL&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE class=alt&gt;--------------------------&lt;/PRE&gt;&lt;PRE&gt;Usage From 0 ms to 24682 ms, Summing In 1 second intervals. Intervals=25&lt;/PRE&gt;&lt;PRE class=alt&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE&gt;                             CPU 0 Usage       CPU 1 Usage&lt;/PRE&gt;&lt;PRE class=alt&gt;Start (ms) End (ms)        (usec)      %     (usec)      %&lt;/PRE&gt;&lt;PRE&gt;         0-1000      :      5820,   0.58         0,   0.00&lt;/PRE&gt;&lt;PRE class=alt&gt;      1000-2000      :      3686,   0.37         0,   0.00&lt;/PRE&gt;&lt;PRE&gt;      2000-3000      :      6472,   0.65         0,   0.00&lt;/PRE&gt;&lt;PRE class=alt&gt;      3000-4000      :      5410,   0.54         0,   0.00&lt;/PRE&gt;&lt;PRE&gt;      4000-5000      :      4638,   0.46         0,   0.00&lt;/PRE&gt;&lt;PRE class=alt&gt;      5000-6000      :      2420,   0.24         0,   0.00&lt;/PRE&gt;&lt;PRE&gt;      6000-7000      :      2793,   0.28         0,   0.00&lt;/PRE&gt;&lt;PRE class=alt&gt;      7000-8000      :      5988,   0.60         0,   0.00&lt;/PRE&gt;&lt;PRE&gt;      8000-9000      :     12071,   1.21         0,   0.00&lt;/PRE&gt;&lt;PRE class=alt&gt;      9000-10000     :     12461,   1.25         0,   0.00&lt;/PRE&gt;&lt;PRE&gt;     10000-11000     :      9816,   0.98         0,   0.00&lt;/PRE&gt;&lt;PRE class=alt&gt;     11000-12000     :      8206,   0.82         0,   0.00&lt;/PRE&gt;&lt;PRE&gt;     12000-13000     :      8926,   0.89         0,   0.00&lt;/PRE&gt;&lt;PRE class=alt&gt;     13000-14000     :      6189,   0.62         0,   0.00&lt;/PRE&gt;&lt;PRE&gt;     14000-15000     :      7649,   0.76         0,   0.00&lt;/PRE&gt;&lt;PRE class=alt&gt;     15000-16000     :      9613,   0.96         0,   0.00&lt;/PRE&gt;&lt;PRE&gt;     16000-17000     :      8431,   0.84         0,   0.00&lt;/PRE&gt;&lt;PRE class=alt&gt;     17000-18000     :      7618,   0.76         0,   0.00&lt;/PRE&gt;&lt;PRE&gt;     18000-19000     :      7212,   0.72         0,   0.00&lt;/PRE&gt;&lt;PRE class=alt&gt;     19000-20000     :      4813,   0.48         0,   0.00&lt;/PRE&gt;&lt;PRE&gt;     20000-21000     :      3925,   0.39         0,   0.00&lt;/PRE&gt;&lt;PRE class=alt&gt;     21000-22000     :      4557,   0.46         0,   0.00&lt;/PRE&gt;&lt;PRE&gt;     22000-23000     :      5169,   0.52         0,   0.00&lt;/PRE&gt;&lt;PRE class=alt&gt;     23000-24000     :      3489,   0.35         0,   0.00&lt;/PRE&gt;&lt;PRE&gt;     24000-24682     :      2552,   0.37         0,   0.00&lt;/PRE&gt;&lt;PRE class=alt&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE class=alt&gt;Distribution of number of 2000 ms intervals w.r.t. DPC/ISR usage:&lt;/PRE&gt;&lt;PRE&gt;&amp;nbsp;&lt;/PRE&gt;&lt;PRE class=alt&gt;                                      CPU 0                      CPU 1&lt;/PRE&gt;&lt;PRE&gt; DPC/ISR Usage %      DPC      ISR Combined      DPC      ISR Combined&lt;/PRE&gt;&lt;PRE class=alt&gt;&amp;gt;=  0 AND &amp;lt;=   1        0       12        0       13       13       13&lt;/PRE&gt;&lt;PRE&gt;&amp;gt;   1 AND &amp;lt;=   5        8        1        7        0        0        0&lt;/PRE&gt;&lt;PRE class=alt&gt;&amp;gt;   5 AND &amp;lt;=  10        5        0        6        0        0        0&lt;/PRE&gt;&lt;PRE&gt;&amp;gt;  10 AND &amp;lt;=  20        0        0        0        0        0        0&lt;/PRE&gt;&lt;PRE class=alt&gt;&amp;gt;  20 AND &amp;lt;=  40        0        0        0        0        0        0&lt;/PRE&gt;&lt;PRE&gt;&amp;gt;  40 AND &amp;lt;=  60        0        0        0        0        0        0&lt;/PRE&gt;&lt;PRE class=alt&gt;&amp;gt;  60 AND &amp;lt;=  80        0        0        0        0        0        0&lt;/PRE&gt;&lt;PRE&gt;&amp;gt;  80 AND &amp;lt;= 100        0        0        0        0        0        0&lt;/PRE&gt;&lt;PRE class=alt&gt;---&lt;/PRE&gt;&lt;PRE&gt;Total:                 13       13       13       13       13       13&lt;/PRE&gt;&lt;/DIV&gt;
&lt;STYLE type=text/css&gt;

.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/STYLE&gt;

&lt;P&gt;Which is a pretty nice summary of all the DPCs and ISRs that ran during the data collection period and how long they ran for.&lt;/P&gt;
&lt;P&gt;I like XPerf a lot and it’s something we plan to use in WDF to collect data around specific performance scenarios.&amp;nbsp; In particular its ability to tie system performance data together with custom ETW events logged by components (like, say, UMDF) gives a very nice way to see how the parts of an end-to-end performance scenario break down temporarily and also to see how the scenario either causes system activity or is impacted by system activity.&lt;/P&gt;
&lt;P&gt;I just wish I could get the symbols working &lt;IMG alt=Smile src="http://messenger.msn.com/MMM2006-04-19_17.00/Resource/emoticons/regular_smile.gif" mce_src="http://messenger.msn.com/MMM2006-04-19_17.00/Resource/emoticons/regular_smile.gif"&gt;.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8980372" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/peterwie/archive/tags/Device+Drivers+General/default.aspx">Device Drivers General</category><category domain="http://blogs.msdn.com/peterwie/archive/tags/Vista/default.aspx">Vista</category></item><item><title>WDK available in other languages</title><link>http://blogs.msdn.com/peterwie/archive/2007/09/24/wdk-available-in-other-languages.aspx</link><pubDate>Mon, 24 Sep 2007 21:22:13 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5103712</guid><dc:creator>PeterWie</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/peterwie/comments/5103712.aspx</comments><wfw:commentRss>http://blogs.msdn.com/peterwie/commentrss.aspx?PostID=5103712</wfw:commentRss><description>&lt;p&gt;This is pretty cool, though my high-school french isn't sufficient to appreciate it completely.&amp;#xA0; The WDK content on MSDN has been translated into multiple languages.&amp;#xA0; &lt;/p&gt;  &lt;p&gt;It's a machine translation and to make up for the inconsistencies they do side-by-side english &amp;amp; other language.&amp;#xA0; It's not as good as native documentation, but hopefully it will help bridge the gap for those who don't speak english as their first language.&lt;/p&gt;  &lt;p&gt;The language options are:&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&amp;#xB7; &lt;a href="http://mtbeta.msdn.microsoft.com/pt-br/library/default.aspx"&gt;Brazilian Portuguese (pt-br)&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#xB7; &lt;a href="http://mtbeta.msdn.microsoft.com/fr-fr/library/default.aspx"&gt;French (fr-fr)&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#xB7; &lt;a href="http://mtbeta.msdn.microsoft.com/ja-jp/library/default.aspx"&gt;Japanese (ja-jp)&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#xB7; &lt;a href="http://mtbeta.msdn.microsoft.com/zh-cn/library/default.aspx"&gt;S. Chinese (zh-cn)&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#xB7; &lt;a href="http://mtbeta.msdn.microsoft.com/es-es/library/default.aspx"&gt;Spanish (es-es)&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&amp;#xB7; &lt;a href="http://mtbeta.msdn.microsoft.com/zh-tw/library/default.aspx"&gt;T. Chinese (zh-tw)&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Enjoy&lt;/p&gt;  &lt;p&gt;-p&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=5103712" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/peterwie/archive/tags/Device+Drivers+General/default.aspx">Device Drivers General</category></item><item><title>My UMDF driver has some data - how do I get it to my app?</title><link>http://blogs.msdn.com/peterwie/archive/2007/02/05/my-umdf-driver-has-some-data-how-do-i-get-it-to-my-app.aspx</link><pubDate>Mon, 05 Feb 2007 21:57:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1605790</guid><dc:creator>PeterWie</dc:creator><slash:comments>3</slash:comments><comments>http://blogs.msdn.com/peterwie/comments/1605790.aspx</comments><wfw:commentRss>http://blogs.msdn.com/peterwie/commentrss.aspx?PostID=1605790</wfw:commentRss><description>&lt;P&gt;This came up as a question on NTDEV today. After I thought about it for a bit I realized it was actually a pretty good question. You've started writing your driver, or at least thinking about your driver. You know you'll get some data back from the device and you need to get it to the app. How do you do this? &lt;/P&gt;
&lt;P&gt;For simplicity's sake, let's say there are two models for a driver to operate in. The "push" model and the "pull" model (of course there are more, but this captures the big ones.) When I say "push" and "pull" here I'm talking about both how the driver decides it should talk to the device, and how it returns the data to the driver. &lt;/P&gt;
&lt;P&gt;But before I dive in, realize that I'm talking here about how the driver operates in "steady state" - the time between PNP and Power Management operations, between recovering from device errors/resets, the time when it's just servicing I/O requests. &lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Pull Model &lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;We'll start with the Pull model because it's easier to understand. In steady state the typical pull-model driver does nothing on its own. When the app wants to talk to the device it sends a request to the driver, which triggers a driver callback. In the simplest case the driver formats a command to send to the device and uses the buffers from the application to hold any data the command returns. When the command returns the app's buffers contain the necessary data. The driver sets the information property on the request to indicate how many bytes of data the app is getting back then completes the request. When the app sees the request completion the data your driver provided will be in its buffers. &lt;/P&gt;
&lt;P&gt;It's rarely this simple. Often you'll need to do apply some transformation to the data before you can return it. In that case your driver would allocate a buffer to use in the command you send to the device. When the command completes you use its result to write the correct data into the buffers on the app's requests. Then set information, complete the app's request, and free the intermediate buffer. Better yet, you can make the WDF memory object for the intermediate buffer a child of the request so that it's freed automatically when you complete the request. &lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Push Model &lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Say your device is going to bubble data up to your driver when something happens. It might be GPS coordinates, printer status, a finger print scan, etc… How do you get this data back to an application? Clearly you don't want the application to poll for data. All you want to do is push the data you're getting from the device up to the application. How do you do this? &lt;/P&gt;
&lt;P&gt;The first thing to understand is that you can only give the application data that it asks for&lt;A class="" href="http://blogs.msdn.com/controlpanel/blogs/posteditor.aspx?SelectedNavItem=Posts&amp;amp;sectionid=6111&amp;amp;postid=1605790#footnote020507#footnote020507" mce_href="http://blogs.msdn.com/controlpanel/blogs/posteditor.aspx?SelectedNavItem=Posts&amp;amp;sectionid=6111&amp;amp;postid=1605790#footnote020507#footnote020507"&gt;*&lt;/A&gt;. Unless the app makes a request and gives you a buffer you don't have a way to put data in its address space. So clearly the Push model is just a variant of the pull model. &lt;/P&gt;
&lt;P&gt;In the pull model you let the app send you one or more requests asking for data. You queue those requests for later processing. In the background you have some code which is reading data from the device. When those read commands complete you pickup an app request off the queue, copy your command data into the app's request buffers then complete the app request. &lt;/P&gt;
&lt;P&gt;You may choose to copy the data into multiple requests, you may choose not to complete the request if you don't have enough data to fill its buffer with just one command. And if you don't have any pending requests you need to decide whether to just throw the data away or whether to hold it in an internal buffer until the app comes down to ask for more. &lt;/P&gt;
&lt;P&gt;The key difference between the push and pull models is whether the driver is sending commands to the device on its own, or whether every device command comes because the app sent your driver a request. &lt;/P&gt;
&lt;P&gt;As I said before - it's never this simple. Looking at the UMDF Fx2 sample you see that it uses the pull model for read/write operations on the device and for most of the i/o controls that it supports. However it uses the push model to handle requests to read the state of the DIP switches. &lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;&lt;/P&gt;
&lt;P&gt;-p &lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A class="" title=footnote020507 name=footnote020507&gt;&lt;/A&gt;*&lt;/A&gt; You can use PNP device events if you need to push the fact that something has happened to any app which might be listening. But it's an unreliable mechanism and isn't suitable as a way to stream data. &lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1605790" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/peterwie/archive/tags/Device+Drivers+General/default.aspx">Device Drivers General</category><category domain="http://blogs.msdn.com/peterwie/archive/tags/UMDF/default.aspx">UMDF</category></item><item><title>Do UMDF drivers require signing?</title><link>http://blogs.msdn.com/peterwie/archive/2007/01/23/do-umdf-drivers-require-signing.aspx</link><pubDate>Tue, 23 Jan 2007 22:32:03 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1516371</guid><dc:creator>PeterWie</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/peterwie/comments/1516371.aspx</comments><wfw:commentRss>http://blogs.msdn.com/peterwie/commentrss.aspx?PostID=1516371</wfw:commentRss><description>&lt;p&gt;To quote from &lt;a href="http://www.snpp.com/episodes/4F07.html"&gt;Rev. Lovejoy&lt;/a&gt;: 
&lt;/p&gt;&lt;p&gt; 
 &lt;/p&gt;&lt;p style="margin-left: 27pt"&gt;&lt;em&gt;Shoo, short answer: "Yes" with an "If",  long answer "No" - with a "But.
&lt;/em&gt;&lt;/p&gt;&lt;p&gt; 
 &lt;/p&gt;&lt;p&gt;There are two types of driver signing, which complicates the answer.  As usual any answers I provide are probably vague and can be overridden by standard documentation.  In this case the documentation seems to be available on &lt;a href="http://msdn2.microsoft.com/en-us/library/aa906287.aspx"&gt;MSDN&lt;/a&gt;.
&lt;/p&gt;&lt;p&gt; 
 &lt;/p&gt;&lt;p&gt;&lt;span style="text-decoration:underline"&gt;&lt;strong&gt;Driver Package Signing:
&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;First there's the standard signing of the 'driver package' (all the files needed to install the driver) which has been around since Win2k.  Signing your driver package allows you to avoid the "unsigned driver" popup, and allows end-users to determine whether your package has been tampered with.  Personally I think it's goodness, but having never had to go through the signing process I realize it's easy for me to feel that way. 
&lt;/p&gt;&lt;p&gt;To sign your driver package your INF should have a &lt;em&gt;CatalogFile&lt;/em&gt; directive in the &lt;em&gt;[Version]&lt;/em&gt; section.  The catalog file contains hashes for all the files in your driver package and is then signed to ensure it can't be tampered with.
&lt;/p&gt;&lt;p&gt; 
 &lt;/p&gt;&lt;p&gt;&lt;span style="text-decoration:underline"&gt;&lt;strong&gt;Code Integrity Signing:
&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;In Vista there's a new code-signing requirement.  Kernel-mode binaries that load in 64-bit Windows Vista (or drivers on 32-bit &amp;amp; 64-bit windows that stream protected content) need to be code signed so that the OS can determine whether they have been tampered with.  
&lt;/p&gt;&lt;p&gt;From a quick scan of the documentation it sounds like this mostly affects the type of certificate you can use when you do your signing.  The Code Integrity system (which checks your driver signatures when the driver is loaded) requires something called a "&lt;a href="http://msdn2.microsoft.com/en-us/library/aa906334.aspx"&gt;Software Publisher Certificate (SPC)&lt;/a&gt;", while regular driver signing can use either an SPC or a "&lt;a href="http://msdn2.microsoft.com/en-us/library/aa906263.aspx"&gt;commercial release certificate&lt;/a&gt;".  However I believe that if you are installing a kernel-mode boot driver you have to make sure your binaries are self signed (signature embedded in the binary) while if you are installing non-boot kernel-mode drivers that you can use a catalog signature (signature embedded in the .cat file installed with the package) instead.  
&lt;/p&gt;&lt;p&gt;Regardless your driver package will still require a signature in order to get through installation.
&lt;/p&gt;&lt;p&gt; 
 &lt;/p&gt;&lt;p&gt;So what does all this mean for UMDF?  
&lt;/p&gt;&lt;p&gt; 
 &lt;/p&gt;&lt;p&gt;UMDF drivers do not require Code Integrity Signing since they aren't kernel-mode code.  However your driver package still needs to be signed so that it can't be tampered with &amp;amp; can be traced back to the author (or you continue to have unsigned driver popups).  And if your package includes any non-Microsoft kernel-mode drivers in addition to the user-mode driver then the Code Integrity Signing rules apply to that too.
&lt;/p&gt;&lt;p&gt; 
 &lt;/p&gt;&lt;p&gt;To finish with the quote from Rev. Lovejoy:
&lt;/p&gt;&lt;p style="margin-left: 27pt"&gt; 
 &lt;/p&gt;&lt;p style="margin-left: 27pt"&gt;&lt;em&gt;Uh, if you need additional solace, by the way, I've got a copy of something or other by Art Linkletter in my office.
&lt;/em&gt;&lt;/p&gt;&lt;p style="margin-left: 27pt"&gt; 
 &lt;/p&gt;&lt;p&gt;-p
&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1516371" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/peterwie/archive/tags/Device+Drivers+General/default.aspx">Device Drivers General</category><category domain="http://blogs.msdn.com/peterwie/archive/tags/UMDF/default.aspx">UMDF</category></item><item><title>Fixing the UMDF USB samples to install both on XP &amp; Vista</title><link>http://blogs.msdn.com/peterwie/archive/2007/01/10/fixing-the-umdf-usb-samples-to-install-both-on-xp-vista.aspx</link><pubDate>Wed, 10 Jan 2007 22:10:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1445506</guid><dc:creator>PeterWie</dc:creator><slash:comments>4</slash:comments><comments>http://blogs.msdn.com/peterwie/comments/1445506.aspx</comments><wfw:commentRss>http://blogs.msdn.com/peterwie/commentrss.aspx?PostID=1445506</wfw:commentRss><description>&lt;P&gt;UMDF's content in the WDK contains a handful of examples for controlling a USB device. Unfortunately they only show how to do it on Vista. The problem was that WinUSB's co-installer wasn't added to the WDK until very late - too late for us to be able to change our samples to show how to use it. &lt;/P&gt;
&lt;P&gt;WINUSB introduces a number of new things into the INF because of the complexity of installing it on XP and making it work with the in-box Vista support. In Vista WinUSB is present on the disk but the driver &amp;amp; service aren't "installed" until some INF copies them into place. The WinUSB folks provided an in-box INF (winusb.inf) that you can reference in your INF with the Includes/Needs directives so that you don't have to setup the service entries yourself. &lt;/P&gt;
&lt;P&gt;On XP WinUSB doesn't exist until someone installs it. The preferred installation route is to use the WinUsbCoinstaller. However because WINUSB.INF isn't already on the machine in XP, you can't depend on it to setup the WinUSB service entries. And we couldn't rely on the WinUsbCoinstaller to do it because the device installer requires that your INF have an AddService directive for the driver which will act as the FDO. &lt;/P&gt;
&lt;P&gt;The result is that installing WinUSB requires you to add a few things to your INF. Some of these are already demonstrated in the existing sample INFs. Others are new, and there's one "bug fix". I've added the full INF as an attachment to this blog entry. &lt;/P&gt;
&lt;P&gt;So starting with the Fx2 driver's INF, here are the necessary changes to build a driver package that will install both on XP and Vista. &lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;
&lt;DIV&gt;&lt;STRONG&gt;Include sections from WINUSB.INF in your INF &lt;/STRONG&gt;&lt;/DIV&gt;
&lt;P&gt;Specifically in your [&lt;EM&gt;DDInstall&lt;/EM&gt;.NT] section you add: &lt;/P&gt;
&lt;DIV style="MARGIN-LEFT: 27pt"&gt;&lt;PRE&gt;Include=WINUSB.INF ; Import sections from WINUSB.INF
Needs=WINUSB.NT ; Run the CopyFiles &amp;amp; AddReg directives
&lt;/PRE&gt;&lt;/DIV&gt;
&lt;P&gt;The first tells Device Installation to locate WINUSB.INF and read in all of its sections. The second tells DI that it should import any directives in the "WINUSB.NT" section into this section as well. WINUSB.NT contains CopyFiles &amp;amp; AddReg directives that tell Vista to copy the WinUSB.Sys binary as part of your driver package &amp;amp; sets up some registry entries. &lt;/P&gt;
&lt;P&gt;Now you may recall I said that there was a problem on XP because this INF doesn't exist. However when you ask DI to include an INF file that doesn't exist (or say you Need a section that doesn't exist) the installer just ignores you. Normally that would drive me nuts (I hate hidden errors) but it works in my favor in this case. &lt;/P&gt;
&lt;P&gt;On XP these two directives are benign and we depend on the WinUsbCoinstaller to copy the files into place and setup the registry entries. On Vista WinUsbCoinstaller doesn't do anything and we depend on these directives to copy the binaries. &lt;/P&gt;
&lt;P&gt;This leads us to step 2 ... &lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV&gt;&lt;STRONG&gt;Copy &amp;amp; Invoke the WinUsbCoinstaller in your INF &lt;/STRONG&gt;&lt;/DIV&gt;
&lt;P&gt;To invoke the WinUSB coinstaller requires three things in your INF: &lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;
&lt;DIV&gt;Add the file to [SourceDisksFiles] so that DI knows where to get the file from &lt;/DIV&gt;
&lt;DIV&gt;&lt;PRE&gt;[SourceDisksFiles]
...
WinUsbCoinstaller.dll=1
&lt;/PRE&gt;&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV&gt;Add the file to [CoInstallers_CopyFiles] so that DI knows that it needs to copy it &lt;/DIV&gt;
&lt;DIV&gt;&lt;PRE&gt;CoInstallers_CopyFiles]
...
WinUsbCoinstaller.dll
&lt;/PRE&gt;&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV&gt;Add the name of the coinstaller to the CoInstallers32 registry entry so that DI knows to invoke it. &lt;/DIV&gt;
&lt;DIV&gt;&lt;PRE&gt;[CoInstallers_AddReg]
HKR,,CoInstallers32,0x00010000,"WudfUpdate_$UMDFCOINSTALLERVERSION$.dll",\&lt;BR&gt;                               "WinUsbCoinstaller.dll", \&lt;BR&gt;                               "WdfCoInstaller01005.dll,WdfCoInstaller"
&lt;/PRE&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;Note that the names of the last two sections need to match what you provide to CopyFiles and AddReg in your INF's [&lt;EM&gt;DDInstall&lt;/EM&gt;.Coinstallers] section. &lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV&gt;&lt;STRONG&gt;Fix the bug in the [WinUsb_Install] section &lt;/STRONG&gt;&lt;/DIV&gt;
&lt;P&gt;WinUsb requires version 1.5 of KMDF, not version 1.0. We didn't catch this before the samples shipped. Change the section to look like: &lt;/P&gt;
&lt;DIV style="MARGIN-LEFT: 27pt"&gt;&lt;PRE&gt;[WinUsb_Install]
KmdfLibraryVersion=1.5
&lt;/PRE&gt;&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV&gt;&lt;STRONG&gt;Include WinUsbCoinstaller.dll as part of your signed driver package&lt;/STRONG&gt;&lt;/DIV&gt;
&lt;P&gt;Along with WudfUpdate_01005.dll &amp;amp; WdfCoinstaller01005.dll you also now need to copy WinUsbCoinstaller.dll &amp;amp; add it to the catalog for your INF. You can find this file in c:\winddk\6000\redist\winusb\&amp;lt;arch&amp;gt;.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;Like the KMDF and UMDF coinstallers, it comes in a _chk version also. If you're installing your driver (whether you built it checked or free) on a checked system you should use the _chk version of the DLL.&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;Four little changes and you're done. The same changes apply to any of the UMDF USB samples. &lt;/P&gt;
&lt;P&gt;-p &lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1445506" width="1" height="1"&gt;</description><enclosure url="http://blogs.msdn.com/peterwie/attachment/1445506.ashx" length="3061" type="text/plain" /><category domain="http://blogs.msdn.com/peterwie/archive/tags/Device+Drivers+General/default.aspx">Device Drivers General</category><category domain="http://blogs.msdn.com/peterwie/archive/tags/UMDF/default.aspx">UMDF</category></item><item><title>Glossary Definition of "WDM"</title><link>http://blogs.msdn.com/peterwie/archive/2006/10/23/glossary-definition-of-wdm.aspx</link><pubDate>Mon, 23 Oct 2006 23:52:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:865514</guid><dc:creator>PeterWie</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/peterwie/comments/865514.aspx</comments><wfw:commentRss>http://blogs.msdn.com/peterwie/commentrss.aspx?PostID=865514</wfw:commentRss><description>&lt;P&gt;I got looped into a discussion about the WDK glossary entry for "Windows Driver Model". It got me thinking about how difficult it is to explain things in the driver space to non-driver folks. &lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;&lt;/P&gt;
&lt;P&gt;When I was working in storage I used to have this problem all the time. Someone, usually a family member, would ask me what I did and I'd have to talk about what a "storage device" was, about what miniports were, etc… For a while I gave up and described my job as "something technical and utterly uninteresting". Finally I settled on "I make the light on your hard-disk blink". &lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then I moved to the WDF team and everything became complicated again. Explaining what WDF is to a non-driver person is a bit like explaining what colors are to someone who is color blind. &lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;&lt;/P&gt;
&lt;P&gt;So here's my attempt to explain WDM to someone sort of technical who has no idea what a device driver does: &lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;&lt;/P&gt;
&lt;P style="MARGIN-LEFT: 27pt"&gt;&lt;SPAN style="COLOR: #1f497d; TEXT-DECORATION: underline"&gt;&lt;STRONG&gt;Windows Driver Model &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN-LEFT: 27pt"&gt;&amp;nbsp; &amp;nbsp;&lt;/P&gt;
&lt;P style="MARGIN-LEFT: 27pt"&gt;&lt;SPAN&gt;An architecture for Windows extensions (device drivers) which allow the operating system core to communicate with a wide variety of devices.&amp;nbsp; WDM defines a Device Driver Interface (DDI) for drivers to interact with each other and the OS, and a set of required behaviors that device drivers must implement in order to work well with the rest of the system.&amp;nbsp; WDM and WDM drivers work together to provide device I/O, Plug and Play, Power Management and WMI support. &lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN-LEFT: 27pt"&gt;&amp;nbsp; &amp;nbsp;&lt;/P&gt;
&lt;P style="MARGIN-LEFT: 27pt"&gt;&lt;SPAN&gt;WDM is a packet-based I/O architecture.&amp;nbsp; Applications (as well as the OS and other drivers) can make requests of particular devices.&amp;nbsp; WDM represents these requests as I/O Request Packets (IRPs) and sends them to a particular set of device drivers for processing.&amp;nbsp; The drivers typically work in a layered fashion – each performing some portion of the request then handing the request off to the next driver – until the bottom most driver programs the device to perform the requested operation(s). &lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN-LEFT: 27pt"&gt;&amp;nbsp; &amp;nbsp;&lt;/P&gt;
&lt;P style="MARGIN-LEFT: 27pt"&gt;&lt;SPAN&gt;Not all devices are supported by WDM drivers.&amp;nbsp; Some device classes (such as storage devices or network adapters) provide their own class-specific DDIs and behaviors which represent a subset of WDM.&amp;nbsp; Other drivers may be implemented using the Windows Driver Frameworks, which provides a simpler general-purpose infrastructure for writing drivers. &lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN-LEFT: 27pt"&gt;&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=865514" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/peterwie/archive/tags/Device+Drivers+General/default.aspx">Device Drivers General</category></item><item><title>Does Windows have a "Scheduler"</title><link>http://blogs.msdn.com/peterwie/archive/2006/10/20/does-windows-have-a-scheduler.aspx</link><pubDate>Fri, 20 Oct 2006 23:28:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:850347</guid><dc:creator>PeterWie</dc:creator><slash:comments>5</slash:comments><comments>http://blogs.msdn.com/peterwie/comments/850347.aspx</comments><wfw:commentRss>http://blogs.msdn.com/peterwie/commentrss.aspx?PostID=850347</wfw:commentRss><description>&lt;P&gt;&lt;SPAN&gt;The question came up on the NTDEV mailing list a while back about how the "Scheduler" works in Windows … specifically about what thread it ran on and how it got control. &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The answer is that you should ignore this idea that there's a "scheduler" as an independent entity.&amp;nbsp; It doesn't exist like that in Windows. &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;In windows there are basically two functions for scheduling in the dispatcher.&amp;nbsp; The first selects the most appropriate thread to run on a processor at any given time based on a number of factors such as thread priority, thread affinity, ideal processor, etc… .&amp;nbsp; The second initiates a context switch between the current thread and the new one. &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The Ke subsystem implements these functions and uses them to schedule threads in a distributed manner.&amp;nbsp; Basically any time a Ke function is called which changes the state of a thread (to block it, to wake it up, to change its priority, to mark it as having exceeded a quantum) that function will invoke these two other functions to see if a different thread should be running and, if so, to swap over to it. &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;So you've got some user-mode code on a processor.&amp;nbsp; That code will continue to run until it: &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;SPAN&gt;Calls WaitForSingleObject, which calls the NtWaitForSingleObject system call which transitions to kernel mode and (eventually) calls KeWaitForSingleObject.&amp;nbsp; KeWaitForSingleObject links the current thread onto the wait list for the object (say an event) then selects another thread which could be run and does a context switch&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Times New Roman"&gt; &lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;
&lt;DIV&gt;&lt;SPAN&gt;Gets a page fault.&amp;nbsp; This triggers the kernel trap handler, which calls the memory manager which will initiate a page-in then calls KeWaitForSingleObject to block the thread until the I/O completes.&amp;nbsp; KeWaitForSingleObject will select a new thread to run and switch to it.&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Times New Roman"&gt; &lt;/SPAN&gt;&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;Is interrupted by a timer interrupt.&amp;nbsp; The kernel's timer interrupt handler will see if the current thread has run longer than its quota and, if so, will attempt to select a new thread to run.&amp;nbsp; If the current thread is the highest priority thread in the system then it will be left on the processor.&amp;nbsp; Otherwise the kernel code will get select a new one and switch to it.&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Times New Roman"&gt; &lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;SPAN&gt;Is interrupted by a device interrupt which completes an I/O request initiated by another process.&amp;nbsp; Often this involves boosting the priority of the other process by calling a Ke function.&amp;nbsp; This function sets the new priority, then calls the selection function to see what process should be running on the processor.&amp;nbsp; If there's a better candidate after the priority boost then Ke will swap to the new thread&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 12pt; FONT-FAMILY: Times New Roman"&gt; &lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;There are a number of other conditions which can cause a context switch, and I've dramatically oversimplified some of them, but hopefully this will help you get the idea.&amp;nbsp; The responsibility for scheduling in NT is distributed across all threads in the system, which eventually end up in a Ke routine. &lt;/SPAN&gt;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=850347" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/peterwie/archive/tags/Device+Drivers+General/default.aspx">Device Drivers General</category></item><item><title>Meet my boss</title><link>http://blogs.msdn.com/peterwie/archive/2006/10/02/Meet-my-boss.aspx</link><pubDate>Mon, 02 Oct 2006 22:20:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:781539</guid><dc:creator>PeterWie</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.msdn.com/peterwie/comments/781539.aspx</comments><wfw:commentRss>http://blogs.msdn.com/peterwie/commentrss.aspx?PostID=781539</wfw:commentRss><description>&lt;P&gt;Nar's talk on the &lt;A class="" title="Nar Ganapathy on the NT I/O manager" href="http://channel9.msdn.com/ShowPost.aspx?PostID=239845#239845" target=_blank mce_href="http://channel9.msdn.com/ShowPost.aspx?PostID=239845#239845"&gt;NT I/O manager&lt;/A&gt; is now up on channel 9.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=781539" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/peterwie/archive/tags/Device+Drivers+General/default.aspx">Device Drivers General</category><category domain="http://blogs.msdn.com/peterwie/archive/tags/Vista/default.aspx">Vista</category></item><item><title>Ilias Tsigkogiannis has started a Blog about learning to write Windows Drivers</title><link>http://blogs.msdn.com/peterwie/archive/2006/09/28/775779.aspx</link><pubDate>Thu, 28 Sep 2006 20:55:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:775779</guid><dc:creator>PeterWie</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/peterwie/comments/775779.aspx</comments><wfw:commentRss>http://blogs.msdn.com/peterwie/commentrss.aspx?PostID=775779</wfw:commentRss><description>&lt;P&gt;Ilias is the latest addition to the UMDF development team. I'm really excited that he's decided to start &lt;A href="http://blogs.msdn.com/iliast/default.aspx"&gt;blogging &lt;/A&gt;about his initial experience learning about how WDM and UMDF drivers work. Hopefully this can serve as a helpful introduction for anyone who is just starting off with driver development.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=775779" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/peterwie/archive/tags/Device+Drivers+General/default.aspx">Device Drivers General</category></item><item><title>COM in UMDF</title><link>http://blogs.msdn.com/peterwie/archive/2006/09/15/650813.aspx</link><pubDate>Fri, 15 Sep 2006 20:53:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:650813</guid><dc:creator>PeterWie</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/peterwie/comments/650813.aspx</comments><wfw:commentRss>http://blogs.msdn.com/peterwie/commentrss.aspx?PostID=650813</wfw:commentRss><description>&lt;p&gt;UMDF defines all of its interfaces using COM interfaces, rather than the flat C-style DDI that the KMDF team used.  When kernel developers see this their first question is often "why did you do that?" and it's an understandable question.  I had a long discussion at WinHEC about this exact topic.
&lt;/p&gt;&lt;p&gt;First not everyone is sold on the flat C DDI that we put together for KMDF.  In the polls we've done, the sample group (let's be optimistic and call it the "industry") is split about evenly on whether they want C or C++.  However for folks that concentrate more on user-mode stuff there's a greater preference for C++.  So we wanted a DDI that would work well with C++ but that wouldn't force you to use it.
&lt;/p&gt;&lt;p&gt;Using straight C++ objects also wouldn't work.  C++ has its nice points, but sharing objects across DLL boundaries isn't one of them.  There's no way to publish only your "public" members, there are concerns about whether our compiler will do the same name mangling from release to release with exports (long story), there's the fragile base class problem, there are all sorts of issues with the new &amp;amp; delete operators, and it can't be used from C without a wrapper library.
&lt;/p&gt;&lt;p&gt;We could have used C++ abstract classes – describing the interfaces that our objects exposed without any of the pesky internal details.  But we'd then have to add reference counting on top of that, and some method of casting one interface type to another, and when you're all done it looks like every object supports IUnknown. 
&lt;/p&gt;&lt;p&gt;So the bottom line is that we chose COM because we had to expose something that acted an awful lot like COM.  Rather than create our own semantic which everyone would have to learn, we decided to borrow from an existing one that's already understood by many developers.
&lt;/p&gt;&lt;p&gt;We've worked very hard to keep the COM runtime goop out of UMDF.  UMDF drivers don't register as COM DLLs, they don't get to do any of the weird COM synchronization stuff, and they don't have to worry about IDispatch or monikers or whether they're running in-proc/out-of-proc.  We try to use the COM programming model but without the weird magic that the COM runtime introduces.  We do allow you to use something like ATL though if you're tolerant of a little magic and want to make the COM boilerplate easier.  And I have to admit that as much as I dislike magical templated macros, being able to use CComPtr to do my reference counting for me is a helpful thing.
&lt;/p&gt;&lt;p&gt;-p&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=650813" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/peterwie/archive/tags/Device+Drivers+General/default.aspx">Device Drivers General</category><category domain="http://blogs.msdn.com/peterwie/archive/tags/UMDF/default.aspx">UMDF</category></item><item><title>Building the UMDF 1.0 (beta) samples</title><link>http://blogs.msdn.com/peterwie/archive/2006/06/28/650386.aspx</link><pubDate>Thu, 29 Jun 2006 05:45:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:650386</guid><dc:creator>PeterWie</dc:creator><slash:comments>10</slash:comments><comments>http://blogs.msdn.com/peterwie/comments/650386.aspx</comments><wfw:commentRss>http://blogs.msdn.com/peterwie/commentrss.aspx?PostID=650386</wfw:commentRss><description>&lt;p&gt;I&amp;#39;m sorry it&amp;#39;s taken me so long to write about this.&amp;nbsp; The 
last week or two have been pretty hectic as we try to lockdown for Vista.&amp;nbsp; 
But we still want people to download the UMDF 1.0 beta, and here are the 
instructions for that.&lt;/p&gt;
&lt;p&gt;The first step, of course, is to install the WDK.&amp;nbsp; You 
can either use the Beta 2 WDK or the 5456 version which was recently published 
on the beta site.&amp;nbsp; If you don&amp;#39;t have either of these installed yet, you can 
my earlier blog entry on
&lt;a href="http://blogs.msdn.com/peterwie/archive/2006/05/30/611070.aspx"&gt;
installing the WDK&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Next you need to download the UMDF beta bits and install those 
on your development machine as well.&amp;nbsp; Go to the connect.microsoft.com site 
for the beta &amp;amp; look under downloads.&amp;nbsp; You will see several items but you 
want to download and run either &amp;quot;UMDFx86&amp;quot; or &amp;quot;UMDF64&amp;quot; depending on the 
architecture of your &lt;em&gt;development&lt;/em&gt; machine (not your test machine).&amp;nbsp; 
Download and install the MSI and you&amp;#39;ll be ready to go.&lt;/p&gt;
&lt;p&gt;To actually build one of the samples you&amp;#39;ll want to start a 
&amp;quot;Windows Vista and Windows Server Longhorn&amp;quot; build environment from the WDK.&amp;nbsp; 
This is burried under &amp;quot;Windows Driver Kits&amp;quot; on your start menu.&amp;nbsp; Be sure 
you either use the 5483 or 5456 WDK ... if you have Beta 1 or the February CTP 
kit still installed those may not work.&lt;/p&gt;
&lt;p&gt;Once you&amp;#39;ve started your build window, you need to run a 
script to tell it to use the headers &amp;amp; all from the MSI you just installed 
rather than the ones in the kit.&amp;nbsp; Do the following:&lt;/p&gt;
&lt;pre class="style2"&gt;
    cd \WinDDK\WDF\UMDF10_xp
    set_umdf_env.cmd
    cd src\umdf
    build -cZ
&lt;/pre&gt;
&lt;p&gt;And you&amp;#39;ve just built the UMDF 1.0 samples.&lt;/p&gt;
&lt;p&gt;Next time i&amp;#39;ll walk through installing the echo sample driver.&lt;/p&gt;
&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=650386" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/peterwie/archive/tags/Device+Drivers+General/default.aspx">Device Drivers General</category><category domain="http://blogs.msdn.com/peterwie/archive/tags/UMDF/default.aspx">UMDF</category></item><item><title>UMDF 1.0 (for XP only) beta is FINALLY avaialble</title><link>http://blogs.msdn.com/peterwie/archive/2006/06/15/632589.aspx</link><pubDate>Thu, 15 Jun 2006 21:16:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:632589</guid><dc:creator>PeterWie</dc:creator><slash:comments>4</slash:comments><comments>http://blogs.msdn.com/peterwie/comments/632589.aspx</comments><wfw:commentRss>http://blogs.msdn.com/peterwie/commentrss.aspx?PostID=632589</wfw:commentRss><description>&lt;P&gt;&lt;FONT size=6&gt;YIPPY!!!&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Sometimes it seems like releasing software is more complicated than developing it.&amp;nbsp; We really wanted to have this at WinHEC, but that just wasn't going to happen.&amp;nbsp; Fortunately I have an amazing team to help push through all the problems and process imposed upon us.&amp;nbsp; So we have a beta release.&lt;/P&gt;
&lt;P&gt;If you're already signed up for the Windows Driver Kit beta then you should have email telling you that the UMDF beta is available.&amp;nbsp; The mail helpfully fails to tell you where to get the beta - it's on the download page for the &lt;A href="http://blogs.msdn.com/peterwie/archive/2006/05/30/611070.aspx"&gt;WDK beta&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;If you aren't signed up but you've read this far you clearly want to.&amp;nbsp; Go ahead and do it.&amp;nbsp; Unless you're chicken* that is (or don't have the bandwidth to download a 2+ GB kit).&lt;/P&gt;
&lt;P&gt;I really want to write some more about using it, but my team is trying to lockdown for the Vista RC and I don't have time today.&amp;nbsp; In the next few days i'll walk through the steps of installing it, compiling the samples and getting the resulting driver installed.&lt;/P&gt;
&lt;P&gt;Until then, the readme file is your friend.&lt;/P&gt;
&lt;P&gt;Enjoy.&lt;/P&gt;
&lt;P&gt;-p&lt;/P&gt;
&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;P&gt;&lt;FONT size=1&gt;&lt;EM&gt;* they say goading can be an effective motivator.&amp;nbsp; Let's try it now.&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=632589" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/peterwie/archive/tags/Device+Drivers+General/default.aspx">Device Drivers General</category><category domain="http://blogs.msdn.com/peterwie/archive/tags/UMDF/default.aspx">UMDF</category></item><item><title>Windows Driver Kit Beta 2 is finally available</title><link>http://blogs.msdn.com/peterwie/archive/2006/05/30/611070.aspx</link><pubDate>Tue, 30 May 2006 22:41:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:611070</guid><dc:creator>PeterWie</dc:creator><slash:comments>11</slash:comments><comments>http://blogs.msdn.com/peterwie/comments/611070.aspx</comments><wfw:commentRss>http://blogs.msdn.com/peterwie/commentrss.aspx?PostID=611070</wfw:commentRss><description>&lt;html&gt;
&lt;body&gt;
    I got back from vacation today and went to 
    &lt;a href="http://www.connect.microsoft.com"&gt;connect.microsoft.com&lt;/a&gt; to see
    if the WDK beta was up yet, and i'm happy to say that it is.  It's a fairly
    large (2.3 GB) ISO image to download and i'm pulling it down now to make 
    sure it works okay.
    &lt;p&gt;
    Here are the steps i had to follow to get into the beta:
    &lt;ol&gt;
        &lt;li&gt;
        Navigate to &lt;a href="http://www.connect.microsoft.com"&gt;connect.microsoft.com&lt;/a&gt;
        and sign in using your passport account (the passport link is at
        the top right of the web page).
        &lt;p&gt;&lt;/li&gt;
        &lt;li&gt;
        Go to the &lt;a href="http://www.connect.microsoft.com/availableprograms.aspx"&gt;Available Programs&lt;/a&gt;
        page (there's a menu link on the left side of the window) and scroll
        down to find the &lt;i&gt;Microsoft Windows Driver Kit (WDK) Beta Program&lt;/i&gt; entry
        then click on the &lt;i&gt;Apply/&lt;/i&gt; link.
        &lt;p&gt;&lt;/li&gt;
        &lt;li&gt;
        Decide if you agree with the terms and conditions.  If you do then 
        click on the &lt;i&gt;I Agree&lt;/i&gt; button at the bottom of the screen.
        &lt;p&gt;&lt;/li&gt;
        &lt;li&gt;
        This should bring you to the &lt;em&gt;Mandatory Surveys&lt;/em&gt; page.  The
        &lt;em&gt;Beta 2 Feedback survey&lt;/em&gt; is very, very short so you should just
        take it.  If you want to skip it there's a link for that too, but I'm 
        guessing that you'll be forced to take it by 6/15 if you want to keep 
        access to the beta site (based on the web page content).
        &lt;p&gt;&lt;/li&gt;
        &lt;li&gt;
        Either way you'll end up at the web page for the WDK beta.  There's 
        nothing really on the page, but you can get the kit from the 
        &lt;em&gt;Downloads&lt;/em&gt; link in the menu on the left-hand side of the screen.
        &lt;p&gt;&lt;/li&gt;
        &lt;li&gt;
        On the downloads page, choose the last item (WDK Beta 2).  Downloading
        this requires that you install an ActiveX control, and the download
        will take a while.  Once you're done you should be able to burn it 
        to a DVD using your favorite tool, or use the 
        &lt;a href="http://download.microsoft.com/download/7/b/6/7b6abd84-7841-4978-96f5-bd58df02efa2/winxpvirtualcdcontrolpanel_21.exe"&gt;Virtual CD-ROM tool&lt;/a&gt;
        to mount the image.
        from Microsoft.
        &lt;p&gt;
        For purposes of this discussion, we'll assume you mount the ISO image
        (either with a DVD or VirtualCD) on z:.
        &lt;p&gt;&lt;/li&gt;
        &lt;li&gt;
        Open Z: and run Installer.exe.  This will let you install the 
        prerequisites and then the build environment and doc set.  Install 
        whatever other parts you see fit.
        &lt;/li&gt;
    &lt;/ol&gt;
    You should now have a kit installed which will let you build UMDF drivers
    for use on Windows Vista (beta of XP support is on the way.)  I'll talk
    about getting started with that later.
    &lt;p&gt;
    Enjoy.
    &lt;p&gt;
    -p
&lt;/body&gt;
&lt;/html&gt;
&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=611070" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/peterwie/archive/tags/Device+Drivers+General/default.aspx">Device Drivers General</category><category domain="http://blogs.msdn.com/peterwie/archive/tags/UMDF/default.aspx">UMDF</category></item><item><title>GetScatterGatherList will coallesce contiguous SG list entries </title><link>http://blogs.msdn.com/peterwie/archive/2006/05/25/607608.aspx</link><pubDate>Fri, 26 May 2006 03:24:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:607608</guid><dc:creator>PeterWie</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/peterwie/comments/607608.aspx</comments><wfw:commentRss>http://blogs.msdn.com/peterwie/commentrss.aspx?PostID=607608</wfw:commentRss><description>&lt;P&gt;GregH asked me an interesting question at WinHEC today - one for which I didn't immediately know the answer.&amp;nbsp; He was wondering whether the new DMA DDIs (Get|PutScatterGatherList) would return a single SG entry for each page, or whether they would coallesce physically contiguous pages into a single entry.&lt;/P&gt;
&lt;P&gt;The answer is that the coallescing is "kind of complex and probably won't happen in a way that will make complete sense to someone just looking at the generated [SG] lists".&amp;nbsp; To anyone who is familiar with the DMA DDIs that sort of answer probably isn't surprising :)&lt;/P&gt;
&lt;P&gt;On X86 &amp;amp; for non-scatter-gather devices, the bounce buffers are allocated in big contiguous blocks and the DMA DDI will coallesce entries where possible.&amp;nbsp; Of course non-SG devices always get one big contiguous block no matter what, and so they'll only have a single entry.&lt;/P&gt;
&lt;P&gt;On AMD64 the bounce buffers for an SG adapter aren't necessarily contiguous so there may be less coallescing.&lt;/P&gt;
&lt;P&gt;Still, since you always have to plan for the worst case, this ends up being an optimization but shouldn't change your driver's behavior (unless your device uses single-page SG entries rather than address/length pairs).&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=607608" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/peterwie/archive/tags/Device+Drivers+General/default.aspx">Device Drivers General</category><category domain="http://blogs.msdn.com/peterwie/archive/tags/DMA/default.aspx">DMA</category></item></channel></rss>