* How to profile the kernel during its initialization?
@ 2011-07-05 20:47 Zheng Da
2011-07-06 4:17 ` Vladimir Murzin
0 siblings, 1 reply; 4+ messages in thread
From: Zheng Da @ 2011-07-05 20:47 UTC (permalink / raw)
To: kernelnewbies
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* How to profile the kernel during its initialization?
2011-07-05 20:47 How to profile the kernel during its initialization? Zheng Da
@ 2011-07-06 4:17 ` Vladimir Murzin
2011-07-06 23:39 ` Da Zheng
2011-07-07 0:34 ` Da Zheng
0 siblings, 2 replies; 4+ messages in thread
From: Vladimir Murzin @ 2011-07-06 4:17 UTC (permalink / raw)
To: kernelnewbies
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 at 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
^ permalink raw reply [flat|nested] 4+ messages in thread
* How to profile the kernel during its initialization?
2011-07-06 4:17 ` Vladimir Murzin
@ 2011-07-06 23:39 ` Da Zheng
2011-07-07 0:34 ` Da Zheng
1 sibling, 0 replies; 4+ messages in thread
From: Da Zheng @ 2011-07-06 23:39 UTC (permalink / raw)
To: kernelnewbies
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 at 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
^ permalink raw reply [flat|nested] 4+ messages in thread
* How to profile the kernel during its initialization?
2011-07-06 4:17 ` Vladimir Murzin
2011-07-06 23:39 ` Da Zheng
@ 2011-07-07 0:34 ` Da Zheng
1 sibling, 0 replies; 4+ messages in thread
From: Da Zheng @ 2011-07-07 0:34 UTC (permalink / raw)
To: kernelnewbies
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 at 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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-07-07 0:34 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-05 20:47 How to profile the kernel during its initialization? Zheng Da
2011-07-06 4:17 ` Vladimir Murzin
2011-07-06 23:39 ` Da Zheng
2011-07-07 0:34 ` Da Zheng
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.