|
From: | Richard Henderson |
Subject: | Re: [Qemu-devel] [PATCH v6 11/14] target/arm: PMU: Add instruction and cycle events |
Date: | Tue, 16 Oct 2018 17:04:54 -0700 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 |
On 10/10/18 1:37 PM, Aaron Lindsay wrote: > + * Return the underlying cycle count for the PMU cycle counters. If we're in > + * usermode, simply return 0. > + */ > +static uint64_t cycles_get_count(CPUARMState *env) > +{ > +#ifndef CONFIG_USER_ONLY > + return muldiv64(qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL), > + ARM_CPU_FREQ, NANOSECONDS_PER_SECOND); > +#else > + return 0; > +#endif > +} Usually we pass through the host cycle counter. See cpu_get_host_ticks(). r~
[Prev in Thread] | Current Thread | [Next in Thread] |