Kernrate is another profiler that can be downloaded from microsoft.com.
Just google for it. The URL is too ugly to include here.
/George V. Reilly xxxxx@microsoft.com
This posting is provided "AS IS" with no warranties, and confers no
rights.
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Prokash Sinha
Sent: Tuesday, October 12, 2004 8:37 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Losing Received Data?
Really sorry to step into this thread, as Mats and Joseph pointed out
lots of ways to tackle this ...
As they pointed out, one easy way is to profile the drivers, using
VTune, numega code coverage (True Coverage ) etc ...
There are two situation ( either your driver is on the path of execution
for some scenairo or not ). Determining that is important !. If, by any
chance, you can not
comeup with some scenarios where your driver is totally inactive in the
execution path(s) ( often happens for some filter drivers - as an
example a file system filter driver for file activities ) then very
likely you will find that your driver might have quite a bit of kernel
mode waits for various reasons ...
Recently I was trying to find the performance effects of various virus
scanners ( often implemented as file system filters ). Found that lot of
the time CPU is carrying 50 to 60 % load, but some out liers (ie one in
a while spike for near 100% ). When trapped thru getting usr time and
kernel time, we see there are lot of kernel mode waits ...
Just in case if it gives you any more pointers !!!
-pro
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Alasdair Tompson
(external)
Sent: Tuesday, October 12, 2004 8:08 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Losing Received Data?
Hi Mats and Joseph,
Thanks for your suggestions.
I'm still looking at this. The serial port in question is
actually on a PCMCIA 4-port card and it looks as though the driver for
THAT is causing all the load. However, when changing to a different make
of card whose driver does NOT result in so much load I still have the
same problem! I am now trying to get a free version of the driver to run
(I can't load it at the moment) so I'll get back to you when I've sorted
that out.
Thanks again
Alasdair
-----Original Message-----
> From: Joseph Galbraith [mailto:xxxxx@vandyke.com]
> Sent: 12 October 2004 16:02
> To: Windows System Software Devs Interest List
> Subject: Re: [ntdev] Losing Received Data?
>
>
> I would probably do the same here; try breaking in a
> couple times.
>
> I might also try the !process 0 0x17 to dump all the
> processes and tread stacks on the system. This may take
> a while.
>
> Then look for one of the threads hanging out in your filter.
>
> Is it a single CPU or an SMP machine? If you are 60% on a
> dual processor SMP machine, my experience is that you've
> might have managed to go into a tight loop on one processor.
> If this is the case, it should be pretty easy to spot.
>
> There are probably some other WinDBG commands I'm
> not familiar with that would help you find a completion
> routine running in an DPC context (which probably
> won't show up in !process??? I'm not sure on that one.)
>
> Also, it seems like I recall windows being pretty
> chatty with the serial ports, especially during
> startup (looking for modems, mice, etc.) So even
> though you think the serial port is idle, it may
> not really be (completely) idle.
>
> - Joseph
>
> Mats PETERSSON wrote:
> > You could always use VTune (or some other performance
> profiling tool)
> > to figure out what takes time in your driver (or someone
elses
> > driver).
> >
> > Debug output that doesn't actually print anything (if you
> use levels
> > for
> > instance) will still take a fair amount of time, simply
> because of argument
> > passing and calling the debut output function.
> >
> > But to achieve something like 60% CPU performance on a
reasonably
> > modern processor, you need to actually do quite a lot. Why
> not break
> > into the system a few times and see where it's at. (Press
> CTRL-Break
> > and check the stack to see what's going on). You should
> have a hit in
> > whatever it is that takes a lot of time every other time.
This is
> > called "poor mans profiling", and it actually works much
> better than
> > you'd think.
> >
> > --
> > Mats
> >
> > xxxxx@lists.osr.com wrote on 10/12/2004
08:55:25 AM:
> >
> >
> >>Hi again,
> >>
> >>I noticed that when the driver was running under the
debugger the
> >>system load was very high, the red part of the graph
> indicating kernel
> >>load was hovering around 60% when the driver was loaded and
with no
> >>serial comms taking place, I have no idea why. So I tried
the same
> >>(debug) version of the driver in the non-debug version of
W2K to
> >>remove any issues caused by the debugger and it's serial
> comms, system
> >>load was the same but the dial-up connection succeeded! so
> I think it
> >>is a performance issue rather than a logic
> >
> > issue.
> >
> >>I don't know why the load should be so high, there are no
> threads in
> >>the driver and as far as I am aware it should just be
sitting there
> >>doing nothing, you probably know better.
> >>
> >>My next test will be to see what the load is with the free
> version of
> >>the driver.
> >>
> >>Thanks for the suggestions regarding using a test app to
thrash the
> >>comms, I may still need to resort to that but for time
> being I think I
> >>will need to track down this load problem.
> >>
> >>As usual, any suggestions greatly appreciated.
> >>
> >>Thanks
> >>
> >>Alasdair
> >>
> >>
> >>-----Original Message-----
> >>From: Alasdair Tompson (external)
> >
> > [mailto:xxxxx@t-mobile.co.uk]
> >
> >>Sent: 11 October 2004 16:58
> >>To: Windows System Software Devs Interest List
> >>Subject: RE: [ntdev] Losing Received Data?
> >
> >
> >>Thanks Mats and Joseph,
> >>Good idea, I am going home now so I'll look into that
tomorrow.
> >>Alasdair
> >>
> >>
> >>>-----Original Message-----
> >>>From: Mats PETERSSON [mailto:xxxxx@3dlabs.com]
> >>>Sent: 11 October 2004 16:55
> >>>To: Windows System Software Devs Interest List
> >>>Subject: Re: [ntdev] Losing Received Data?
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>>PS. You can probably write a simple usermode program
> >>>>to run on the other side and generate this problem...
> >>>>just open the comm port and write a pretty good burst
> >>>>of data.
> >>>
> >>>This is a good idea. Instead of using the phone (which of
> course is
> >>>the ultimate target), use a PC with either standard of
custom
> >>>software on it.
> >>>
> >>>>You can probably also do it using hyperterms file
> >>>>transfer facility (ZModem/Xmodem I think it supports
> >>>>at least one of these.)
> >>>>
> >>>>Typing in hyperterm isn't a good test since even with
> >>>>all the debugging, the computer is still probably faster
than you
> >>>>are.
> >>>
> >>>I don't know if Hyperterm supports it, but definitely some
other
> >>>terminal programs (TeraTerm comes to mind, but I'm unsure
if this
> >>>feature is
> >>>included) support logging and transmitting of text-files
(ASCII
> >>>transfer mode). So buiild a text-file with a heap of text
that you
> >>>can identify if it's been transmitted correctly at the
other end,
> >>>with varying lenghts and "no protocol" (because using a
> protocol just
> >>>confuses the issue) and send some data across.
> >>>
> >>>If you write a little test-app, then one test method should
be to
> >>>transmit a file and compare at the other end (so you start
the
> >>>compare first, then start the transmit, and the test-app
> shows which
> >>>lines come across badly). That way, you can test different
> patterns,
> >>>sizes, etc, etc, and change the test-setup without having
> to do too
> >>>much programming.
> >>>
> >>>Writing custom test-tools is a big part of device drivers,
because
> >>>you need to be able to do "directed testing", e.g. testing
special
> >>>cases without hitting some other stuff that is currently
> not working,
> >>>etc, etc.
> >>>
> >>>
> >>>--
> >>>Mats
> >>>
> >>>
> >>>
> >>>---
> >>>Questions? First check the Kernel Driver FAQ at
> >>>http://www.osronline.com/article.cfm?id=256
> >>>
> >>>You are currently subscribed to ntdev as:
> >>>xxxxx@t-mobile.co.uk To unsubscribe send a
> blank email to
> >>>xxxxx@lists.osr.com
> >>>
> >>
> >
> >>NOTICE AND DISCLAIMER:
> >>This email (including attachments) is confidential. If you
have
> >>received this email in error please notify the sender
> immediately and
> >>delete this email from your system without copying or
> disseminating it
> >>or placing any reliance upon its contents. We cannot
> accept liability
> >>for any breaches of confidence arising through use of email.
Any
> >>opinions expressed in this email (including attachments)
> are those of
> >>the author and do not necessarily reflect our opinions. We
> will not
> >>accept responsibility for any commitments made by our
employees
> >>outside the scope of our business. We do not warrant the
> accuracy or
> >>completeness of such
> >
> > information.
> >
> >>---
> >>Questions? First check the Kernel Driver FAQ at http://www.
> >>osronline.com/article.cfm?id=256
> >>
> >>You are currently subscribed to ntdev as:
> >>xxxxx@t-mobile.co.uk
> >
> >
> >>To unsubscribe send a blank email to
> xxxxx@lists.osr.com
> >>---
> >>Questions? First check the Kernel Driver FAQ at http://www.
> >>osronline.com/article.cfm?id=256
> >>
> >>You are currently subscribed to ntdev as:
> xxxxx@3dlabs.com To
> >>unsubscribe send a blank email to %%email.unsub%%
> >>
> >>
> >
> >
> >>NOTICE AND DISCLAIMER:
> >>This email (including attachments) is confidential. If you
have
> >>received this email in error please notify the sender
> immediately and
> >>delete this email from your system without copying or
> disseminating it
> >>or placing any reliance upon its contents. We cannot accept
> liability
> >>for any breaches of confidence arising through use of email.
Any
> >>opinions expressed in this email (including attachments)
> are those of
> >>the author and do not necessarily reflect our opinions. We
will not
> >>accept responsibility for any commitments made by our
employees
> >>outside the scope of our business. We do not warrant the
> accuracy or
> >>completeness of such
> >
> > information.
> >
> >>ForwardSourceID:NT00005356
> >
> >
> >
> >
> > ---
> > Questions? First check the Kernel Driver FAQ at
> > http://www.osronline.com/article.cfm?id=256
> >
> > You are currently subscribed to ntdev as: xxxxx@vandyke.com
> > To unsubscribe send a blank email to
> xxxxx@lists.osr.com
> >
>
>
>
> ---
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as:
> xxxxx@t-mobile.co.uk To unsubscribe send a blank
> email to xxxxx@lists.osr.com
>
NOTICE AND DISCLAIMER:
This email (including attachments) is confidential. If you have
received this email in error please notify the sender immediately and
delete this email from your system without copying or disseminating it
or placing any reliance upon its contents. We cannot accept liability
for any breaches of confidence arising through use of email. Any
opinions expressed in this email (including attachments) are those of
the author and do not necessarily reflect our opinions. We will not
accept responsibility for any commitments made by our employees outside
the scope of our business. We do not warrant the accuracy or
completeness of such information.
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: unknown lmsubst tag
argument: ''
To unsubscribe send a blank email to
xxxxx@lists.osr.com
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: unknown lmsubst tag argument:
''
To unsubscribe send a blank email to xxxxx@lists.osr.com