It works much (exactly?) like printf, just goes out the serial port.
IOLog goes to a circular buffer that gets emptied at some (reasonably)
regular interval. It's possible to flood the log if you write too much
too quickly, and it's possible to miss logs if you panic the kernel
before its buffer is written out.
kprintf is synchronous, so you know that if you panic the machine you
got all the logs before the panic. It's reasonably quick, and seems to
be interrupt safe (but no guarantees).
It's best use is for dealing with sleep/wake issues or panics.
IOLog is still a mighty fine workhorse.
Mark
--
Mark Cookson
M-Audio
225 Locust St.
Hudson, WI 54016
On Sep 7, 2004, at 8:21 PM, Jim Wintermyre wrote:
At 1:31 PM -0500 9/7/04, Mark Cookson wrote:
For working in the kernel, I love kprintf(). It doesn't have any
silly "last message repeated" semantics and it's far more reliable
than IOLog when timing (aka, panics) matters. Of course, you need a
couple of serial ports for it to work, but the Stealth Serial Port
(on the victim machine, USB serial port on the receiving machine)
has, so far, worked just great for this (no interest in them other
than a happy customer).
Hmm. Maybe I just missed something obvious, but this is the first
I've heard of kprintf(). Is this documented anywhere? A search on
ADC only turned up the flags you have to set in order to have the
output go to the serial port. I see the prototype in IOLib.h, but no
description...
Thanks,
Jim
_______________________________________________
darwin-drivers mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/darwin-drivers
Do not post admin requests to the list. They will be ignored.