[tz_vmm demo]- execution time

John David johndv2123 at ...9...
Tue Oct 25 03:53:04 CEST 2016


Hi Martin,

Thanks a lot.
I have tried to measure and print the performance counter value on as
follows ( i.MX53QSB)


*Trace::Timestamp start = Trace::timestamp();*

*         my_funciton();*


*        Trace::Timestamp end = Trace::timestamp();
printf("CPU_cyces= %lu\n",(end-start));*

I have tried with *printf(%zu),* *printf(%llu)* and *printf("%"PRIu32) *format
but the maximum number of digits what I can get is 10. I wonder what format
can be used if the performance counter value is larger than 10 digits.
To calculate the elapsed time, I multiply the *CPU_cycles  by 1 nanosecod
(ns)  / cycle.  *Is that right?

Thanks,


On Tue, Sep 20, 2016 at 11:32 AM, Martin Stein <martin.stein at ...1...
> wrote:

> Hi John,
>
> Am 20.09.2016 um 01:46 schrieb John David:
> > Dear Martin,
> >
> > Thanks a lot for your answers.
> >
> > I wanted to use the performance counter for more performance
> > measurements such as cache-misses, but I don't know how to access and
>
> I forgot to mention that you could also transform the performance
> counter values into time values. On ARMv7 the counter counts every
> single CPU cycle. Thus, you can use SECONDS = PERF_COUNTER / CPU_FREQUENCY.
>
> > use it in the secure world userland. Could you please give me some
>
> If you have the performance counter enabled in the SPECS, you can
> include 'trace/timestamp.h' and read a timestamp via
> 'Genode::Trace::Timestamp Genode::Trace::timestamp();'.
>
> > hints? is there any reading material on this?
>
> I think [1] illustrates the use of the timestamp/performance counter
> pretty good. The only document I could find to read about perfomance
> counter access in general is the ARMv7 Manual [2] paragraph "C12.7
> Counter access". If you have further questions, don't hesitate to ask.
>
> Cheers,
> Martin
>
> [1] base-nova/src/test/platform/main.cc
> [2]
> http://liris.cnrs.fr/~mmrissa/lib/exe/fetch.php?media=armv7-a-r-manual.pdf
>
> ------------------------------------------------------------
> ------------------
> _______________________________________________
> genode-main mailing list
> genode-main at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/genode-main
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.genode.org/pipermail/users/attachments/20161025/ff5a7ebb/attachment.html>


More information about the users mailing list