Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results

Before Posting...
Please check out the Community Guidelines in the Announcements and Administration Category.

More Info on Driver Writing and Debugging


The free OSR Learning Library has more than 50 articles on a wide variety of topics about writing and debugging device drivers and Minifilters. From introductory level to advanced. All the articles have been recently reviewed and updated, and are written using the clear and definitive style you've come to expect from OSR over the years.


Check out The OSR Learning Library at: https://www.osr.com/osr-learning-library/


Improving the execution time of extension commands while debugging kernel?

Richard_MRichard_M Member Posts: 22
edited October 25 in WINDBG

I tried switching to KDNet from COM but didn't help much, commands like !drvobj take too long. the horrible speed only happens when using extension commands, so for example !drvobj mydriver takes 50 times the time it takes to execute dt nt!_DRIVER_OBJECT mydriver

how can i make these type of commands execute the fastest? will switching to USB or something else help much? any trick to make it as fast as possible? I also tried VMware and VirtualBox, didn't make much difference.

Comments

  • Tim_RobertsTim_Roberts Member - All Emails Posts: 13,695

    Network debugging is faster than 1394 debugging is faster than USB debugging is faster than COM debugging. In most cases, it doesn't matter, because any given version only supported a subset of that list.

    It is what it is. You don't execute those commands very often, so there is no gain in optimizing them. When you think about what the debugger is doing for you, it's practically a miracle as it is. Go worry about your code.

    Tim Roberts, [email protected]
    Providenza & Boekelheide, Inc.

  • Richard_MRichard_M Member Posts: 22

    @Tim_Roberts said:
    Network debugging is faster than 1394 debugging is faster than USB debugging is faster than COM debugging. In most cases, it doesn't matter, because any given version only supported a subset of that list.

    It is what it is. You don't execute those commands very often, so there is no gain in optimizing them. When you think about what the debugger is doing for you, it's practically a miracle as it is. Go worry about your code.

    honestly I think there could be some improvement in some of these extension commands, for example commands like !drvobj MyDriver are sometimes 10-20 times slower than their like equivalent dt nt!_DRIVER_OBJECT MyDriver, i know !drvobj does some other stuff as well like parsing the result and such, but the difference is a lot sometimes. and some of the commands like !devstack even take 3-4 minutes to finish in some cases! i mean i can do what the !devstack is doing myself, the problem is i have to execute 5-6 commands to do so instead of one, i guess i can write a script myself to do it without using the extension command, but why are they so slow?

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Upcoming OSR Seminars
OSR has suspended in-person seminars due to the Covid-19 outbreak. But, don't miss your training! Attend via the internet instead!
Writing WDF Drivers 7 Dec 2020 LIVE ONLINE
Internals & Software Drivers 25 Jan 2021 LIVE ONLINE
Developing Minifilters 8 March 2021 LIVE ONLINE