All of lore.kernel.org
 help / color / mirror / Atom feed
From: zhengda1936@gmail.com (Da Zheng)
To: kernelnewbies@lists.kernelnewbies.org
Subject: How to profile the kernel during its initialization?
Date: Wed, 06 Jul 2011 17:34:34 -0700	[thread overview]
Message-ID: <4E14FF1A.5080503@gmail.com> (raw)
In-Reply-To: <CABV+yWs7afHJ6xkFdphhT4dJvZXwhvFCbgsdA7rTGBB3g4ACNg@mail.gmail.com>

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

      parent reply	other threads:[~2011-07-07  0:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E14FF1A.5080503@gmail.com \
    --to=zhengda1936@gmail.com \
    --cc=kernelnewbies@lists.kernelnewbies.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.