On Tue, Sep 20, 2011 at 4:11 PM, Nuno Martins <nuno.m.g.martins@xxxxxxxxx> wrote: > > > On Tue, Sep 20, 2011 at 5:59 AM, Amit Nagal <helloin.amit@xxxxxxxxx> wrote: >> >> On Tue, Sep 20, 2011 at 10:25 AM, rohan puri <rohan.puri15@xxxxxxxxx> >> wrote: >> > >> > >> > On Tue, Sep 20, 2011 at 10:13 AM, Amit Nagal <helloin.amit@xxxxxxxxx> >> > wrote: >> >> >> >> On Tue, Sep 20, 2011 at 10:05 AM, rohan puri <rohan.puri15@xxxxxxxxx> >> >> wrote: >> >> > >> >> > >> >> > On Tue, Sep 20, 2011 at 9:44 AM, Amit Nagal <helloin.amit@xxxxxxxxx> >> >> > wrote: >> >> >> >> >> >> Hi , >> >> >> >> >> >> i want to measure time spend in a callback function called from >> >> >> interrupt context . >> >> >> since the time spend will be in us / ns , what kernel apis can i use >> >> >> to measure it ? >> >> >> >> >> >> also since i want to use it in interrupt context , kernel time >> >> >> measurement apis should not sleep . >> >> >> i am using embedded arm target , and tools like OProfile are not >> >> >> available . >> >> >> >> >> >> can i be guided which kernel time measurement apis shall i use to >> >> >> measure time in a interrupt callback ? >> >> >> >> >> >> Regards >> >> >> Amit Nagal >> >> > >> >> > For this you can make use of ftrace. >> >> > >> >> > Refer link >> >> > http://www.mjmwired.net/kernel/Documentation/trace/ftrace.txt >> >> > >> >> > Regards, >> >> > Rohan >> >> > >> >> >> >> Tools like ftrace are not available to me in my embedded arm target . >> >> So i want to use kernel apis to deal with time measurement in >> >> interrupt context . >> >> >> >> Regards >> >> Amit Nagal >> > >> > Hi Amit, >> > >> > I think ftrace can be enabled and used on arm arch. >> > Please Refer http://www.omappedia.org/wiki/Installing_and_Using_Ftrace >> > >> > Regards, >> > Rohan >> > >> >> Ok , thanks for the link . i will try the same . > > 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. kernel/Documentation/kprobes.txt > > >> >> Regards >> Amit Nagal >> >> _______________________________________________ >> Kernelnewbies mailing list >> Kernelnewbies@xxxxxxxxxxxxxxxxx >> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > > > > -- > Nuno Martins > > > _______________________________________________ > Kernelnewbies mailing list > Kernelnewbies@xxxxxxxxxxxxxxxxx > http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies > > _______________________________________________ Kernelnewbies mailing list Kernelnewbies@xxxxxxxxxxxxxxxxx http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies