Benchmarking Genode TrustZone

Norman Feske norman.feske at ...1...
Thu Jun 23 11:16:00 CEST 2016


Hi Tiago,

> I'm thinking that this alternative may suffer from the same problem as
> before if Genode's time clock becomes inconsistent whenever Linux is
> being executed in NW.
> 
> Do you know any other way to benchmark a world switch + processing +
> world switch scenario? Is there any timer I can execute inside TZ_VMM?

have you considered the use of a performance counter for measuring
low-level code paths? For reference, you may take a look at the
'timestamp' function for ARM:


https://github.com/genodelabs/genode/blob/master/repos/os/include/spec/arm_v7/trace/timestamp.h

Compared to the other time sources, the counter is precise while having
very little overhead. The exact meaning of the counter value may depend
on the platform. E.g., on the Raspberry Pi where I used it, the counter
increases every 64 clock cycles.

As far as I know, the feature must be explicitly enabled by adding the
following line to your <build-dir>/etc/specs.conf:

  SPECS += perf_counter

Be aware that further (TZ configuration) steps may be required to expose
the counter to the normal world.

Cheers
Norman

-- 
Dr.-Ing. Norman Feske
Genode Labs

http://www.genode-labs.com · http://genode.org

Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden
Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth




More information about the users mailing list