I am interested in profiling a module for the Linux Kernel. I tried it this way:
- Built the kernel with
CONFIG_PROFILING=y
- Booted the kernel with
profile=2
- Reset the profiler by
echo 123 > /proc/profile
- The module was successfully loaded by a dedicated daemon
- Run a user-space app that is using the module through specific
ioctl
calls. The test app worked as expected so the module was working OK. - Read the profiling info using
readprofile -p /proc/profile -m System.map
where System.app was generated along with the kernel.
So far, so good. Almost everything worked as expected. What did not work however, is that I didn't get any info about my module, i.e. there was no mention of any function from the module.
However, on second thoughts, I remebered that I forgot to recompile the module using the CONFIG_PROFILING=y
.
So, my question is: Did the module not show up in the profiling log because it had not been compiled with the CONFIG_PROFILING=y
or is there some other more obvious reason that I don't know of?
If one wonders, why I am asking rather than trying it straight away, that is because, I can't do it at home and I'd rather like to hear what the knowledgable would say before I get access to the code again.