I am compiling the Linux kernel for my specific hardware and I only select the drivers/options which I really need. This is in contrast to a typical distribution kernel, where they compile almost everything, to be compatible with as many hardware configurations as possible.
I imagine, for my kernel, I am only using 1% of the total kernel code (order of magnitude estimate).
Is there any way to find out which files from the kernel source I have actually used when I build my kernel?
This is not an academical question. Suppose I have compiled my kernel 3.18.1. Now a security update comes along, and 3.18.2 is released. I have learned in my other question how to find which files have change between releases. If I knew whether any of the files I am using have changed, I would recompile my kernel to the new version. If, on the other hand, the changes only affect files which I am not using anyway, I can keep my current kernel version.