Hi,
Does anyone have a pointer to a good tool that can be used to profile
NDIS drivers? I am looking for a tool that can be used to determine the
total CPU consumed by a given driver. Would be nice if the tool can
breakdown the cycle consumption per driver function. Thanks in advance.
Regards
vedvyas
Please search the archives before posting. Searching for “driver profiling” in NTDEV resulted in the following link, among many others, that answers your question:
http://www.osronline.com/showThread.cfm?link=30732
Please search the archives before posting. Please search the archives before posting. Please search the archives before posting.
Peter
OSR
Thanks for the link, I havent used kernrate(prof?) but my understanding is
that VTune fails to profile your driver well if your driver does blocking
IO. Besides, its no good for call graphs as that feature is user mode only.
( again correct me if I m wrong, I would be overjoyed to be proven wrong
here, would save me a lot of trouble in writing my own profiler). VTunes’
useful if you re trying to catch cpu intensive operations, loops etc. In
fact I dont know if its a bug in Vtune or maybe I was using Vtune 5.0 which
is old, but VTunes given wrong results in the past.
I ve done this successfully before in user mode need to implement it in
kernel mode in my spare cycles. Use the /GH /Gh flags of cl.exe ( aka
penter, pexit ). These naked methods get invoked as prologue, epilogues to
every function that is compiled with them and you can place your rdtsc
instructions in them. Bottomline, you can generate your own call graph.
Purists will argue that rdtscing before and after a method is not accurate
as it does not account for thread level preemption but it surely gives you
an idea of bottlenecks over multiple iterations.( i m guessing you re after
bottlenecks not accurate cycle numbers)
banks
wrote in message news:xxxxx@ntdev…
> Please search the archives before posting. Searching for “driver
> profiling” in NTDEV resulted in the following link, among many others,
> that answers your question:
>
> http://www.osronline.com/showThread.cfm?link=30732
>
> Please search the archives before posting. Please search the archives
> before posting. Please search the archives before posting.
>
> Peter
> OSR
>
>
>
>
Intel’s VTune.
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com
----- Original Message -----
From: “Shanbhogue, Vedvyas”
To: “Windows System Software Devs Interest List”
Sent: Monday, April 03, 2006 1:24 PM
Subject: [ntdev] Profiling driver code
Hi,
Does anyone have a pointer to a good tool that can be used to profile
NDIS drivers? I am looking for a tool that can be used to determine the
total CPU consumed by a given driver. Would be nice if the tool can
breakdown the cycle consumption per driver function. Thanks in advance.
Regards
vedvyas
—
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer