Xperf WDF_DPC and WDF_INTERRUPT flags is not displaying the drivers ISR names

0

Hi,

I am trying to measure interrupt/DPC duration in my WDF driver using WPA. I am setting the flags WDF_INTERRUPT and WDF_DPC so that the actual ISR names appear instead of the names of KMDF functions. I am using the flags in the manner mentioned below.

xperf.exe -on Diag+INTERRUPT+DPC+MEMINFO+0x48000000+FILENAME+FILE_IO+FILE_IO_INIT+DISPATCHER+INTERRUPT_STEER+PRIORITY+CPU_CONFIG+IDLE_STATES+POWER+KQUEUE+CLOCKINT+IPI+TIMER+DRIVERS+PROFILE -buffersize 1024 -minbuffers 32 -maxbuffers 32 -clocktype PerfCounter -buffering -stackwalk @Stackwalk.txt

stackwalk.txt file contains the below.

ThreadCreate ProcessCreate
CSWITCH+PROFILE

After configuring kernal symbols on the system, i am seeing the WDF function names in the .ETL File like
FxTimer::_FxTImerDpcThunk
FxDpc::FxDpcThunk etc…

However i am unable to see the real names of ISR in my driver. Actually i am unable to see even the name of my driver. All the .ETL file shows is “wdf01000.sys”. Under this module, the above functions are seen.

I am using WDK 7600.16385.1 to build the driver. The KMDF framewok version i am using is 1.11.

Appreicate any help on this.

>All the .ETL file shows is “wdf01000.sys”. Under this module, the above

functions are seen.

It’s a pity that we cannot identify routines or even drivers responsible for
executing ISRs and DPCs if they execute under the hood of the framework.

Because this is your own driver, I suggest adding a simple
KeQueryPerformanceCounter at the begin and end of your routines and a
DbgPrint to disable the results. Note that you cannot use string format
specifiers at elevated IRQL however. If you don’t run a checked build of
your driver consider putting them in a buffer that you pick up from
usermode, don’t use the debugger to inspect the values because the timings
will be way off.

//Daniel

Sorry, “disable” was meant to be “display”. The results may also be
influenced if driver verifier is enabled.

//Daniel

The version of wpa that ships with the 8.1 kits will decode to the underlying driver function , and not the wrapper function, on an windows 8.1 trace

d

Bent from my phone


From: xxxxx@resplendence.commailto:xxxxx
Sent: ?11/?28/?2014 6:27 AM
To: Windows System Software Devs Interest Listmailto:xxxxx
Subject: Re:[ntdev] Xperf WDF_DPC and WDF_INTERRUPT flags is not displaying the drivers ISR names

>All the .ETL file shows is “wdf01000.sys”. Under this module, the above
>functions are seen.

It’s a pity that we cannot identify routines or even drivers responsible for
executing ISRs and DPCs if they execute under the hood of the framework.

Because this is your own driver, I suggest adding a simple
KeQueryPerformanceCounter at the begin and end of your routines and a
DbgPrint to disable the results. Note that you cannot use string format
specifiers at elevated IRQL however. If you don?t run a checked build of
your driver consider putting them in a buffer that you pick up from
usermode, don’t use the debugger to inspect the values because the timings
will be way off.

//Daniel


NTDEV is sponsored by OSR

Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev

OSR is HIRING!! See http://www.osr.com/careers

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer</mailto:xxxxx></mailto:xxxxx>

Doron,

You mean i need to run xperf utility that ships with DDK 8.1 and open the trace using WPA that shipped with DDK 8.1?

Also the same flags that i mentioned above will work with DDK 8.1 ? Or any changes are required?

Do i have to to be runnning WINdows 8.1 OS also for this to work?

Sorry for spamming…But in my system WDK 8.1 is installed …But i dont see a folder “Windows performance tool kit”… I see it in WDK 8.0 folder though…

From where can i download the xperf and WPA for WDK 8.1?

Install the win8.1 desktop sdk (the kit which installs wpa). You need to capture the trace on an 8.1 machine, there are changes to the framework itself to enable showing the driver callback functions in addition to changes to wpa itself. Since the framework on 8.1 does not install down level you are bound to 8.1,

d

Bent from my phone


From: xxxxx@gmail.commailto:xxxxx
Sent: ?11/?28/?2014 8:20 AM
To: Windows System Software Devs Interest Listmailto:xxxxx
Subject: RE:[ntdev] Xperf WDF_DPC and WDF_INTERRUPT flags is not displaying the drivers ISR names

Sorry for spamming…But in my system WDK 8.1 is installed …But i dont see a folder “Windows performance tool kit”… I see it in WDK 8.0 folder though…

From where can i download the xperf and WPA for WDK 8.1?


