Re: [Qemu-devel] [PATCH v6 11/14] target/arm: PMU: Add instruction and cycle events

2018-10-18 Thread Aaron Lindsay
On Oct 17 14:12, Richard Henderson wrote: > On 10/17/18 12:47 PM, Aaron Lindsay wrote: > > On Oct 16 17:04, Richard Henderson wrote: > >> 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 r

Re: [Qemu-devel] [PATCH v6 11/14] target/arm: PMU: Add instruction and cycle events

2018-10-17 Thread Richard Henderson
On 10/17/18 12:47 PM, Aaron Lindsay wrote: > On Oct 16 17:04, Richard Henderson wrote: >> 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_coun

Re: [Qemu-devel] [PATCH v6 11/14] target/arm: PMU: Add instruction and cycle events

2018-10-17 Thread Aaron Lindsay
On Oct 16 17:04, Richard Henderson wrote: > 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

Re: [Qemu-devel] [PATCH v6 11/14] target/arm: PMU: Add instruction and cycle events

2018-10-16 Thread Richard Henderson
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_CLOC

[Qemu-devel] [PATCH v6 11/14] target/arm: PMU: Add instruction and cycle events

2018-10-10 Thread Aaron Lindsay
The instruction event is only enabled when icount is used, cycles are always supported. Always defining get_cycle_count (but altering its behavior depending on CONFIG_USER_ONLY) allows us to remove some CONFIG_USER_ONLY #defines throughout the rest of the code. Signed-off-by: Aaron Lindsay Review