<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>Pointless Blathering</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/peterwie/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/peterwie/feed.xml</link>
    <description>Peter Wieland&amp;#039;s thoughts on Windows driver development, and occasional rants about computing in general.</description>
    <lastBuildDate>Tue, 16 Apr 2019 05:23:09 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>New KMDF white-paper out on writing a bus driver</title>
      <link>https://docs.microsoft.com/archive/blogs/peterwie/new-kmdf-white-paper-out-on-writing-a-bus-driver</link>
      <pubDate>Tue, 21 Oct 2008 13:48:59 GMT</pubDate>
      <dc:creator><![CDATA[PeterWieland]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/peterwie/2008/10/21/new-kmdf-white-paper-out-on-writing-a-bus-driver/</guid>
      <description><![CDATA[Penny Orwick has been working on a white paper that talks abut using KMDF to write a bus...]]></description>
      <content:encoded><![CDATA[<p>Penny Orwick has been working on a white paper that talks abut using KMDF to write a bus driver.&#160; It’s been stalled waiting for us lazy developers to review it, but it finally came out last night:</p>  <p><a href="https://www.microsoft.com/whdc/driver/wdf/KMDFBusDrv.mspx">https://www.microsoft.com/whdc/driver/wdf/KMDFBusDrv.mspx</a></p>]]></content:encoded>
    </item>
    <item>
      <title>Pedantic Coder: Hungarian Notation</title>
      <link>https://docs.microsoft.com/archive/blogs/peterwie/pedantic-coder-hungarian-notation</link>
      <pubDate>Mon, 13 Oct 2008 11:00:00 GMT</pubDate>
      <dc:creator><![CDATA[PeterWieland]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/peterwie/2008/10/13/pedantic-coder-hungarian-notation/</guid>
      <description><![CDATA[I generally dislike Hungarian Notation.&#160; I particularly dislike what Wikipedia calls...]]></description>
      <content:encoded><![CDATA[<p>I generally dislike <a href="https://en.wikipedia.org/wiki/Hungarian_notation">Hungarian Notation</a>.&#160; I particularly dislike what Wikipedia calls &quot;System Hungarian&quot;, where the prefix indicates data type, as it adds almost no value for me.&#160; I dislike the more semantically oriented form of Hungarian notation where the prefix implies some broader attribute (like &quot;safety&quot;) because, though that does provide some value - I'm generally not fond of terse prefixes.&#160; If something is an unsafe X then call it &quot;unsafeX&quot;, not &quot;uX&quot; hoping that a reader will know u means unsafe.</p>  <p>I have taken to including units in variable names when they're (a) beyond what the underlying C/C++ types can discriminate between and (b) too basic to warrant the creation of a class.&#160; For example, when a timeout is in milliseconds or microseconds i'll name the variable &quot;timeoutMs&quot; or &quot;timeoutUs&quot; so that I know which units the value is in.&#160; I don't think that a &quot;time&quot; class is adding enough value here to create one and deal with publishing it, making it available for all the public interfaces I define, figuring out how to make it usable for C developers, etc...&#160; But the difference between Ms and Us is quite large (both literally and figuratively).</p>  <p>When I do annotate variable names i tend to use suffixes - I find it's easier (for me) to parse a list of names if the real variable name comes first.&#160; A block of variables named msX, msY, msZ, ... is simply harder to read.&#160; </p>  <p>Despite this there's one set of terse suffixes that I have started using religiously - Cb, Cch &amp; Ce.&#160; These are count-of-bytes, count-of-characters and count-of-elements.&#160; I have started using these everywhere in place of more general terms like &quot;length&quot; or &quot;size&quot; to indicate a counter for another variable.&#160; I think about these as another form of unit, and it has saved my butt a couple of times – particularly if you start using the safe-string functions since you can easily see that your “length” matches the same units as the string function you’re calling.</p>]]></content:encoded>
    </item>
    <item>
      <title>I've been style sheet hacking again</title>
      <link>https://docs.microsoft.com/archive/blogs/peterwie/ive-been-style-sheet-hacking-again</link>
      <pubDate>Fri, 10 Oct 2008 17:08:00 GMT</pubDate>
      <dc:creator><![CDATA[PeterWieland]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/peterwie/2008/10/10/ive-been-style-sheet-hacking-again/</guid>
      <description><![CDATA[My last post ran into a hard-coded width in the winter style.&nbsp; I like the style, but i wanted...]]></description>
      <content:encoded><![CDATA[My last post ran into a hard-coded width in the winter style.&nbsp; I like the style, but i wanted the text to be full screen.&nbsp; Hopefully the style-sheet override i put in will work.&nbsp; If it doens't let me know in this topic and i'll try to figure it out.]]></content:encoded>
    </item>
    <item>
      <title>Measuring DPC time</title>
      <link>https://docs.microsoft.com/archive/blogs/peterwie/measuring-dpc-time</link>
      <pubDate>Mon, 06 Oct 2008 20:59:00 GMT</pubDate>
      <dc:creator><![CDATA[PeterWieland]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/peterwie/2008/10/06/measuring-dpc-time/</guid>
      <description><![CDATA[At the DDC this year we had some very useful “community forums”.&nbsp; I generally come out of these...]]></description>
      <content:encoded><![CDATA[<P>At the DDC this year we had some very useful “community forums”.&nbsp; I generally come out of these feeling like I've been beaten with a sack of oranges, and this year was no exception.&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.&nbsp; When he asked about this my first thought was “I bet XPerf can do that”.</P>
<P>XPerf, for those who haven’t seen it, is part of a performance toolkit that the Windows performance team <A href="https://www.microsoft.com/whdc/system/sysperf/perftools.mspx" mce_href="https://www.microsoft.com/whdc/system/sysperf/perftools.mspx">released</A>.&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.</P>
<P>The down-side of XPerf is that it can be very hard to use.&nbsp; Every time I approach this tool I think “wow that’s a lot of data to make sense of”.&nbsp; But I would think that we can use it to collect information about what DPCs are running and how long they run for.</P>
<P>Once I installed XPerf I went into the installation directory and looked at the tools that it provides.&nbsp; There are two interesting tools – XPerf.exe and xperfview.exe.&nbsp; The first allows you to easily start and stop trace sessions, merge trace logs and do some data processing on the resulting logs.&nbsp; The second is the GUI visualization tool and lets you see your trace data.&nbsp; Let’s start with XPerf:</P>
<DIV class=csharpcode><PRE class=alt>C:\xperf&gt;xperf</PRE><PRE>&nbsp;</PRE><PRE class=alt>    Microsoft (R) Windows (R) Performance Analyzer Version 4.1.6512</PRE><PRE>    Performance Analyzer Command Line</PRE><PRE class=alt>    Copyright (c) Microsoft Corporation. All rights reserved.</PRE><PRE>&nbsp;</PRE><PRE class=alt>    Usage: xperf options ...</PRE><PRE>&nbsp;</PRE><PRE class=alt>        xperf -help view             <SPAN class=kwrd>for</SPAN> xperfview, the graphical user interface</PRE><PRE>&nbsp;</PRE><PRE class=alt>        xperf -help start            <SPAN class=kwrd>for</SPAN> logger start options</PRE><PRE>        xperf -help providers        <SPAN class=kwrd>for</SPAN> known tracing flags</PRE><PRE class=alt>        xperf -help stackwalk        <SPAN class=kwrd>for</SPAN> stack walking options</PRE><PRE>        xperf -help stop             <SPAN class=kwrd>for</SPAN> logger stop options</PRE><PRE class=alt>        xperf -help merge            <SPAN class=kwrd>for</SPAN> merge multiple trace files</PRE><PRE>        xperf -help processing       <SPAN class=kwrd>for</SPAN> trace processing options</PRE><PRE class=alt>        xperf -help symbols          <SPAN class=kwrd>for</SPAN> symbol decoding configuration</PRE><PRE>        xperf -help query            <SPAN class=kwrd>for</SPAN> query options</PRE><PRE class=alt>        xperf -help mark             <SPAN class=kwrd>for</SPAN> mark and mark-flush</PRE><PRE>        xperf -help format           <SPAN class=kwrd>for</SPAN> time and timespan formats on the command line</PRE></DIV>
<STYLE type=text/css>

.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; }</STYLE>

<P>Well we want to use this to start a trace session, so let’s start with xperf –help start:</P>
<DIV class=csharpcode><PRE class=alt>C:\xperf&gt;xperf -help start</PRE><PRE>    Trace start options:</PRE><PRE class=alt>&nbsp;</PRE><PRE>    xperf [-start|-update [LoggerName]] -on Flags|Groups options ...</PRE><PRE class=alt>            or -flush [LoggerName] ...</PRE><PRE>            or -SetProfInt [&lt;n&gt;] [cached]</PRE><PRE class=alt>&nbsp;</PRE><PRE>    User provider format <SPAN class=kwrd>for</SPAN> -on: (GUID|KnownProviderName)[:Flags[:Level]]</PRE><PRE class=alt>&nbsp;</PRE><PRE>        -start      LoggerName       Start a logging session <SPAN class=kwrd>for</SPAN> LoggerName</PRE><PRE class=alt>        -update     LoggerName       Update a logging session <SPAN class=kwrd>for</SPAN> LoggerName</PRE><PRE>        -flush      LoggerName       Flush a logging session <SPAN class=kwrd>for</SPAN> LoggerName</PRE><PRE class=alt>        -on         Flags|Groups     For kernel logging sessions, the sequence of</PRE><PRE>                                     kernel flags and groups to be enabled,</PRE><PRE class=alt>                                     separated by <SPAN class=str>'+'</SPAN>.  For user logging</PRE><PRE>                                     sessions, the sequence of providers to be</PRE><PRE class=alt>                                     enabled, separated by <SPAN class=str>'+'</SPAN>.  The accepted</PRE><PRE>                                     provider format <SPAN class=kwrd>is</SPAN>:</PRE><PRE class=alt>                                     (GUID|KnownProviderName)[:Flags[:Level]].</PRE><PRE>&nbsp;</PRE><PRE class=alt>                                     Use <SPAN class=str>"xperf -help providers"</SPAN> <SPAN class=kwrd>for</SPAN> a list of</PRE><PRE>                                     valid flags</PRE><PRE class=alt>        -f          filename         Log events to specified file; <SPAN class=kwrd>default</SPAN>:</PRE><PRE>                                     \kernel.etl <SPAN class=kwrd>for</SPAN> kernel traces and \user.etl</PRE><PRE class=alt>                                     <SPAN class=kwrd>for</SPAN> user traces</PRE><PRE>        -BufferSize Size             Set trace buffer size to Size KB (4 KB -</PRE><PRE class=alt>                                     1024 KB); <SPAN class=kwrd>default</SPAN>: 64 KB</PRE><PRE>        -MinBuffers n                Set minimum number of trace buffers to n;</PRE><PRE class=alt>                                     <SPAN class=kwrd>default</SPAN>: 64</PRE><PRE>        -MaxBuffers n                Set maximum number of trace buffers to n;</PRE><PRE class=alt>                                     <SPAN class=kwrd>default</SPAN>: 320</PRE><PRE>        -MaxFile    Size             Set maximum file size to Size MB</PRE><PRE class=alt>        -FlushTimer n                Set the flush timer to n seconds</PRE><PRE>        -BootTrace  Flags|Groups|off Config the Event Tracing For Windows Logger </PRE><PRE class=alt>                                     to trace boot.  Set flags <SPAN class=kwrd>as</SPAN> <SPAN class=str>"off"</SPAN> to turn </PRE><PRE>                                     off boot tracing.  All loggering control can</PRE><PRE class=alt>                                     be used <SPAN class=kwrd>in</SPAN> conjunction with <SPAN class=kwrd>this</SPAN>.  Use <SPAN class=kwrd>in</SPAN></PRE><PRE>                                     conjunction with -f to log to a file other </PRE><PRE class=alt>                                     than \Perf.etl.</PRE><PRE>        -RealTime                    Enable real time tracing</PRE><PRE class=alt>        -Buffering                   Enable buffering mode tracing</PRE><PRE>        -FileMode   Mode             Set the File Mode; <SPAN class=kwrd>default</SPAN>: Sequential.</PRE><PRE class=alt>                                     Mode: Sequential, Circular, Append, NewFile</PRE><PRE>&nbsp;</PRE><PRE class=alt>        -ClockType  ClockType        Set the clock type; <SPAN class=kwrd>default</SPAN>: PerfCounter.</PRE><PRE>                                     Type: Cycle, PerfCounter, SystemTime.</PRE><PRE class=alt>        -StackWalk  flags|@file      Enable stack walking <SPAN class=kwrd>for</SPAN> the events</PRE><PRE>                                     specified <SPAN class=kwrd>as</SPAN> Flag+Flag+..., or parse <SPAN class=str>'file'</SPAN> </PRE><PRE class=alt>                                     file <SPAN class=kwrd>for</SPAN> flags. Run <SPAN class=str>"xperf -help stackwalk"</SPAN> </PRE><PRE>                                     <SPAN class=kwrd>for</SPAN> more information.</PRE><PRE class=alt>        -Pids       pid [...]        Apply flags to processes pid [...].  Used <SPAN class=kwrd>in</SPAN></PRE><PRE>                                     conjunction with <SPAN class=kwrd>private</SPAN> loggers.</PRE><PRE class=alt>        -PidNewProcess &lt;command-line&gt;   Apply flags to a <SPAN class=kwrd>new</SPAN> process xperf will </PRE><PRE>                                     start with &lt;command-line&gt;.  Used <SPAN class=kwrd>in</SPAN></PRE><PRE class=alt>                                     conjunction with <SPAN class=kwrd>private</SPAN> loggers.</PRE><PRE>        -heap                        Enable heap tracing <SPAN class=kwrd>in</SPAN> processes specified </PRE><PRE class=alt>                                     by Pids and PidNewProcess.</PRE><PRE>        -critsec                     Enable critical section tracing <SPAN class=kwrd>in</SPAN> processes</PRE><PRE class=alt>                                     specified by Pids and PidNewProcess.</PRE><PRE>        -SetProfInt [&lt;n&gt;] [cached]   Set sampled profile interval to &lt;n&gt; [1221 ..</PRE><PRE class=alt>                                     10000000].  If <SPAN class=str>"cached"</SPAN> <SPAN class=kwrd>is</SPAN> specified,</PRE><PRE>                                     intervals are cached <SPAN class=kwrd>in</SPAN> ETW and reapplied</PRE><PRE class=alt>                                     whenever <SPAN class=kwrd>new</SPAN> ETW kernel loggers with sampled</PRE><PRE>                                     profile are started. [Default: &lt;n&gt; = 10000; </PRE><PRE class=alt>                                     not cached]</PRE><PRE>&nbsp;</PRE><PRE class=alt>    Multiple loggers can be started <SPAN class=kwrd>using</SPAN> multiple -start options, each followed by</PRE><PRE>    the options to be applied to that logger.  If LoggerName, or -start LoggerName,</PRE><PRE class=alt>    <SPAN class=kwrd>is</SPAN> omitted, the Kernel Logger <SPAN class=kwrd>is</SPAN> implied.  Only a single instance of Kernel </PRE><PRE>    Logger can exist at any time.  If one of the loggers fails to start, all the </PRE><PRE class=alt>    already started loggers are stopped.</PRE></DIV>
<STYLE type=text/css>

.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; }</STYLE>

<P>The only required argument to –start is a set of flags.&nbsp; The definition of Flags says to look at xperf providers to see what the possible flags are.&nbsp; The help for that command says:</P>
<DIV class=csharpcode><PRE class=alt>C:\xperf&gt;xperf -help providers</PRE><PRE>    Providers Query options:</PRE><PRE class=alt>&nbsp;</PRE><PRE>    xperf -providers [Installed|I] [Registered|R] [KernelFlags|KF] [KernelGroups|KG] [Kernel|K]</PRE><PRE class=alt>&nbsp;</PRE><PRE>    Query all installed/known and registered providers, <SPAN class=kwrd>as</SPAN> well <SPAN class=kwrd>as</SPAN> all known kernel flags and groups.</PRE><PRE class=alt>&nbsp;</PRE><PRE>    The following options are supported:</PRE><PRE class=alt>&nbsp;</PRE><PRE>        I,  Installed    : include Installed/known providers</PRE><PRE class=alt>        R,  Registered   : include Registered providers</PRE><PRE>        KF, KernelFlags  : include Kernel Flags</PRE><PRE class=alt>        KG, KernelGroups : include Kernel Groups</PRE><PRE>        K,  Kernel       : include Kernel flags and groups; shortcut <SPAN class=kwrd>for</SPAN> <SPAN class=str>"KF KG"</SPAN>.</PRE><PRE class=alt>&nbsp;</PRE><PRE>    If no options are specified, all providers are included <SPAN class=kwrd>in</SPAN> the output.</PRE></DIV>
<STYLE type=text/css>

.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; }</STYLE>

<P>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 <IMG alt=Smile src="https://messenger.msn.com/MMM2006-04-19_17.00/Resource/emoticons/regular_smile.gif" mce_src="https://messenger.msn.com/MMM2006-04-19_17.00/Resource/emoticons/regular_smile.gif">).</P>
<DIV class=csharpcode><PRE class=alt>C:\xperf&gt;xperf -providers K</PRE><PRE>Kernel Flags:</PRE><PRE class=alt>       PROC_THREAD    : Process and Thread create/delete</PRE><PRE>       LOADER         : Kernel and user mode Image Load/Unload events</PRE><PRE class=alt>       PROFILE        : CPU Sample profile</PRE><PRE>       CSWITCH        : Context Switch</PRE><PRE class=alt>       COMPACT_CSWITCH: Compact Context Switch</PRE><PRE>       DISPATCHER     : CPU Scheduler</PRE><PRE class=alt>       DPC            : DPC Events</PRE><PRE>       INTERRUPT      : Interrupt events</PRE><PRE class=alt>       SYSCALL        : System calls</PRE><PRE>       PRIORITY       : Priority change events</PRE><PRE class=alt>       ALPC           : Advanced Local Procedure Call</PRE><PRE>       PERF_COUNTER   : Process Perf Counters</PRE><PRE class=alt>       DISK_IO        : Disk I/O</PRE><PRE>       DISK_IO_INIT   : Disk I/O Initiation</PRE><PRE class=alt>       FILE_IO        : File system operation end times and results</PRE><PRE>       FILE_IO_INIT   : File system operation (create/open/close/read/write)</PRE><PRE class=alt>       HARD_FAULTS    : Hard Page Faults</PRE><PRE>       FILENAME       : FileName (e.g., FileName create/delete/rundown)</PRE><PRE class=alt>       SPLIT_IO       : Split I/O</PRE><PRE>       REGISTRY       : Registry tracing</PRE><PRE class=alt>       DRIVERS        : Driver events</PRE><PRE>       POWER          : Power management events</PRE><PRE class=alt>       NETWORKTRACE   : Network events (e.g., tcp/udp send/receive)</PRE><PRE>       VIRT_ALLOC     : Virtual allocation reserve and release</PRE><PRE class=alt>       MEMINFO        : Memory List Info</PRE><PRE>       ALL_FAULTS     : All page faults including hard, Copy on write, demand zero faults, etc.</PRE><PRE class=alt>&nbsp;</PRE><PRE>Kernel Groups:</PRE><PRE class=alt>       Base           : PROC_THREAD+LOADER+DISK_IO+HARD_FAULTS+PROFILE+MEMINFO</PRE><PRE>       Diag           : PROC_THREAD+LOADER+DISK_IO+HARD_FAULTS+DPC+INTERRUPT+CSWITCH+PERF_COUNTER+COMPACT_CSWITCH</PRE><PRE class=alt>       DiagEasy       : PROC_THREAD+LOADER+DISK_IO+HARD_FAULTS+DPC+INTERRUPT+CSWITCH+PERF_COUNTER</PRE><PRE>       Latency        : PROC_THREAD+LOADER+DISK_IO+HARD_FAULTS+DPC+INTERRUPT+CSWITCH+PROFILE</PRE><PRE class=alt>       FileIO         : PROC_THREAD+LOADER+DISK_IO+HARD_FAULTS+FILE_IO+FILE_IO_INIT</PRE><PRE>       IOTrace        : PROC_THREAD+LOADER+DISK_IO+HARD_FAULTS+CSWITCH</PRE><PRE class=alt>       ResumeTrace    : PROC_THREAD+LOADER+DISK_IO+HARD_FAULTS+PROFILE+POWER</PRE><PRE>       SysProf        : PROC_THREAD+LOADER+PROFILE</PRE><PRE class=alt>       Network        : PROC_THREAD+LOADER+NETWORKTRACE</PRE></DIV>
<STYLE type=text/css>

.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; }</STYLE>

<P>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).&nbsp; So let’s start up a trace session for “Latency”.&nbsp; </P>
<DIV class=csharpcode><PRE class=alt>C:\xperf&gt;xperf -on Latency</PRE></DIV>
<STYLE type=text/css>

.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; }</STYLE>

<P>Now to create some “load” I'll use WMP to watch the stock footage of a bear in the river.&nbsp; Then I exit WMP and stop the trace:</P>
<DIV class=csharpcode><PRE class=alt>C:\xperf&gt;xperf -stop</PRE><PRE>&nbsp;</PRE><PRE class=alt>C:\xperf&gt;dir \kernel.etl</PRE><PRE> Volume <SPAN class=kwrd>in</SPAN> drive C <SPAN class=kwrd>is</SPAN> Safe</PRE><PRE class=alt> Volume Serial Number <SPAN class=kwrd>is</SPAN> 042D-D2B2</PRE><PRE>&nbsp;</PRE><PRE class=alt> Directory of C:\</PRE><PRE>&nbsp;</PRE><PRE class=alt>10/06/2008  04:52 PM        16,384,000 kernel.etl</PRE><PRE>               1 File(s)     16,384,000 bytes</PRE><PRE class=alt>               0 Dir(s)  57,208,664,064 bytes free</PRE></DIV>
<STYLE type=text/css>

.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; }</STYLE>

<P>By default the kernel logger dumped all 16 MB of output into c:\kernel.etl.&nbsp; Now if we want to see what’s in that file we can load it up with xperfview:</P>
<DIV class=csharpcode><PRE class=alt>C:\xperf&gt;xperfview \kernel.etl</PRE></DIV>
<P><A href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/peterwie/WindowsLiveWriter/MeasuringDPCtime_EA29/image_4.png" original-url="https://blogs.msdn.com/blogfiles/peterwie/WindowsLiveWriter/MeasuringDPCtime_EA29/image_4.png" mce_href="https://blogs.msdn.com/blogfiles/peterwie/WindowsLiveWriter/MeasuringDPCtime_EA29/image_4.png"><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="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/peterwie/WindowsLiveWriter/MeasuringDPCtime_EA29/image_thumb_1.png" original-url="https://blogs.msdn.com/blogfiles/peterwie/WindowsLiveWriter/MeasuringDPCtime_EA29/image_thumb_1.png" width=639 height=484 mce_src="https://blogs.msdn.com/blogfiles/peterwie/WindowsLiveWriter/MeasuringDPCtime_EA29/image_thumb_1.png"></A> </P>
<P>These are two of 15 different graphs that XPerf makes available from the .ETL file.&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.&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).</P>
<P>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.&nbsp; I can select the “CPU Sampling by Process” option from the frame list:</P>
<P><A href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/peterwie/WindowsLiveWriter/MeasuringDPCtime_EA29/image_8.png" original-url="https://blogs.msdn.com/blogfiles/peterwie/WindowsLiveWriter/MeasuringDPCtime_EA29/image_8.png" mce_href="https://blogs.msdn.com/blogfiles/peterwie/WindowsLiveWriter/MeasuringDPCtime_EA29/image_8.png"><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="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/peterwie/WindowsLiveWriter/MeasuringDPCtime_EA29/image_thumb_3.png" original-url="https://blogs.msdn.com/blogfiles/peterwie/WindowsLiveWriter/MeasuringDPCtime_EA29/image_thumb_3.png" width=644 height=232 mce_src="https://blogs.msdn.com/blogfiles/peterwie/WindowsLiveWriter/MeasuringDPCtime_EA29/image_thumb_3.png"></A> </P>
<P>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").&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:</P>
<P><A href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/peterwie/WindowsLiveWriter/MeasuringDPCtime_EA29/image_10.png" original-url="https://blogs.msdn.com/blogfiles/peterwie/WindowsLiveWriter/MeasuringDPCtime_EA29/image_10.png" mce_href="https://blogs.msdn.com/blogfiles/peterwie/WindowsLiveWriter/MeasuringDPCtime_EA29/image_10.png"><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="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/peterwie/WindowsLiveWriter/MeasuringDPCtime_EA29/image_thumb_4.png" original-url="https://blogs.msdn.com/blogfiles/peterwie/WindowsLiveWriter/MeasuringDPCtime_EA29/image_thumb_4.png" width=636 height=484 mce_src="https://blogs.msdn.com/blogfiles/peterwie/WindowsLiveWriter/MeasuringDPCtime_EA29/image_thumb_4.png"></A> </P>
<P mce_keep="true">&nbsp;</P>
<P mce_keep="true">&nbsp;</P>
<P mce_keep="true">&nbsp;</P>
<P mce_keep="true">&nbsp;</P>
<P mce_keep="true">&nbsp;</P>
<P mce_keep="true">&nbsp;</P>
<P mce_keep="true">&nbsp;</P>
<P mce_keep="true">&nbsp;</P>
<P mce_keep="true">&nbsp;</P>
<P mce_keep="true">&nbsp;</P>
<P>We can also overlay the DPC activity on top of the CPU graph if we want.&nbsp; Right click in the CPU Sampling by processor frame and choose “Overlay Graph” then “DPC CPU Usage” and “All” processors:</P>
<P><A href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/peterwie/WindowsLiveWriter/MeasuringDPCtime_EA29/image_12.png" original-url="https://blogs.msdn.com/blogfiles/peterwie/WindowsLiveWriter/MeasuringDPCtime_EA29/image_12.png" mce_href="https://blogs.msdn.com/blogfiles/peterwie/WindowsLiveWriter/MeasuringDPCtime_EA29/image_12.png"><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="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/peterwie/WindowsLiveWriter/MeasuringDPCtime_EA29/image_thumb_5.png" original-url="https://blogs.msdn.com/blogfiles/peterwie/WindowsLiveWriter/MeasuringDPCtime_EA29/image_thumb_5.png" width=644 height=230 mce_src="https://blogs.msdn.com/blogfiles/peterwie/WindowsLiveWriter/MeasuringDPCtime_EA29/image_thumb_5.png"></A> </P>
<P>The red and blue lines are CPU 0 and CPU 1 respectively, with the yellow line still showing normal CPU utilization for WMPLAYER.EXE.</P>
<P>XPerfView also has the ability to show you your data in pivot-table form.&nbsp; Let’s say we want to look at DPC CPU Utilization.&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:</P>
<P><A href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/peterwie/WindowsLiveWriter/MeasuringDPCtime_EA29/image_14.png" original-url="https://blogs.msdn.com/blogfiles/peterwie/WindowsLiveWriter/MeasuringDPCtime_EA29/image_14.png" mce_href="https://blogs.msdn.com/blogfiles/peterwie/WindowsLiveWriter/MeasuringDPCtime_EA29/image_14.png"><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="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/peterwie/WindowsLiveWriter/MeasuringDPCtime_EA29/image_thumb_6.png" original-url="https://blogs.msdn.com/blogfiles/peterwie/WindowsLiveWriter/MeasuringDPCtime_EA29/image_thumb_6.png" width=644 height=362 mce_src="https://blogs.msdn.com/blogfiles/peterwie/WindowsLiveWriter/MeasuringDPCtime_EA29/image_thumb_6.png"></A> </P>
<P mce_keep="true">&nbsp;</P>
<P mce_keep="true">&nbsp;</P>
<P>This is showing us every DPC event in the .ETL file.&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.&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.&nbsp; NDIS stands out with a 2.6 ms DPC.&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.</P>
<P>Let’s say we want to see all the entries grouped not just by module but by the actual DPC routine within that module.&nbsp; The function column shows us the address of the DPC routine that was executed.&nbsp; If we drag that to the right of the yellow line we get a new grouping:</P>
<P><A href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/peterwie/WindowsLiveWriter/MeasuringDPCtime_EA29/image_16.png" original-url="https://blogs.msdn.com/blogfiles/peterwie/WindowsLiveWriter/MeasuringDPCtime_EA29/image_16.png" mce_href="https://blogs.msdn.com/blogfiles/peterwie/WindowsLiveWriter/MeasuringDPCtime_EA29/image_16.png"><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="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/peterwie/WindowsLiveWriter/MeasuringDPCtime_EA29/image_thumb_7.png" original-url="https://blogs.msdn.com/blogfiles/peterwie/WindowsLiveWriter/MeasuringDPCtime_EA29/image_thumb_7.png" width=636 height=484 mce_src="https://blogs.msdn.com/blogfiles/peterwie/WindowsLiveWriter/MeasuringDPCtime_EA29/image_thumb_7.png"></A> </P>
<P>For each module we can see which DPC function is being called the most and which one is taking up so much time.&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.&nbsp; Go back and enable the CPU Utilization by processor frame then get a summary table for that:</P>
<P><A href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/peterwie/WindowsLiveWriter/MeasuringDPCtime_EA29/image_18.png" original-url="https://blogs.msdn.com/blogfiles/peterwie/WindowsLiveWriter/MeasuringDPCtime_EA29/image_18.png" mce_href="https://blogs.msdn.com/blogfiles/peterwie/WindowsLiveWriter/MeasuringDPCtime_EA29/image_18.png"><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="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/peterwie/WindowsLiveWriter/MeasuringDPCtime_EA29/image_thumb_8.png" original-url="https://blogs.msdn.com/blogfiles/peterwie/WindowsLiveWriter/MeasuringDPCtime_EA29/image_thumb_8.png" width=644 height=470 mce_src="https://blogs.msdn.com/blogfiles/peterwie/WindowsLiveWriter/MeasuringDPCtime_EA29/image_thumb_8.png"></A> </P>
<P>This would all be more impressive if symbol loading were working.&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”.&nbsp; However I’ve rarely gotten symbol loading to work, and when it does work it still seems pretty fragile.&nbsp; If you use xperf –help symbols it provides some help on getting symbols working.</P>
<P>There’s one more handy trick that I found while I was trying to get symbols to work.&nbsp; XPerf.exe has some processing options too.&nbsp; XPerf –help processing shows us a list of the options:</P>
<DIV class=csharpcode><PRE class=alt>C:\xperf&gt;xperf -help processing</PRE><PRE>&nbsp;</PRE><PRE class=alt>    Trace Post-Processing options:</PRE><PRE>&nbsp;</PRE><PRE class=alt>        xperf -I &lt;trace file&gt; ... [-o output] [-symbols ...] [-target {human|machine}]</PRE><PRE>                           [-a action ... [-a action ...] ...]</PRE><PRE class=alt>&nbsp;</PRE><PRE>        -I       trace file       The trace file to be processed.</PRE><PRE class=alt>        -o       output file      Optional, the name of the file that output goes to.  If not</PRE><PRE>                                  given, stdout <SPAN class=kwrd>is</SPAN> used.</PRE><PRE class=alt>        -symbols [options]        Enable and configure symbol decoding support.</PRE><PRE> See <SPAN class=str>"xperf</PRE><PRE class=alt>                                  -help symbols"</SPAN> <SPAN class=kwrd>for</SPAN> detailed help</PRE><PRE>        -target  {human|machine}  Select the target audience of the output. Default <SPAN class=kwrd>is</SPAN> human.</PRE><PRE class=alt>        -quiet                    Do not print progress information.</PRE><PRE>        -tle                      Process the trace even <SPAN class=kwrd>in</SPAN> the presence of lost events.</PRE><PRE class=alt>        -tti                      Process the trace even <SPAN class=kwrd>in</SPAN> the presence of time inversions.</PRE><PRE>        -a       action ...       Optional, the actions to take.  Default action <SPAN class=kwrd>is</SPAN> to dump</PRE><PRE class=alt>                                  the <SPAN class=kwrd>event</SPAN> <SPAN class=kwrd>in</SPAN> text form.</PRE><PRE>&nbsp;</PRE><PRE class=alt>    Examples:</PRE><PRE>&nbsp;</PRE><PRE class=alt>        xperf -I trace.etl -o <SPAN class=kwrd>out</SPAN>.csv      : dump the events <SPAN class=kwrd>in</SPAN> trace.etl to file <SPAN class=kwrd>out</SPAN>.csv</PRE><PRE>        xperf -help registry               : print help on action registry</PRE><PRE class=alt>        xperf -I trace.etl -a registry     : print registry access statistics to stdout</PRE><PRE>        xperf -I trace32.etl trace64.etl -o <SPAN class=kwrd>out</SPAN>.csv : dump the events <SPAN class=kwrd>in</SPAN> trace32.etl and trace64.etl to file <SPAN class=kwrd>out</SPAN>.csv</PRE><PRE class=alt>&nbsp;</PRE><PRE>    Available Actions:</PRE><PRE class=alt>&nbsp;</PRE><PRE>        boot             Show boot and shutdown statistics</PRE><PRE class=alt>        bootprefetch     Show boot-time prefetching information</PRE><PRE>        cpudisk          Show CPU/Disk activity report</PRE><PRE class=alt>        cswitch          Show Context Switch data</PRE><PRE>        diskio           Show Disk IO Statistics</PRE><PRE class=alt>        dpcisr           Show DPC/ISR Statistics</PRE><PRE>        drvdelay         Show Driver delays</PRE><PRE class=alt>        dumper           Dump events <SPAN class=kwrd>in</SPAN> the trace <SPAN class=kwrd>in</SPAN> text form</PRE><PRE>        filename         Show File Names <SPAN class=kwrd>in</SPAN> the trace</PRE><PRE class=alt>        focuschange      Show the Windows thread focus change events <SPAN class=kwrd>in</SPAN> the trace</PRE><PRE>        hardfault        Show hard fault statistics by process and file.</PRE><PRE class=alt>        marks            Show Marks Information</PRE><PRE>        pagefault        Show page fault information <SPAN class=kwrd>in</SPAN> the trace</PRE><PRE class=alt>        perfctrs         Show process performance counters.</PRE><PRE>        pnp              Show PnP events <SPAN class=kwrd>in</SPAN> the trace</PRE><PRE class=alt>        prefetch         Show Prefetch Information</PRE><PRE>        process          Show process, thread, image information</PRE><PRE class=alt>        profile          Show Sampled profiler data</PRE><PRE>        readyBoot        Show ReadyBoot statistics</PRE><PRE class=alt>        registry         Show Registry Access Statistics</PRE><PRE>        services         Show service status information</PRE><PRE class=alt>        shutdown         Show shutdown statistics</PRE><PRE>        stack            Show Stack Information</PRE><PRE class=alt>        suspend          Show Suspend Transition Information</PRE><PRE>        sysconfig        Show System Configuration</PRE><PRE class=alt>        tracestats       Show Trace Statistics</PRE><PRE>        winlogon         Show Winlogon events <SPAN class=kwrd>in</SPAN> the trace</PRE><PRE class=alt>&nbsp;</PRE><PRE>    xperf -help &lt;action&gt; [&lt;action&gt; ...] <SPAN class=kwrd>for</SPAN> detailed help</PRE><PRE class=alt>&nbsp;</PRE><PRE>    If no action <SPAN class=kwrd>is</SPAN> present, dumper will be invoked.</PRE></DIV>
<STYLE type=text/css>

.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; }</STYLE>

<P mce_keep="true">&nbsp;</P>
<P>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:</P>
<DIV class=csharpcode><PRE class=alt>C:\xperf&gt;xperf -I \kernel.etl -symbols verbose -a dpcisr</PRE><PRE>xperf: Using symbol path: srv*c:\DownstreamStore*http:<SPAN class=rem>//msdl.microsoft.com/download/symbols</SPAN></PRE><PRE class=alt>xperf: Using executable path: srv*c:\DownstreamStore*http:<SPAN class=rem>//msdl.microsoft.com/download/symbols</SPAN></PRE><PRE>xperf: Using SymCache path: c:\DownstreamStore</PRE><PRE class=alt>&nbsp;</PRE><PRE>--------------------------</PRE><PRE class=alt>DPC Info</PRE><PRE>&nbsp;</PRE><PRE class=alt>--------------------------</PRE><PRE>CPU Usage Summing By Module For the Whole Trace</PRE><PRE class=alt>&nbsp;</PRE><PRE>CPU Usage from 0 us to 24682000 us:</PRE><PRE class=alt>&nbsp;</PRE><PRE>     CPU 0 Usage      CPU 1 Usage</PRE><PRE class=alt>     usec      %      usec      % Module</PRE><PRE>      248   0.00         0   0.00 CLASSPNP.SYS</PRE><PRE class=alt>       31   0.00         0   0.00 HTTP.sys</PRE><PRE>      562   0.00         0   0.00 NETIO.SYS</PRE><PRE class=alt>       17   0.00         0   0.00 Ntfs.sys</PRE><PRE>     5121   0.02         0   0.00 USBPORT.SYS</PRE><PRE class=alt>      273   0.00         0   0.00 afd.sys</PRE><PRE>    16752   0.07       135   0.00 ataport.SYS</PRE><PRE class=alt>      101   0.00        36   0.00 b57nd60x.sys</PRE><PRE>        1   0.00         0   0.00 fltmgr.sys</PRE><PRE class=alt>        5   0.00         0   0.00 hal.dll</PRE><PRE>     3851   0.02         0   0.00 i8042prt.sys</PRE><PRE class=alt>       14   0.00         0   0.00 luafv.sys</PRE><PRE>   981815   3.98         0   0.00 ndis.sys</PRE><PRE class=alt>      239   0.00         0   0.00 netbt.sys</PRE><PRE>     2364   0.01       227   0.00 ntkrnlpa.exe</PRE><PRE class=alt>    37360   0.15         0   0.00 portcls.sys</PRE><PRE>      119   0.00       103   0.00 rassstp.sys</PRE><PRE class=alt>      317   0.00         0   0.00 rdbss.sys</PRE><PRE>       27   0.00        17   0.00 srv.sys</PRE><PRE class=alt>        4   0.00         0   0.00 srvnet.sys</PRE><PRE>    62926   0.25     49358   0.20 tcpip.sys</PRE><PRE class=alt>     5054   0.02         0   0.00 usbhub.sys</PRE><PRE>        6   0.00         0   0.00 watchdog.sys</PRE><PRE class=alt>&nbsp;</PRE><PRE>Total = 43599</PRE><PRE class=alt>Elapsed Time, &gt;        0 usecs AND &lt;=        1 usecs,     49, or   0.11%</PRE><PRE>Elapsed Time, &gt;        1 usecs AND &lt;=        2 usecs,    379, or   0.87%</PRE><PRE class=alt>Elapsed Time, &gt;        2 usecs AND &lt;=        4 usecs,  10388, or  23.83%</PRE><PRE>Elapsed Time, &gt;        4 usecs AND &lt;=        8 usecs,   9765, or  22.40%</PRE><PRE class=alt>Elapsed Time, &gt;        8 usecs AND &lt;=       16 usecs,   7806, or  17.90%</PRE><PRE>Elapsed Time, &gt;       16 usecs AND &lt;=       32 usecs,   3885, or   8.91%</PRE><PRE class=alt>Elapsed Time, &gt;       32 usecs AND &lt;=       64 usecs,   5375, or  12.33%</PRE><PRE>Elapsed Time, &gt;       64 usecs AND &lt;=      128 usecs,   5175, or  11.87%</PRE><PRE class=alt>Elapsed Time, &gt;      128 usecs AND &lt;=      256 usecs,    639, or   1.47%</PRE><PRE>Elapsed Time, &gt;      256 usecs AND &lt;=      512 usecs,     55, or   0.13%</PRE><PRE class=alt>Elapsed Time, &gt;      512 usecs AND &lt;=     1024 usecs,     55, or   0.13%</PRE><PRE>Elapsed Time, &gt;     1024 usecs AND &lt;=     2048 usecs,     22, or   0.05%</PRE><PRE class=alt>Elapsed Time, &gt;     2048 usecs AND &lt;=     4096 usecs,      6, or   0.01%</PRE><PRE>Total,                                                 43599</PRE><PRE class=alt>&nbsp;</PRE><PRE>Total = 10 <SPAN class=kwrd>for</SPAN> module CLASSPNP.SYS</PRE><PRE class=alt>Elapsed Time, &gt;        0 usecs AND &lt;=        1 usecs,      2, or  20.00%</PRE><PRE>Elapsed Time, &gt;        1 usecs AND &lt;=        2 usecs,      3, or  30.00%</PRE><PRE class=alt>Elapsed Time, &gt;        2 usecs AND &lt;=        4 usecs,      0, or   0.00%</PRE><PRE>Elapsed Time, &gt;        4 usecs AND &lt;=        8 usecs,      0, or   0.00%</PRE><PRE class=alt>Elapsed Time, &gt;        8 usecs AND &lt;=       16 usecs,      0, or   0.00%</PRE><PRE>Elapsed Time, &gt;       16 usecs AND &lt;=       32 usecs,      0, or   0.00%</PRE><PRE class=alt>Elapsed Time, &gt;       32 usecs AND &lt;=       64 usecs,      5, or  50.00%</PRE><PRE>Total,                                                    10</PRE><PRE class=alt>&nbsp;</PRE><PRE>Total = 8 <SPAN class=kwrd>for</SPAN> module HTTP.sys</PRE><PRE class=alt>Elapsed Time, &gt;        0 usecs AND &lt;=        1 usecs,      0, or   0.00%</PRE><PRE>Elapsed Time, &gt;        1 usecs AND &lt;=        2 usecs,      1, or  12.50%</PRE><PRE class=alt>Elapsed Time, &gt;        2 usecs AND &lt;=        4 usecs,      3, or  37.50%</PRE><PRE>Elapsed Time, &gt;        4 usecs AND &lt;=        8 usecs,      4, or  50.00%</PRE><PRE class=alt>Total,                                                     8</PRE><PRE>&nbsp;</PRE><PRE class=alt>Total = 124 <SPAN class=kwrd>for</SPAN> module NETIO.SYS</PRE><PRE>Elapsed Time, &gt;        0 usecs AND &lt;=        1 usecs,      0, or   0.00%</PRE><PRE class=alt>Elapsed Time, &gt;        1 usecs AND &lt;=        2 usecs,      0, or   0.00%</PRE><PRE>Elapsed Time, &gt;        2 usecs AND &lt;=        4 usecs,     57, or  45.97%</PRE><PRE class=alt>Elapsed Time, &gt;        4 usecs AND &lt;=        8 usecs,     61, or  49.19%</PRE><PRE>Elapsed Time, &gt;        8 usecs AND &lt;=       16 usecs,      5, or   4.03%</PRE><PRE class=alt>Elapsed Time, &gt;       16 usecs AND &lt;=       32 usecs,      1, or   0.81%</PRE><PRE>Total,                                                   124</PRE><PRE class=alt>&nbsp;</PRE><PRE>Total = 5 <SPAN class=kwrd>for</SPAN> module Ntfs.sys</PRE><PRE class=alt>Elapsed Time, &gt;        0 usecs AND &lt;=        1 usecs,      0, or   0.00%</PRE><PRE>Elapsed Time, &gt;        1 usecs AND &lt;=        2 usecs,      0, or   0.00%</PRE><PRE class=alt>Elapsed Time, &gt;        2 usecs AND &lt;=        4 usecs,      4, or  80.00%</PRE><PRE>Elapsed Time, &gt;        4 usecs AND &lt;=        8 usecs,      1, or  20.00%</PRE><PRE class=alt>Total,                                                     5</PRE><PRE>&nbsp;</PRE><PRE class=alt>Total = 481 <SPAN class=kwrd>for</SPAN> module USBPORT.SYS</PRE><PRE>Elapsed Time, &gt;        0 usecs AND &lt;=        1 usecs,      0, or   0.00%</PRE><PRE class=alt>Elapsed Time, &gt;        1 usecs AND &lt;=        2 usecs,      0, or   0.00%</PRE><PRE>Elapsed Time, &gt;        2 usecs AND &lt;=        4 usecs,     81, or  16.84%</PRE><PRE class=alt>Elapsed Time, &gt;        4 usecs AND &lt;=        8 usecs,     64, or  13.31%</PRE><PRE>Elapsed Time, &gt;        8 usecs AND &lt;=       16 usecs,    257, or  53.43%</PRE><PRE class=alt>Elapsed Time, &gt;       16 usecs AND &lt;=       32 usecs,     76, or  15.80%</PRE><PRE>Elapsed Time, &gt;       32 usecs AND &lt;=       64 usecs,      3, or   0.62%</PRE><PRE class=alt>Total,                                                   481</PRE><PRE>&nbsp;</PRE><PRE class=alt>Total = 44 <SPAN class=kwrd>for</SPAN> module afd.sys</PRE><PRE>Elapsed Time, &gt;        0 usecs AND &lt;=        1 usecs,      0, or   0.00%</PRE><PRE class=alt>Elapsed Time, &gt;        1 usecs AND &lt;=        2 usecs,      1, or   2.27%</PRE><PRE>Elapsed Time, &gt;        2 usecs AND &lt;=        4 usecs,      3, or   6.82%</PRE><PRE class=alt>Elapsed Time, &gt;        4 usecs AND &lt;=        8 usecs,     30, or  68.18%</PRE><PRE>Elapsed Time, &gt;        8 usecs AND &lt;=       16 usecs,      9, or  20.45%</PRE><PRE class=alt>Elapsed Time, &gt;       16 usecs AND &lt;=       32 usecs,      1, or   2.27%</PRE><PRE>Total,                                                    44</PRE><PRE class=alt>&nbsp;</PRE><PRE>Total = 736 <SPAN class=kwrd>for</SPAN> module ataport.SYS</PRE><PRE class=alt>Elapsed Time, &gt;        0 usecs AND &lt;=        1 usecs,      0, or   0.00%</PRE><PRE>Elapsed Time, &gt;        1 usecs AND &lt;=        2 usecs,      0, or   0.00%</PRE><PRE class=alt>Elapsed Time, &gt;        2 usecs AND &lt;=        4 usecs,     15, or   2.04%</PRE><PRE>Elapsed Time, &gt;        4 usecs AND &lt;=        8 usecs,     28, or   3.80%</PRE><PRE class=alt>Elapsed Time, &gt;        8 usecs AND &lt;=       16 usecs,    207, or  28.13%</PRE><PRE>Elapsed Time, &gt;       16 usecs AND &lt;=       32 usecs,    335, or  45.52%</PRE><PRE class=alt>Elapsed Time, &gt;       32 usecs AND &lt;=       64 usecs,    139, or  18.89%</PRE><PRE>Elapsed Time, &gt;       64 usecs AND &lt;=      128 usecs,     12, or   1.63%</PRE><PRE class=alt>Total,                                                   736</PRE><PRE>&nbsp;</PRE><PRE class=alt>Total = 50 <SPAN class=kwrd>for</SPAN> module b57nd60x.sys</PRE><PRE>Elapsed Time, &gt;        0 usecs AND &lt;=        1 usecs,      0, or   0.00%</PRE><PRE class=alt>Elapsed Time, &gt;        1 usecs AND &lt;=        2 usecs,     23, or  46.00%</PRE><PRE>Elapsed Time, &gt;        2 usecs AND &lt;=        4 usecs,     19, or  38.00%</PRE><PRE class=alt>Elapsed Time, &gt;        4 usecs AND &lt;=        8 usecs,      6, or  12.00%</PRE><PRE>Elapsed Time, &gt;        8 usecs AND &lt;=       16 usecs,      1, or   2.00%</PRE><PRE class=alt>Elapsed Time, &gt;       16 usecs AND &lt;=       32 usecs,      1, or   2.00%</PRE><PRE>Total,                                                    50</PRE><PRE class=alt>&nbsp;</PRE><PRE>Total = 1 <SPAN class=kwrd>for</SPAN> module fltmgr.sys</PRE><PRE class=alt>Elapsed Time, &gt;        0 usecs AND &lt;=        1 usecs,      0, or   0.00%</PRE><PRE>Elapsed Time, &gt;        1 usecs AND &lt;=        2 usecs,      1, or 100.00%</PRE><PRE class=alt>Total,                                                     1</PRE><PRE>&nbsp;</PRE><PRE class=alt>Total = 1 <SPAN class=kwrd>for</SPAN> module hal.dll</PRE><PRE>Elapsed Time, &gt;        0 usecs AND &lt;=        1 usecs,      0, or   0.00%</PRE><PRE class=alt>Elapsed Time, &gt;        1 usecs AND &lt;=        2 usecs,      0, or   0.00%</PRE><PRE>Elapsed Time, &gt;        2 usecs AND &lt;=        4 usecs,      0, or   0.00%</PRE><PRE class=alt>Elapsed Time, &gt;        4 usecs AND &lt;=        8 usecs,      1, or 100.00%</PRE><PRE>Total,                                                     1</PRE><PRE class=alt>&nbsp;</PRE><PRE>Total = 329 <SPAN class=kwrd>for</SPAN> module i8042prt.sys</PRE><PRE class=alt>Elapsed Time, &gt;        0 usecs AND &lt;=        1 usecs,      0, or   0.00%</PRE><PRE>Elapsed Time, &gt;        1 usecs AND &lt;=        2 usecs,      0, or   0.00%</PRE><PRE class=alt>Elapsed Time, &gt;        2 usecs AND &lt;=        4 usecs,      0, or   0.00%</PRE><PRE>Elapsed Time, &gt;        4 usecs AND &lt;=        8 usecs,      9, or   2.74%</PRE><PRE class=alt>Elapsed Time, &gt;        8 usecs AND &lt;=       16 usecs,    298, or  90.58%</PRE><PRE>Elapsed Time, &gt;       16 usecs AND &lt;=       32 usecs,     22, or   6.69%</PRE><PRE class=alt>Total,                                                   329</PRE><PRE>&nbsp;</PRE><PRE class=alt>Total = 5 <SPAN class=kwrd>for</SPAN> module luafv.sys</PRE><PRE>Elapsed Time, &gt;        0 usecs AND &lt;=        1 usecs,      0, or   0.00%</PRE><PRE class=alt>Elapsed Time, &gt;        1 usecs AND &lt;=        2 usecs,      1, or  20.00%</PRE><PRE>Elapsed Time, &gt;        2 usecs AND &lt;=        4 usecs,      3, or  60.00%</PRE><PRE class=alt>Elapsed Time, &gt;        4 usecs AND &lt;=        8 usecs,      1, or  20.00%</PRE><PRE>Total,                                                     5</PRE><PRE class=alt>&nbsp;</PRE><PRE>Total = 32833 <SPAN class=kwrd>for</SPAN> module ndis.sys</PRE><PRE class=alt>Elapsed Time, &gt;        0 usecs AND &lt;=        1 usecs,      0, or   0.00%</PRE><PRE>Elapsed Time, &gt;        1 usecs AND &lt;=        2 usecs,    178, or   0.54%</PRE><PRE class=alt>Elapsed Time, &gt;        2 usecs AND &lt;=        4 usecs,   9073, or  27.63%</PRE><PRE>Elapsed Time, &gt;        4 usecs AND &lt;=        8 usecs,   7653, or  23.31%</PRE><PRE class=alt>Elapsed Time, &gt;        8 usecs AND &lt;=       16 usecs,   4082, or  12.43%</PRE><PRE>Elapsed Time, &gt;       16 usecs AND &lt;=       32 usecs,   1930, or   5.88%</PRE><PRE class=alt>Elapsed Time, &gt;       32 usecs AND &lt;=       64 usecs,   4425, or  13.48%</PRE><PRE>Elapsed Time, &gt;       64 usecs AND &lt;=      128 usecs,   4727, or  14.40%</PRE><PRE class=alt>Elapsed Time, &gt;      128 usecs AND &lt;=      256 usecs,    627, or   1.91%</PRE><PRE>Elapsed Time, &gt;      256 usecs AND &lt;=      512 usecs,     55, or   0.17%</PRE><PRE class=alt>Elapsed Time, &gt;      512 usecs AND &lt;=     1024 usecs,     55, or   0.17%</PRE><PRE>Elapsed Time, &gt;     1024 usecs AND &lt;=     2048 usecs,     22, or   0.07%</PRE><PRE class=alt>Elapsed Time, &gt;     2048 usecs AND &lt;=     4096 usecs,      6, or   0.02%</PRE><PRE>Total,                                                 32833</PRE><PRE class=alt>&nbsp;</PRE><PRE>Total = 10 <SPAN class=kwrd>for</SPAN> module netbt.sys</PRE><PRE class=alt>Elapsed Time, &gt;        0 usecs AND &lt;=        1 usecs,      0, or   0.00%</PRE><PRE>Elapsed Time, &gt;        1 usecs AND &lt;=        2 usecs,      0, or   0.00%</PRE><PRE class=alt>Elapsed Time, &gt;        2 usecs AND &lt;=        4 usecs,      0, or   0.00%</PRE><PRE>Elapsed Time, &gt;        4 usecs AND &lt;=        8 usecs,      0, or   0.00%</PRE><PRE class=alt>Elapsed Time, &gt;        8 usecs AND &lt;=       16 usecs,      0, or   0.00%</PRE><PRE>Elapsed Time, &gt;       16 usecs AND &lt;=       32 usecs,     10, or 100.00%</PRE><PRE class=alt>Total,                                                    10</PRE><PRE>&nbsp;</PRE><PRE class=alt>Total = 597 <SPAN class=kwrd>for</SPAN> module ntkrnlpa.exe</PRE><PRE>Elapsed Time, &gt;        0 usecs AND &lt;=        1 usecs,     43, or   7.20%</PRE><PRE class=alt>Elapsed Time, &gt;        1 usecs AND &lt;=        2 usecs,    129, or  21.61%</PRE><PRE>Elapsed Time, &gt;        2 usecs AND &lt;=        4 usecs,    344, or  57.62%</PRE><PRE class=alt>Elapsed Time, &gt;        4 usecs AND &lt;=        8 usecs,     50, or   8.38%</PRE><PRE>Elapsed Time, &gt;        8 usecs AND &lt;=       16 usecs,      4, or   0.67%</PRE><PRE class=alt>Elapsed Time, &gt;       16 usecs AND &lt;=       32 usecs,      3, or   0.50%</PRE><PRE>Elapsed Time, &gt;       32 usecs AND &lt;=       64 usecs,     23, or   3.85%</PRE><PRE class=alt>Elapsed Time, &gt;       64 usecs AND &lt;=      128 usecs,      1, or   0.17%</PRE><PRE>Total,                                                   597</PRE><PRE class=alt>&nbsp;</PRE><PRE>Total = 2087 <SPAN class=kwrd>for</SPAN> module portcls.sys</PRE><PRE class=alt>Elapsed Time, &gt;        0 usecs AND &lt;=        1 usecs,      0, or   0.00%</PRE><PRE>Elapsed Time, &gt;        1 usecs AND &lt;=        2 usecs,      0, or   0.00%</PRE><PRE class=alt>Elapsed Time, &gt;        2 usecs AND &lt;=        4 usecs,      1, or   0.05%</PRE><PRE>Elapsed Time, &gt;        4 usecs AND &lt;=        8 usecs,    216, or  10.35%</PRE><PRE class=alt>Elapsed Time, &gt;        8 usecs AND &lt;=       16 usecs,    675, or  32.34%</PRE><PRE>Elapsed Time, &gt;       16 usecs AND &lt;=       32 usecs,   1076, or  51.56%</PRE><PRE class=alt>Elapsed Time, &gt;       32 usecs AND &lt;=       64 usecs,    119, or   5.70%</PRE><PRE>Total,                                                  2087</PRE><PRE class=alt>&nbsp;</PRE><PRE>Total = 100 <SPAN class=kwrd>for</SPAN> module rassstp.sys</PRE><PRE class=alt>Elapsed Time, &gt;        0 usecs AND &lt;=        1 usecs,      0, or   0.00%</PRE><PRE>Elapsed Time, &gt;        1 usecs AND &lt;=        2 usecs,     37, or  37.00%</PRE><PRE class=alt>Elapsed Time, &gt;        2 usecs AND &lt;=        4 usecs,     62, or  62.00%</PRE><PRE>Elapsed Time, &gt;        4 usecs AND &lt;=        8 usecs,      1, or   1.00%</PRE><PRE class=alt>Total,                                                   100</PRE><PRE>&nbsp;</PRE><PRE class=alt>Total = 99 <SPAN class=kwrd>for</SPAN> module rdbss.sys</PRE><PRE>Elapsed Time, &gt;        0 usecs AND &lt;=        1 usecs,      0, or   0.00%</PRE><PRE class=alt>Elapsed Time, &gt;        1 usecs AND &lt;=        2 usecs,      0, or   0.00%</PRE><PRE>Elapsed Time, &gt;        2 usecs AND &lt;=        4 usecs,     87, or  87.88%</PRE><PRE class=alt>Elapsed Time, &gt;        4 usecs AND &lt;=        8 usecs,      8, or   8.08%</PRE><PRE>Elapsed Time, &gt;        8 usecs AND &lt;=       16 usecs,      4, or   4.04%</PRE><PRE class=alt>Total,                                                    99</PRE><PRE>&nbsp;</PRE><PRE class=alt>Total = 13 <SPAN class=kwrd>for</SPAN> module srv.sys</PRE><PRE>Elapsed Time, &gt;        0 usecs AND &lt;=        1 usecs,      0, or   0.00%</PRE><PRE class=alt>Elapsed Time, &gt;        1 usecs AND &lt;=        2 usecs,      1, or   7.69%</PRE><PRE>Elapsed Time, &gt;        2 usecs AND &lt;=        4 usecs,      8, or  61.54%</PRE><PRE class=alt>Elapsed Time, &gt;        4 usecs AND &lt;=        8 usecs,      4, or  30.77%</PRE><PRE>Total,                                                    13</PRE><PRE class=alt>&nbsp;</PRE><PRE>Total = 2 <SPAN class=kwrd>for</SPAN> module srvnet.sys</PRE><PRE class=alt>Elapsed Time, &gt;        0 usecs AND &lt;=        1 usecs,      0, or   0.00%</PRE><PRE>Elapsed Time, &gt;        1 usecs AND &lt;=        2 usecs,      1, or  50.00%</PRE><PRE class=alt>Elapsed Time, &gt;        2 usecs AND &lt;=        4 usecs,      1, or  50.00%</PRE><PRE>Total,                                                     2</PRE><PRE class=alt>&nbsp;</PRE><PRE>Total = 4998 <SPAN class=kwrd>for</SPAN> module tcpip.sys</PRE><PRE class=alt>Elapsed Time, &gt;        0 usecs AND &lt;=        1 usecs,      1, or   0.02%</PRE><PRE>Elapsed Time, &gt;        1 usecs AND &lt;=        2 usecs,      0, or   0.00%</PRE><PRE class=alt>Elapsed Time, &gt;        2 usecs AND &lt;=        4 usecs,     48, or   0.96%</PRE><PRE>Elapsed Time, &gt;        4 usecs AND &lt;=        8 usecs,   1242, or  24.85%</PRE><PRE class=alt>Elapsed Time, &gt;        8 usecs AND &lt;=       16 usecs,   2179, or  43.60%</PRE><PRE>Elapsed Time, &gt;       16 usecs AND &lt;=       32 usecs,    421, or   8.42%</PRE><PRE class=alt>Elapsed Time, &gt;       32 usecs AND &lt;=       64 usecs,    660, or  13.21%</PRE><PRE>Elapsed Time, &gt;       64 usecs AND &lt;=      128 usecs,    435, or   8.70%</PRE><PRE class=alt>Elapsed Time, &gt;      128 usecs AND &lt;=      256 usecs,     12, or   0.24%</PRE><PRE>Total,                                                  4998</PRE><PRE class=alt>&nbsp;</PRE><PRE>Total = 1060 <SPAN class=kwrd>for</SPAN> module usbhub.sys</PRE><PRE class=alt>Elapsed Time, &gt;        0 usecs AND &lt;=        1 usecs,      0, or   0.00%</PRE><PRE>Elapsed Time, &gt;        1 usecs AND &lt;=        2 usecs,      0, or   0.00%</PRE><PRE class=alt>Elapsed Time, &gt;        2 usecs AND &lt;=        4 usecs,    579, or  54.62%</PRE><PRE>Elapsed Time, &gt;        4 usecs AND &lt;=        8 usecs,    386, or  36.42%</PRE><PRE class=alt>Elapsed Time, &gt;        8 usecs AND &lt;=       16 usecs,     85, or   8.02%</PRE><PRE>Elapsed Time, &gt;       16 usecs AND &lt;=       32 usecs,      9, or   0.85%</PRE><PRE class=alt>Elapsed Time, &gt;       32 usecs AND &lt;=       64 usecs,      1, or   0.09%</PRE><PRE>Total,                                                  1060</PRE><PRE class=alt>&nbsp;</PRE><PRE>Total = 6 <SPAN class=kwrd>for</SPAN> module watchdog.sys</PRE><PRE class=alt>Elapsed Time, &gt;        0 usecs AND &lt;=        1 usecs,      3, or  50.00%</PRE><PRE>Elapsed Time, &gt;        1 usecs AND &lt;=        2 usecs,      3, or  50.00%</PRE><PRE class=alt>Total,                                                     6</PRE><PRE>&nbsp;</PRE><PRE class=alt>All Module =  43599,  Total = 43599,   EQUAL</PRE><PRE>&nbsp;</PRE><PRE class=alt>--------------------------</PRE><PRE>Usage From 0 ms to 24682 ms, Summing In 1 second intervals. Intervals=25</PRE><PRE class=alt>&nbsp;</PRE><PRE>                             CPU 0 Usage       CPU 1 Usage</PRE><PRE class=alt>Start (ms) End (ms)        (usec)      %     (usec)      %</PRE><PRE>         0-1000      :     33992,   3.40       897,   0.09</PRE><PRE class=alt>      1000-2000      :     24437,   2.44      1332,   0.13</PRE><PRE>      2000-3000      :     42317,   4.23      4510,   0.45</PRE><PRE class=alt>      3000-4000      :     40179,   4.02      1757,   0.18</PRE><PRE>      4000-5000      :     34190,   3.42       988,   0.10</PRE><PRE class=alt>      5000-6000      :     19434,   1.94      2066,   0.21</PRE><PRE>      6000-7000      :     25339,   2.53      2618,   0.26</PRE><PRE class=alt>      7000-8000      :     46758,   4.68      1691,   0.17</PRE><PRE>      8000-9000      :     81696,   8.17      1998,   0.20</PRE><PRE class=alt>      9000-10000     :     77932,   7.79      1500,   0.15</PRE><PRE>     10000-11000     :     64336,   6.43      1684,   0.17</PRE><PRE class=alt>     11000-12000     :     45099,   4.51      2311,   0.23</PRE><PRE>     12000-13000     :     59469,   5.95      1890,   0.19</PRE><PRE class=alt>     13000-14000     :     44035,   4.40      2393,   0.24</PRE><PRE>     14000-15000     :     50393,   5.04      2455,   0.25</PRE><PRE class=alt>     15000-16000     :     71508,   7.15      1694,   0.17</PRE><PRE>     16000-17000     :     56853,   5.69      2054,   0.21</PRE><PRE class=alt>     17000-18000     :     63219,   6.32      4046,   0.40</PRE><PRE>     18000-19000     :     62428,   6.24      4742,   0.47</PRE><PRE class=alt>     19000-20000     :     33793,   3.38      1134,   0.11</PRE><PRE>     20000-21000     :     28147,   2.81       759,   0.08</PRE><PRE class=alt>     21000-22000     :     30630,   3.06       640,   0.06</PRE><PRE>     22000-23000     :     33294,   3.33       710,   0.07</PRE><PRE class=alt>     23000-24000     :     26121,   2.61      1819,   0.18</PRE><PRE>     24000-24682     :     21608,   3.17      2177,   0.32</PRE><PRE class=alt>&nbsp;</PRE><PRE>--------------------------</PRE><PRE class=alt>Interrupt Info</PRE><PRE>&nbsp;</PRE><PRE class=alt>--------------------------</PRE><PRE>CPU Usage Summing By Module For the Whole Trace</PRE><PRE class=alt>&nbsp;</PRE><PRE>CPU Usage from 0 us to 24682000 us:</PRE><PRE class=alt>&nbsp;</PRE><PRE>     CPU 0 Usage      CPU 1 Usage</PRE><PRE class=alt>     usec      %      usec      % Module</PRE><PRE>    10420   0.04         0   0.00 USBPORT.SYS</PRE><PRE class=alt>    46437   0.19         0   0.00 VIDEOPRT.SYS</PRE><PRE>      125   0.00         0   0.00 acpi.sys</PRE><PRE class=alt>     7657   0.03         0   0.00 ataport.SYS</PRE><PRE>     8722   0.04         0   0.00 i8042prt.sys</PRE><PRE class=alt>    72940   0.30         0   0.00 ndis.sys</PRE><PRE>    13633   0.06         0   0.00 portcls.sys</PRE><PRE class=alt>&nbsp;</PRE><PRE>Total = 48319</PRE><PRE class=alt>Elapsed Time, &gt;        0 usecs AND &lt;=        1 usecs,      0, or   0.00%</PRE><PRE>Elapsed Time, &gt;        1 usecs AND &lt;=        2 usecs,  12026, or  24.89%</PRE><PRE class=alt>Elapsed Time, &gt;        2 usecs AND &lt;=        4 usecs,  24954, or  51.64%</PRE><PRE>Elapsed Time, &gt;        4 usecs AND &lt;=        8 usecs,   9693, or  20.06%</PRE><PRE class=alt>Elapsed Time, &gt;        8 usecs AND &lt;=       16 usecs,   1611, or   3.33%</PRE><PRE>Elapsed Time, &gt;       16 usecs AND &lt;=       32 usecs,     29, or   0.06%</PRE><PRE class=alt>Elapsed Time, &gt;       32 usecs AND &lt;=       64 usecs,      6, or   0.01%</PRE><PRE>Total,                                                 48319</PRE><PRE class=alt>&nbsp;</PRE><PRE>Total = 2256 <SPAN class=kwrd>for</SPAN> module USBPORT.SYS</PRE><PRE class=alt>Elapsed Time, &gt;        0 usecs AND &lt;=        1 usecs,      0, or   0.00%</PRE><PRE>Elapsed Time, &gt;        1 usecs AND &lt;=        2 usecs,      0, or   0.00%</PRE><PRE class=alt>Elapsed Time, &gt;        2 usecs AND &lt;=        4 usecs,    602, or  26.68%</PRE><PRE>Elapsed Time, &gt;        4 usecs AND &lt;=        8 usecs,   1556, or  68.97%</PRE><PRE class=alt>Elapsed Time, &gt;        8 usecs AND &lt;=       16 usecs,     97, or   4.30%</PRE><PRE>Elapsed Time, &gt;       16 usecs AND &lt;=       32 usecs,      0, or   0.00%</PRE><PRE class=alt>Elapsed Time, &gt;       32 usecs AND &lt;=       64 usecs,      1, or   0.04%</PRE><PRE>Total,                                                  2256</PRE><PRE class=alt>&nbsp;</PRE><PRE>Total = 20976 <SPAN class=kwrd>for</SPAN> module VIDEOPRT.SYS</PRE><PRE class=alt>Elapsed Time, &gt;        0 usecs AND &lt;=        1 usecs,      0, or   0.00%</PRE><PRE>Elapsed Time, &gt;        1 usecs AND &lt;=        2 usecs,  12026, or  57.33%</PRE><PRE class=alt>Elapsed Time, &gt;        2 usecs AND &lt;=        4 usecs,   7821, or  37.29%</PRE><PRE>Elapsed Time, &gt;        4 usecs AND &lt;=        8 usecs,   1081, or   5.15%</PRE><PRE class=alt>Elapsed Time, &gt;        8 usecs AND &lt;=       16 usecs,     43, or   0.20%</PRE><PRE>Elapsed Time, &gt;       16 usecs AND &lt;=       32 usecs,      1, or   0.00%</PRE><PRE class=alt>Elapsed Time, &gt;       32 usecs AND &lt;=       64 usecs,      4, or   0.02%</PRE><PRE>Total,                                                 20976</PRE><PRE class=alt>&nbsp;</PRE><PRE>Total = 11 <SPAN class=kwrd>for</SPAN> module acpi.sys</PRE><PRE class=alt>Elapsed Time, &gt;        0 usecs AND &lt;=        1 usecs,      0, or   0.00%</PRE><PRE>Elapsed Time, &gt;        1 usecs AND &lt;=        2 usecs,      0, or   0.00%</PRE><PRE class=alt>Elapsed Time, &gt;        2 usecs AND &lt;=        4 usecs,      0, or   0.00%</PRE><PRE>Elapsed Time, &gt;        4 usecs AND &lt;=        8 usecs,      0, or   0.00%</PRE><PRE class=alt>Elapsed Time, &gt;        8 usecs AND &lt;=       16 usecs,     11, or 100.00%</PRE><PRE>Total,                                                    11</PRE><PRE class=alt>&nbsp;</PRE><PRE>Total = 811 <SPAN class=kwrd>for</SPAN> module ataport.SYS</PRE><PRE class=alt>Elapsed Time, &gt;        0 usecs AND &lt;=        1 usecs,      0, or   0.00%</PRE><PRE>Elapsed Time, &gt;        1 usecs AND &lt;=        2 usecs,      0, or   0.00%</PRE><PRE class=alt>Elapsed Time, &gt;        2 usecs AND &lt;=        4 usecs,      0, or   0.00%</PRE><PRE>Elapsed Time, &gt;        4 usecs AND &lt;=        8 usecs,    225, or  27.74%</PRE><PRE class=alt>Elapsed Time, &gt;        8 usecs AND &lt;=       16 usecs,    574, or  70.78%</PRE><PRE>Elapsed Time, &gt;       16 usecs AND &lt;=       32 usecs,     12, or   1.48%</PRE><PRE class=alt>Total,                                                   811</PRE><PRE>&nbsp;</PRE><PRE class=alt>Total = 1178 <SPAN class=kwrd>for</SPAN> module i8042prt.sys</PRE><PRE>Elapsed Time, &gt;        0 usecs AND &lt;=        1 usecs,      0, or   0.00%</PRE><PRE class=alt>Elapsed Time, &gt;        1 usecs AND &lt;=        2 usecs,      0, or   0.00%</PRE><PRE>Elapsed Time, &gt;        2 usecs AND &lt;=        4 usecs,      0, or   0.00%</PRE><PRE class=alt>Elapsed Time, &gt;        4 usecs AND &lt;=        8 usecs,    905, or  76.83%</PRE><PRE>Elapsed Time, &gt;        8 usecs AND &lt;=       16 usecs,    260, or  22.07%</PRE><PRE class=alt>Elapsed Time, &gt;       16 usecs AND &lt;=       32 usecs,     12, or   1.02%</PRE><PRE>Elapsed Time, &gt;       32 usecs AND &lt;=       64 usecs,      1, or   0.08%</PRE><PRE class=alt>Total,                                                  1178</PRE><PRE>&nbsp;</PRE><PRE class=alt>Total = 20976 <SPAN class=kwrd>for</SPAN> module ndis.sys</PRE><PRE>Elapsed Time, &gt;        0 usecs AND &lt;=        1 usecs,      0, or   0.00%</PRE><PRE class=alt>Elapsed Time, &gt;        1 usecs AND &lt;=        2 usecs,      0, or   0.00%</PRE><PRE>Elapsed Time, &gt;        2 usecs AND &lt;=        4 usecs,  16181, or  77.14%</PRE><PRE class=alt>Elapsed Time, &gt;        4 usecs AND &lt;=        8 usecs,   4713, or  22.47%</PRE><PRE>Elapsed Time, &gt;        8 usecs AND &lt;=       16 usecs,     81, or   0.39%</PRE><PRE class=alt>Elapsed Time, &gt;       16 usecs AND &lt;=       32 usecs,      1, or   0.00%</PRE><PRE>Total,                                                 20976</PRE><PRE class=alt>&nbsp;</PRE><PRE>Total = 2111 <SPAN class=kwrd>for</SPAN> module portcls.sys</PRE><PRE class=alt>Elapsed Time, &gt;        0 usecs AND &lt;=        1 usecs,      0, or   0.00%</PRE><PRE>Elapsed Time, &gt;        1 usecs AND &lt;=        2 usecs,      0, or   0.00%</PRE><PRE class=alt>Elapsed Time, &gt;        2 usecs AND &lt;=        4 usecs,    350, or  16.58%</PRE><PRE>Elapsed Time, &gt;        4 usecs AND &lt;=        8 usecs,   1213, or  57.46%</PRE><PRE class=alt>Elapsed Time, &gt;        8 usecs AND &lt;=       16 usecs,    545, or  25.82%</PRE><PRE>Elapsed Time, &gt;       16 usecs AND &lt;=       32 usecs,      3, or   0.14%</PRE><PRE class=alt>Total,                                                  2111</PRE><PRE>&nbsp;</PRE><PRE class=alt>All Module =  48319,  Total = 48319,   EQUAL</PRE><PRE>&nbsp;</PRE><PRE class=alt>--------------------------</PRE><PRE>Usage From 0 ms to 24682 ms, Summing In 1 second intervals. Intervals=25</PRE><PRE class=alt>&nbsp;</PRE><PRE>                             CPU 0 Usage       CPU 1 Usage</PRE><PRE class=alt>Start (ms) End (ms)        (usec)      %     (usec)      %</PRE><PRE>         0-1000      :      5820,   0.58         0,   0.00</PRE><PRE class=alt>      1000-2000      :      3686,   0.37         0,   0.00</PRE><PRE>      2000-3000      :      6472,   0.65         0,   0.00</PRE><PRE class=alt>      3000-4000      :      5410,   0.54         0,   0.00</PRE><PRE>      4000-5000      :      4638,   0.46         0,   0.00</PRE><PRE class=alt>      5000-6000      :      2420,   0.24         0,   0.00</PRE><PRE>      6000-7000      :      2793,   0.28         0,   0.00</PRE><PRE class=alt>      7000-8000      :      5988,   0.60         0,   0.00</PRE><PRE>      8000-9000      :     12071,   1.21         0,   0.00</PRE><PRE class=alt>      9000-10000     :     12461,   1.25         0,   0.00</PRE><PRE>     10000-11000     :      9816,   0.98         0,   0.00</PRE><PRE class=alt>     11000-12000     :      8206,   0.82         0,   0.00</PRE><PRE>     12000-13000     :      8926,   0.89         0,   0.00</PRE><PRE class=alt>     13000-14000     :      6189,   0.62         0,   0.00</PRE><PRE>     14000-15000     :      7649,   0.76         0,   0.00</PRE><PRE class=alt>     15000-16000     :      9613,   0.96         0,   0.00</PRE><PRE>     16000-17000     :      8431,   0.84         0,   0.00</PRE><PRE class=alt>     17000-18000     :      7618,   0.76         0,   0.00</PRE><PRE>     18000-19000     :      7212,   0.72         0,   0.00</PRE><PRE class=alt>     19000-20000     :      4813,   0.48         0,   0.00</PRE><PRE>     20000-21000     :      3925,   0.39         0,   0.00</PRE><PRE class=alt>     21000-22000     :      4557,   0.46         0,   0.00</PRE><PRE>     22000-23000     :      5169,   0.52         0,   0.00</PRE><PRE class=alt>     23000-24000     :      3489,   0.35         0,   0.00</PRE><PRE>     24000-24682     :      2552,   0.37         0,   0.00</PRE><PRE class=alt>&nbsp;</PRE><PRE>&nbsp;</PRE><PRE class=alt>Distribution of number of 2000 ms intervals w.r.t. DPC/ISR usage:</PRE><PRE>&nbsp;</PRE><PRE class=alt>                                      CPU 0                      CPU 1</PRE><PRE> DPC/ISR Usage %      DPC      ISR Combined      DPC      ISR Combined</PRE><PRE class=alt>&gt;=  0 AND &lt;=   1        0       12        0       13       13       13</PRE><PRE>&gt;   1 AND &lt;=   5        8        1        7        0        0        0</PRE><PRE class=alt>&gt;   5 AND &lt;=  10        5        0        6        0        0        0</PRE><PRE>&gt;  10 AND &lt;=  20        0        0        0        0        0        0</PRE><PRE class=alt>&gt;  20 AND &lt;=  40        0        0        0        0        0        0</PRE><PRE>&gt;  40 AND &lt;=  60        0        0        0        0        0        0</PRE><PRE class=alt>&gt;  60 AND &lt;=  80        0        0        0        0        0        0</PRE><PRE>&gt;  80 AND &lt;= 100        0        0        0        0        0        0</PRE><PRE class=alt>---</PRE><PRE>Total:                 13       13       13       13       13       13</PRE></DIV>
<STYLE type=text/css>

.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; }</STYLE>

<P>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.</P>
<P>I like XPerf a lot and it’s something we plan to use in WDF to collect data around specific performance scenarios.&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.</P>
<P>I just wish I could get the symbols working <IMG alt=Smile src="https://messenger.msn.com/MMM2006-04-19_17.00/Resource/emoticons/regular_smile.gif" mce_src="https://messenger.msn.com/MMM2006-04-19_17.00/Resource/emoticons/regular_smile.gif">.</P>]]></content:encoded>
    </item>
    <item>
      <title>Beta version of Windows Live Writer is available</title>
      <link>https://docs.microsoft.com/archive/blogs/peterwie/beta-version-of-windows-live-writer-is-available</link>
      <pubDate>Thu, 02 Oct 2008 19:49:07 GMT</pubDate>
      <dc:creator><![CDATA[PeterWieland]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/peterwie/2008/10/02/beta-version-of-windows-live-writer-is-available/</guid>
      <description><![CDATA[There’s a new beta of WLW available.&#160; I used the previous version for the few posts that I did...]]></description>
      <content:encoded><![CDATA[<p>There’s a new <a href="https://download.live.com/writer">beta of WLW</a> available.&#160; I used the previous version for the few posts that I did make and it was very useful.</p>  <p>The easiest way to try this version out is to post something, so here’s a picture of what my mornings are like these days (at least i think this was morning <img alt="Smile" src="https://messenger.msn.com/MMM2006-04-19_17.00/Resource/emoticons/regular_smile.gif" />)</p>  <p><a title="Finnian Eats Breakfast" href="https://www.flickr.com/photos/55906189@N00/2882803304/"><img title="Finnian Eats Breakfast" alt="Finnian Eats Breakfast" src="https://static.flickr.com/3224/2882803304_cf5fcd5c25.jpg" align="middle" border="0" /></a></p>]]></content:encoded>
    </item>
    <item>
      <title>Code</title>
      <link>https://docs.microsoft.com/archive/blogs/peterwie/code</link>
      <pubDate>Tue, 05 Feb 2008 17:33:03 GMT</pubDate>
      <dc:creator><![CDATA[PeterWieland]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/peterwie/2008/02/05/code/</guid>
      <description><![CDATA[Perhaps I'm just out of ideas, but I've decided to write about my coding style.  Coding style is...]]></description>
      <content:encoded><![CDATA[<p><font size="+0">Perhaps I'm just out of ideas, but I've decided to write about my <a href="https://blogs.msdn.com/peterwie/archive/tags/Code/default.aspx">coding style</a>.</font></p>  <p><font size="+0">Coding style is usually a very personal thing, like any writing style.&#160; And as it usually causes some to foam at the mouth when brought up, I also wanted to put out this little disclaimer before I start.&#160; </font></p>  <p><font size="+0">You may agree with how I've chosen to do things, you may disagree, you may not care in the least.&#160; Please just take this as writing by someone who has been writing code a while and who likes to think about the process of writing code and building software.</font></p>  <p><font size="+0">At the least this can help my blog live up to its name :)</font></p>]]></content:encoded>
    </item>
    <item>
      <title>Pedantic Coder : Where do braces go?</title>
      <link>https://docs.microsoft.com/archive/blogs/peterwie/pedantic-coder-where-do-braces-go</link>
      <pubDate>Mon, 04 Feb 2008 18:25:15 GMT</pubDate>
      <dc:creator><![CDATA[PeterWieland]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/peterwie/2008/02/04/pedantic-coder-where-do-braces-go/</guid>
      <description><![CDATA[I've become rather pedantic about my coding style over the years.&#160; I've worked in a number of...]]></description>
      <content:encoded><![CDATA[<p></p>  <p>I've become rather pedantic about my coding style over the years.&#160; I've worked in a number of people's code, and have always felt most comfortable in the core NT code because of the consistency of formatting, naming, etc...&#160; This is a coding style that we often call &quot;Cutler Normal Form&quot; in deference to Dave Cutler.</p>  <p>Despite this I recently made a change in the way I place my braces around blocks of code.&#160; CNF says that braces go at the end of the line that will execute the code block, as follows:</p>  <blockquote>   <pre class="csharpcode"><span class="kwrd">if</span> (foo) {
    <span class="kwrd">do</span> something;
} <span class="kwrd">else</span> {
    <span class="kwrd">do</span> something <span class="kwrd">else</span>;
}</pre>
</blockquote>

<p>I used to really like this style.&#160; It made it clear to me when the statement being evaluated was continued into the next block.&#160; Of course I always use braces, even when I only want one statement in the if or else clause, so this was a quick way to look and be sure i'd set things up correctly.</p>

<p>I've now transitioned over to:</p>

<blockquote>
  <pre class="csharpcode"><span class="kwrd">if</span> (foo) 
{
    <span class="kwrd">do</span> something;
} 
<span class="kwrd">else</span>
{
    <span class="kwrd">do</span> something <span class="kwrd">else</span>;
}</pre>
</blockquote>
<style type="text/css">







.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; }</style>

<p>This was the preferred style of the folks in the UMDF group when I joined the project.&#160; It took me a while to warm up to this.&#160; However i eventually found two things that i like about it.</p>

<p>First it leaves more open white space.&#160; In my &quot;old age&quot; (i.e. mid thirties) i find that i like more whitespace in my code.&#160; It improves the readability for me, and makes me work harder to keep my functions fitting on a single page - which is a good threshold for whether they're understandable or not.</p>

<p>The second is that it makes it much, much easier to put part of the block under an IFDEF.&#160; This to me was the winner.&#160; Now i can do:</p>

<blockquote>
  <pre class="csharpcode"><span class="preproc">#if</span> bar
<span class="kwrd">if</span> (foo)
{
    <span class="kwrd">do</span> something specific to bar;
}
<span class="kwrd">else</span>
<span class="preproc">#endif</span>
{
    <span class="kwrd">do</span> something else;
}</pre>
</blockquote>
<style type="text/css">







.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; }</style><style type="text/css">







.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; }</style>

<p>Rather than:</p>

<blockquote>
  <pre class="csharpcode"><span class="preproc">#if</span> bar
<span class="kwrd">if</span> (foo) {
    <span class="kwrd">do</span> something specific to bar;
} <span class="kwrd">else</span> <span class="rem">// note that there would otherwise be a { here</span>
<span class="preproc">#endif</span>
{
    <span class="kwrd">do</span> something <span class="kwrd">else</span>;
}</pre>
</blockquote>
<style type="text/css">







.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; }</style>

<p>Or even worse:</p>

<blockquote>
  <pre class="csharpcode"><span class="preproc">#if</span> bar
<span class="kwrd">if</span> (foo) {
    <span class="kwrd">do</span> something specific to bar;
} <span class="kwrd">else</span> {
<span class="preproc">#else</span>
{
<span class="preproc">#endif</span>
    <span class="kwrd">do</span> something <span class="kwrd">else</span>;
}</pre>
</blockquote>
<style type="text/css">







.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; }</style>

<p>Perhaps it's a silly thing to change something as fundamental(ist) as brace formatting style to get around a little inconsistency in how you preprocess out part of a conditional.&#160; But i like consistency ... the hairs on the back of my neck go up when i see code that's not in my normal format.&#160; So in the end this made me more comfortable.</p>

<p>This has come up quite a bit for me when debugging something or refactoring something.&#160; When refactoring i'll frequently #if out a chunk of impacted non-critical functionality (usually replaced with a failure case) until i'm ready to deal with that chunk of code.&#160; For debugging it can be useful to do the same thing if you're trying to track down the cause of a crash and are at your witts end.</p>

<p>And I've come to find it prettier.</p>

<p>-p</p>]]></content:encoded>
    </item>
    <item>
      <title>So many ways to send SCSI requests to a driver</title>
      <link>https://docs.microsoft.com/archive/blogs/peterwie/so-many-ways-to-send-scsi-requests-to-a-driver</link>
      <pubDate>Fri, 25 Jan 2008 19:26:59 GMT</pubDate>
      <dc:creator><![CDATA[PeterWieland]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/peterwie/2008/01/25/so-many-ways-to-send-scsi-requests-to-a-driver/</guid>
      <description><![CDATA[(Please excuse the recycled bits.&#160; The 7-month-old is still absorbing most of my blogging time...]]></description>
      <content:encoded><![CDATA[<p>(Please excuse the recycled bits.&#160; The 7-month-old is still absorbing most of my blogging time (along with sleeping time, dating time, playing time, cleaning time, working time, etc...))</p>  <p>A question came up on the ntdev mailing list about why there are &quot;so many&quot; ways to send an I/O request to a SCSI driver.</p>  <p>In matter of fact there are two - IRP_MJ_SCSI and IOCTL_SCSI_PASS_THROUGH (and it's direct mapped variant).</p>  <p>IRP_MJ_SCSI == IRP_MJ_INTERNAL_DEVICE_CONTROL. This is easily determined by looking at the headers. No SCSI shouldn't have its own IRP MJ code, and no it shouldn't reuse a number from an existing one. But it's been that way since I joined MS (and I tried to change it once ... not possible without breaking everyone doing storage) and so we all just have to live with it. Someone decided we needed a MJ code for SCSI requests. I suspect IRP_MJ_INTERNAL_DEVICE_CONTROL was reused to avoid the cost of an additional PVOID per driver object (which at the time would have been an issue).</p>  <p>IOCTL_SCSI_EXECUTE_* is set in the stack location for an IRP_MJ_SCSI to (a) allow someone handling IRP_MJ_INTERNAL_DEVICE_CONTROL to differentiate between the two and (b) to provide some indicator of which direction the SRB is transferring data. Its use isn't particularly consistent ... I think of it as more of a debugging aid but I see that some of our drivers (like the RAMDISK driver) use it to decide if the SRB in question is a read/write type command or one of those strange SCSI commands like REQUEST_SENSE which require more complex emulation. I think using the CDB code would have been a much better idea.</p>  <p>IRP_MJ_SCSI comes with an SRB.</p>  <p>IOCTL_SCSI_PASS_THROUGH and IOCTL_SCSI_PASS_THROUGH_DIRECT are to send SCSI requests from user-mode. They come with SCSI_PASS_THROUGH/SCSI_PASS_THROUGH_DIRECT structures so as not to expose SRB to user-mode and so as to avoid validating SRBs which might come from user-mode (besides, how is a user mode component going to provide a value like OriginalIrp). </p>  <p>IOCTL_SCSI_PASS_THROUGH is a buffered operation, while IOCTL_SCSI_PASS_THROUGH_DIRECT direct maps the data transfer. They're separate control codes because they are - I suppose a flag in the PASS_THROUGH structure could have contained the transfer mode ... would that make you happier?</p>  <p>So there are two ways to send a SCSI request. One for kernel-mode components (IRP_MJ_SCSI) and one for user-mode components (IOCTL_SCSI_PASS_THROUGH[_DIRECT]). If you want to convert a pass-through command to a IRP_MJ_SCSI command it's pretty straight-forward to make an SRB and send it down.</p>  <p>-p</p>]]></content:encoded>
    </item>
    <item>
      <title>WDK available in other languages</title>
      <link>https://docs.microsoft.com/archive/blogs/peterwie/wdk-available-in-other-languages</link>
      <pubDate>Mon, 24 Sep 2007 14:22:13 GMT</pubDate>
      <dc:creator><![CDATA[PeterWieland]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/peterwie/2007/09/24/wdk-available-in-other-languages/</guid>
      <description><![CDATA[This is pretty cool, though my high-school french isn't sufficient to appreciate it...]]></description>
      <content:encoded><![CDATA[<p>This is pretty cool, though my high-school french isn't sufficient to appreciate it completely.&#xA0; The WDK content on MSDN has been translated into multiple languages.&#xA0; </p>  <p>It's a machine translation and to make up for the inconsistencies they do side-by-side english &amp; other language.&#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.</p>  <p>The language options are:</p>  <p></p>  <p>&#xB7; <a href="https://mtbeta.msdn.microsoft.com/pt-br/library/default.aspx">Brazilian Portuguese (pt-br)</a></p>  <p>&#xB7; <a href="https://mtbeta.msdn.microsoft.com/fr-fr/library/default.aspx">French (fr-fr)</a></p>  <p>&#xB7; <a href="https://mtbeta.msdn.microsoft.com/ja-jp/library/default.aspx">Japanese (ja-jp)</a></p>  <p>&#xB7; <a href="https://mtbeta.msdn.microsoft.com/zh-cn/library/default.aspx">S. Chinese (zh-cn)</a></p>  <p>&#xB7; <a href="https://mtbeta.msdn.microsoft.com/es-es/library/default.aspx">Spanish (es-es)</a></p>  <p>&#xB7; <a href="https://mtbeta.msdn.microsoft.com/zh-tw/library/default.aspx">T. Chinese (zh-tw)</a></p>  <p>Enjoy</p>  <p>-p</p>]]></content:encoded>
    </item>
    <item>
      <title>Where is Peter</title>
      <link>https://docs.microsoft.com/archive/blogs/peterwie/where-is-peter</link>
      <pubDate>Thu, 20 Sep 2007 16:20:14 GMT</pubDate>
      <dc:creator><![CDATA[PeterWieland]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/peterwie/2007/09/20/where-is-peter/</guid>
      <description><![CDATA[It's been ages since I posted to my blog and I'm sorry about that.&#xA0; I recently became a dad and...]]></description>
      <content:encoded><![CDATA[<p>It's been ages since I posted to my blog and I'm sorry about that.&#xA0; I recently became a dad and it turns up that absorbs a lot of the free time I used to spend on my blog.</p>  <p>I'm hoping to get back into things ... so don't remove me from your OPML files yet.</p>  <p>-p</p>]]></content:encoded>
    </item>
  </channel>
</rss>