A popular debug technique that we programmers use is to sprinkle prints at various points in the code, often allowing us to narrow down the source of an issue. This is indeed a useful debugging technique and is called instrumenting the code. Kernel developers often use the venerable printk API for just this purpose.
So, imagine you have written a kernel module and are in the process of debugging it (by adding several printk's). Your kernel code now emits several printk instances, which, of course, you can see at runtime via dmesg or some other means. That's fine, but what if, especially because you're running some automated user space test script, you'd like to see the point at which the script initiated some action within our kernel module, by printing out a certain message. As a concrete example, say we want the log to look something like this:
test_script: msg 1 ; kernel_module: msg n, msg n...