How to profile the kernel during its initialization?
Hello Can we profile the kernel during its initialization? perf is initialized in an early stage in start_kernel(), but it seems there are no command-line parameters to enable it. Does anyone have any ideas how to profile the kernel during its initialization (before user space programs start to run)? I think someone should have the similar problem as me, and there should be some solutions. Thanks, Da
On Wed, Jul 6, 2011 at 12:47 AM, Zheng Da <zhengda1936@gmail.com> wrote:
Hello
Can we profile the kernel during its initialization? perf is initialized in an early stage in start_kernel(), but it seems there are no command-line parameters to enable it. Does anyone have any ideas how to profile the kernel during its initialization (before user space programs start to run)? I think someone should have the similar problem as me, and there should be some solutions.
Thanks, Da
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Hi Da, Have a look at ftrace. It could be used to profile initcalls. Just add following boot options: initcall_debug, ftrace=initcall More details on http://www.omappedia.org/wiki/Installing_and_Using_Ftrace#Boot_Tracer
On 07/05/11 21:17, Vladimir Murzin wrote:
On Wed, Jul 6, 2011 at 12:47 AM, Zheng Da<zhengda1936@gmail.com> wrote:
Hello
Can we profile the kernel during its initialization? perf is initialized in an early stage in start_kernel(), but it seems there are no command-line parameters to enable it. Does anyone have any ideas how to profile the kernel during its initialization (before user space programs start to run)? I think someone should have the similar problem as me, and there should be some solutions.
Thanks, Da
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Hi Da,
Have a look at ftrace. It could be used to profile initcalls. Just add following boot options:
initcall_debug, ftrace=initcall
More details on http://www.omappedia.org/wiki/Installing_and_Using_Ftrace#Boot_Tracer Thanks Vladimir. initcall_debug can show me which initcalls use most of time. but the initcall tracer has already been abandoned. I use v2.6.38. If I enable the function tracer, then it generates too much data, and the old data is overwritten. Is function tracer or function graph tracer available for tracing initcalls?
Da
On 07/05/11 21:17, Vladimir Murzin wrote:
On Wed, Jul 6, 2011 at 12:47 AM, Zheng Da<zhengda1936@gmail.com> wrote:
Hello
Can we profile the kernel during its initialization? perf is initialized in an early stage in start_kernel(), but it seems there are no command-line parameters to enable it. Does anyone have any ideas how to profile the kernel during its initialization (before user space programs start to run)? I think someone should have the similar problem as me, and there should be some solutions.
Thanks, Da
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Hi Da,
Have a look at ftrace. It could be used to profile initcalls. Just add following boot options:
initcall_debug, ftrace=initcall
More details on http://www.omappedia.org/wiki/Installing_and_Using_Ftrace#Boot_Tracer I'm reading the code of ftrace. Most of tracers are registered in device initcalls. So if I enable a tracer in the kernel parameters, it only starts to work after device initcalls. Actually, what I really want to trace is device initcalls.
Is there any reason why tracers have to be registered in device initcalls? Can I move them to an earlier place? at least some of them, such as function tracer and function graph tracer. Thanks, Da
participants (3)
-
Da Zheng -
Vladimir Murzin -
Zheng Da