From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40448) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1exh6K-0000Jv-By for qemu-devel@nongnu.org; Sun, 18 Mar 2018 18:48:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1exh6H-0000wX-AJ for qemu-devel@nongnu.org; Sun, 18 Mar 2018 18:48:28 -0400 Sender: =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= References: <1521232280-13089-1-git-send-email-alindsay@codeaurora.org> <1521232280-13089-21-git-send-email-alindsay@codeaurora.org> From: =?UTF-8?Q?Philippe_Mathieu-Daud=c3=a9?= Message-ID: Date: Sun, 18 Mar 2018 23:48:22 +0100 MIME-Version: 1.0 In-Reply-To: <1521232280-13089-21-git-send-email-alindsay@codeaurora.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [Qemu-arm] [PATCH v3 20/22] target/arm: PMU: Add instruction and cycle events List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Aaron Lindsay , qemu-arm@nongnu.org, Peter Maydell , Alistair Francis , Wei Huang , Peter Crosthwaite Cc: Michael Spradling , qemu-devel@nongnu.org, Digant Desai On 03/16/2018 09:31 PM, Aaron Lindsay wrote: > 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 > --- [...]> #define SUPPORTED_EVENT_SENTINEL UINT16_MAX > static const pm_event pm_events[] = { > +#ifndef CONFIG_USER_ONLY > + { .number = 0x008, /* INST_RETIRED */ "Instruction architecturally executed" seems more explicit to me. > + .supported = instructions_supported, > + .get_count = instructions_get_count > + }, > + { .number = 0x011, /* CPU_CYCLES */ > + .supported = event_always_supported, > + .get_count = cycles_get_count > + }, > +#endif [...]