I am actually looking at some changes that litter the kernel with short code snippets and thus according to papers i have read can result in CPU hits of around 48% when applied is userspace. I am curious how you would best measure the impact of similar modifications (since obviously one isn't always in the kernel code when executing a process). My interest is in testing different approaches of making pointer runtime checks.
My theory would be that perhaps writing some test code that exercises different extremes (calling the syscall api continually to do a range of tasks) to see how much slower the code would be between the safer version and the old version. This however might not reflect real world performance for I/O (sockets) such as web servers that spend less time in the kernel. I have seen a paper that benchmarked kvm against xen server but I haven't seen any kernel space papers measuring degradations in overall system performance when adding safety checks(perhaps redundant sometimes) into the kernel.