I'm trying to debug a linux driver and a particular piece of code is behaving very strangely. In order to see what's going on I've filled the code with printk statements so I can see exactly what the variables I'm interested in do as the code executes. Unfortunately, when printing the ring buffer with
dmesg lots of lines appear to be randomly missing. Google tells me this is because I'm writing too much data to the ring buffer at once. I've tried increasing the ring buffer size to its maximum (1 << 21) and I've tried inserting udelays to slow the writing down but I'm still having the same problem.
What else can I try?