NTDEV is sponsored by OSR

Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev

OSR is HIRING!! See http://www.osr.com/careers

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer</mailto:xxxxx></mailto:xxxxx>

Thanks for that…

Looks like I need to install Windows 8.1 OS on my test machine…

I am currently running Windows 7 embedded standard on my test machine. Is there an embedded version in Windows 8.1 as well???

Just need some clarity…Is this issue related to Windows OS version? Or the KMDF framework version?

if it is related to framework version then can i install the latest KMDF framework version (1.13 i believe) on WIndows 7 Embedded machine and try capturing the traces with win8.1 desktop sdk ?

Please confirm just this. My future course of action depends on this.
On Nov 28, 2014 10:10 PM, wrote:

> Just need some clarity…Is this issue related to Windows OS version? Or
> the KMDF framework version?
>
> if it is related to framework version then can i install the latest KMDF
> framework version (1.13 i believe) on WIndows 7 Embedded machine and try
> capturing the traces with win8.1 desktop sdk ?
>
> —
> NTDEV is sponsored by OSR
>
> Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev
>
> OSR is HIRING!! See http://www.osr.com/careers
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>

The version of wdf that ships with 8.1 is only available on 8.1, it doesn’t go downlevel. As for an embedded std version of 8.1, I have no idea, but have never of one

d

Bent from my phone


From: jayanth sharmamailto:xxxxx
Sent: ?11/?28/?2014 8:59 AM
To: Windows System Software Devs Interest Listmailto:xxxxx
Subject: RE:[ntdev] Xperf WDF_DPC and WDF_INTERRUPT flags is not displaying the drivers ISR names

Please confirm just this. My future course of action depends on this.

On Nov 28, 2014 10:10 PM, > wrote:
Just need some clarity…Is this issue related to Windows OS version? Or the KMDF framework version?

if it is related to framework version then can i install the latest KMDF framework version (1.13 i believe) on WIndows 7 Embedded machine and try capturing the traces with win8.1 desktop sdk ?


NTDEV is sponsored by OSR

Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev

OSR is HIRING!! See http://www.osr.com/careers

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
— NTDEV is sponsored by OSR Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev OSR is HIRING!! See http://www.osr.com/careers For our schedule of WDF, WDM, debugging and other seminars visit: http://www.osr.com/seminars To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer</mailto:xxxxx></mailto:xxxxx>

Thank you.

On Saturday, November 29, 2014, Doron Holan
wrote:

> The version of wdf that ships with 8.1 is only available on 8.1, it
> doesn’t go downlevel. As for an embedded std version of 8.1, I have no
> idea, but have never of one
>
> d
>
> Bent from my phone
> ------------------------------
> From: jayanth sharma
> <javascript:_e>
> Sent: ‎11/‎28/‎2014 8:59 AM
> To: Windows System Software Devs Interest List
> <javascript:_e>
> Subject: RE:[ntdev] Xperf WDF_DPC and WDF_INTERRUPT flags is not
> displaying the drivers ISR names
>
> Please confirm just this. My future course of action depends on this.
> On Nov 28, 2014 10:10 PM, > <javascript:_e>> wrote:
>
>> Just need some clarity…Is this issue related to Windows OS version? Or
>> the KMDF framework version?
>>
>> if it is related to framework version then can i install the latest KMDF
>> framework version (1.13 i believe) on WIndows 7 Embedded machine and try
>> capturing the traces with win8.1 desktop sdk ?
>>
>> —
>> NTDEV is sponsored by OSR
>>
>> Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev
>>
>> OSR is HIRING!! See http://www.osr.com/careers
>>
>> For our schedule of WDF, WDM, debugging and other seminars visit:
>> http://www.osr.com/seminars
>>
>> To unsubscribe, visit the List Server section of OSR Online at
>> http://www.osronline.com/page.cfm?name=ListServer
>>
> — NTDEV is sponsored by OSR Visit the list at:
> http://www.osronline.com/showlists.cfm?list=ntdev OSR is HIRING!! See
> http://www.osr.com/careers For our schedule of WDF, WDM, debugging and
> other seminars visit: http://www.osr.com/seminars To unsubscribe, visit
> the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
> —
> NTDEV is sponsored by OSR
>
> Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev
>
> OSR is HIRING!! See http://www.osr.com/careers
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>


J.S.R.Sarma.
9916109893.</javascript:_e></javascript:_e></javascript:_e>

> Because this is your own driver, I suggest adding a simple

KeQueryPerformanceCounter at the begin and end of your routines

Can’t ETW be used this way?


Maxim S. Shatskih
Microsoft MVP on File System And Storage
xxxxx@storagecraft.com
http://www.storagecraft.com