* Ftrace Timer on OMAP3
@ 2012-05-25 15:19 Thomas Klute
2012-05-28 6:56 ` Hiremath, Vaibhav
0 siblings, 1 reply; 4+ messages in thread
From: Thomas Klute @ 2012-05-25 15:19 UTC (permalink / raw)
To: linux-omap; +Cc: Carsten Vogel
Hi everyone,
we're having some trouble getting useful results from Ftrace on OMAP3
(Gumstix Overo). As you can see in the example output below, function
duration can't be displayed with a precision higher than about 30.5 us,
which matches the frequency of the 32 kHz platform timer. For OMAP1,
using OMAP_MPU_TIMER instead of CONFIG_OMAP_32K_TIMER should provide
better results [1], but I couldn't find anything similar for OMAP3. Just
setting CONFIG_OMAP_32K_TIMER=N didn't change the results. Did I miss
anything, or isn't there any more precise timer?
Best regards,
Thomas Klute
[1]
http://elinux.org/images/0/0c/Bird-LS-2009-Measuring-function-duration-with-ftrace.pdf
Example Ftrace output:
876.252136 | 0) | sys_sendmsg() {
876.252166 | 0) | rom_rtadd() {
876.252197 | 0) 0.000 us | release_queue_for_dst();
876.252197 | 0) 0.000 us | add_route();
876.252197 | 0) + 30.517 us | }
876.252258 | 0) + 91.553 us | }
--
876.311859 | 0) | sys_sendmsg() {
876.311889 | 0) | rom_rtadd() {
876.311889 | 0) + 30.518 us | release_queue_for_dst();
876.311920 | 0) 0.000 us | add_route();
876.311920 | 0) + 30.518 us | }
876.311950 | 0) + 91.552 us | }
--
876.371704 | 0) | sys_sendmsg() {
876.371765 | 0) | rom_rtadd() {
876.371765 | 0) 0.000 us | release_queue_for_dst();
876.371765 | 0) 0.000 us | add_route();
876.371795 | 0) + 30.517 us | }
876.371826 | 0) ! 122.071 us | }
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: Ftrace Timer on OMAP3
2012-05-25 15:19 Ftrace Timer on OMAP3 Thomas Klute
@ 2012-05-28 6:56 ` Hiremath, Vaibhav
2012-05-28 8:24 ` Ming Lei
0 siblings, 1 reply; 4+ messages in thread
From: Hiremath, Vaibhav @ 2012-05-28 6:56 UTC (permalink / raw)
To: Thomas Klute, linux-omap@vger.kernel.org; +Cc: Carsten Vogel
On Fri, May 25, 2012 at 20:49:07, Thomas Klute wrote:
> Hi everyone,
>
> we're having some trouble getting useful results from Ftrace on OMAP3
> (Gumstix Overo). As you can see in the example output below, function
> duration can't be displayed with a precision higher than about 30.5 us,
> which matches the frequency of the 32 kHz platform timer. For OMAP1,
> using OMAP_MPU_TIMER instead of CONFIG_OMAP_32K_TIMER should provide
> better results [1], but I couldn't find anything similar for OMAP3. Just
> setting CONFIG_OMAP_32K_TIMER=N didn't change the results. Did I miss
> anything, or isn't there any more precise timer?
>
I believe you are using mainline kernel here, if yes, you should be enabling
the dmtimer using commandline argument, "clocksource="gp_timer".
Thanks,
Vaibhav
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Ftrace Timer on OMAP3
2012-05-28 6:56 ` Hiremath, Vaibhav
@ 2012-05-28 8:24 ` Ming Lei
2012-05-30 10:35 ` Thomas Klute
0 siblings, 1 reply; 4+ messages in thread
From: Ming Lei @ 2012-05-28 8:24 UTC (permalink / raw)
To: Hiremath, Vaibhav; +Cc: Thomas Klute, linux-omap@vger.kernel.org, Carsten Vogel
On Mon, May 28, 2012 at 2:56 PM, Hiremath, Vaibhav <hvaibhav@ti.com> wrote:
> On Fri, May 25, 2012 at 20:49:07, Thomas Klute wrote:
>> Hi everyone,
>>
>> we're having some trouble getting useful results from Ftrace on OMAP3
>> (Gumstix Overo). As you can see in the example output below, function
>> duration can't be displayed with a precision higher than about 30.5 us,
>> which matches the frequency of the 32 kHz platform timer. For OMAP1,
>> using OMAP_MPU_TIMER instead of CONFIG_OMAP_32K_TIMER should provide
>> better results [1], but I couldn't find anything similar for OMAP3. Just
>> setting CONFIG_OMAP_32K_TIMER=N didn't change the results. Did I miss
>> anything, or isn't there any more precise timer?
>>
>
> I believe you are using mainline kernel here, if yes, you should be enabling
> the dmtimer using commandline argument, "clocksource="gp_timer".
Also you need to pass 'nohlt' to kernel since gp_timer can't be kept
when cpu is idled in deep state.
Thanks,
--
Ming Lei
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Ftrace Timer on OMAP3
2012-05-28 8:24 ` Ming Lei
@ 2012-05-30 10:35 ` Thomas Klute
0 siblings, 0 replies; 4+ messages in thread
From: Thomas Klute @ 2012-05-30 10:35 UTC (permalink / raw)
To: Ming Lei; +Cc: Hiremath, Vaibhav, linux-omap@vger.kernel.org, Carsten Vogel
Am 28.05.2012 10:24, schrieb Ming Lei:
> On Mon, May 28, 2012 at 2:56 PM, Hiremath, Vaibhav <hvaibhav@ti.com> wrote:
>> On Fri, May 25, 2012 at 20:49:07, Thomas Klute wrote:
>>> Hi everyone,
>>>
>>> we're having some trouble getting useful results from Ftrace on OMAP3
>>> (Gumstix Overo). As you can see in the example output below, function
>>> duration can't be displayed with a precision higher than about 30.5 us,
>>> which matches the frequency of the 32 kHz platform timer. For OMAP1,
>>> using OMAP_MPU_TIMER instead of CONFIG_OMAP_32K_TIMER should provide
>>> better results [1], but I couldn't find anything similar for OMAP3. Just
>>> setting CONFIG_OMAP_32K_TIMER=N didn't change the results. Did I miss
>>> anything, or isn't there any more precise timer?
>>>
>>
>> I believe you are using mainline kernel here, if yes, you should be enabling
>> the dmtimer using commandline argument, "clocksource="gp_timer".
>
> Also you need to pass 'nohlt' to kernel since gp_timer can't be kept
> when cpu is idled in deep state.
I use the linux-omap tree, but adding "clocksource=gp_timer nohlt" to
the kernel command line did the trick anyways. :-)
Thanks to both of you!
Thomas
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-05-30 10:35 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-25 15:19 Ftrace Timer on OMAP3 Thomas Klute
2012-05-28 6:56 ` Hiremath, Vaibhav
2012-05-28 8:24 ` Ming Lei
2012-05-30 10:35 ` Thomas Klute
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.