Quoth Stan Marly [EMAIL PROTECTED]: > I would like to make some traces in a driver. I can't use > printk because it introduces delay and affects the driver > behaviour. Is there an easy way to log some traces in a file?
Two approaches I've used in the past: 1. Find a spare GPIO pin (or even one that's used for something else, as long as it won't mess anything up), make your driver toggle it at strategic points, and hook up an oscilloscope or logic probe to the line to watch its progress. (You may need several lines, depending on how complicated the problem and your driver is.) This is especially useful if you're mostly trying to time bits of code, since the impact is fairly minimal. 2. Write log text into an in-memory buffer (perhaps a linked list or queue, or just a flat buffer -- watch out for memory allocation, if that will slow things down too). Create a sysfs attribute file that dumps and clears the contents of that buffer when read. Make sure you either read the file frequently enough that your buffer can't overflow, or build protections into the buffer-management code. Or both. _______________________________________________ uClinux-dev mailing list [email protected] http://mailman.uclinux.org/mailman/listinfo/uclinux-dev This message was resent by [email protected] To unsubscribe see: http://mailman.uclinux.org/mailman/options/uclinux-dev
