<br><br><div class="gmail_quote">On Tue, Sep 20, 2011 at 5:59 AM, Amit Nagal <span dir="ltr"><<a href="mailto:helloin.amit@gmail.com">helloin.amit@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div></div><div class="h5">On Tue, Sep 20, 2011 at 10:25 AM, rohan puri <<a href="mailto:rohan.puri15@gmail.com">rohan.puri15@gmail.com</a>> wrote:<br>
><br>
><br>
> On Tue, Sep 20, 2011 at 10:13 AM, Amit Nagal <<a href="mailto:helloin.amit@gmail.com">helloin.amit@gmail.com</a>> wrote:<br>
>><br>
>> On Tue, Sep 20, 2011 at 10:05 AM, rohan puri <<a href="mailto:rohan.puri15@gmail.com">rohan.puri15@gmail.com</a>><br>
>> wrote:<br>
>> ><br>
>> ><br>
>> > On Tue, Sep 20, 2011 at 9:44 AM, Amit Nagal <<a href="mailto:helloin.amit@gmail.com">helloin.amit@gmail.com</a>><br>
>> > wrote:<br>
>> >><br>
>> >> Hi ,<br>
>> >><br>
>> >> i want to measure time spend in a callback function called from<br>
>> >> interrupt context .<br>
>> >> since the time spend will be in us / ns , what kernel apis can i use<br>
>> >> to measure it ?<br>
>> >><br>
>> >> also since i want to use it in interrupt context , kernel time<br>
>> >> measurement apis should not sleep .<br>
>> >> i am using embedded arm target , and tools like OProfile are not<br>
>> >> available .<br>
>> >><br>
>> >> can i be guided which kernel time measurement apis shall i use to<br>
>> >> measure time in a interrupt callback ?<br>
>> >><br>
>> >> Regards<br>
>> >> Amit Nagal<br>
>> ><br>
>> > For this you can make use of ftrace.<br>
>> ><br>
>> > Refer link <a href="http://www.mjmwired.net/kernel/Documentation/trace/ftrace.txt" target="_blank">http://www.mjmwired.net/kernel/Documentation/trace/ftrace.txt</a><br>
>> ><br>
>> > Regards,<br>
>> > Rohan<br>
>> ><br>
>><br>
>> Tools like ftrace are not available to me in my embedded arm target .<br>
>> So i want to use kernel apis to deal with time measurement in<br>
>> interrupt context .<br>
>><br>
>> Regards<br>
>> Amit Nagal<br>
><br>
> Hi Amit,<br>
><br>
> I think ftrace can be enabled and used on arm arch.<br>
> Please Refer <a href="http://www.omappedia.org/wiki/Installing_and_Using_Ftrace" target="_blank">http://www.omappedia.org/wiki/Installing_and_Using_Ftrace</a><br>
><br>
> Regards,<br>
> Rohan<br>
><br>
<br>
</div></div>Ok , thanks for the link . i will try the same .<br></blockquote><div><br></div><div><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 10px; border-collapse: collapse; ">Couldn't use ktimer, it says that is a high resolution timer inside the kernel, you could combine ktimer with kretprobe (you assing a function prior to the calling of your function and another when finished ). It is a instrumentation method inside the kernel.</span></div>
<div><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 10px; border-collapse: collapse; "><br></span></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div></div><div class="h5"><br>
Regards<br>
Amit Nagal<br>
<br>
_______________________________________________<br>
Kernelnewbies mailing list<br>
<a href="mailto:Kernelnewbies@kernelnewbies.org">Kernelnewbies@kernelnewbies.org</a><br>
<a href="http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" target="_blank">http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>Nuno Martins<br><br>