From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55253) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZMfyy-00069k-Cv for qemu-devel@nongnu.org; Tue, 04 Aug 2015 13:26:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZMfys-0004Iz-Pf for qemu-devel@nongnu.org; Tue, 04 Aug 2015 13:26:30 -0400 Received: from mail-wi0-f180.google.com ([209.85.212.180]:33704) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZMfys-0004In-JJ for qemu-devel@nongnu.org; Tue, 04 Aug 2015 13:26:26 -0400 Received: by wijp15 with SMTP id p15so15486573wij.0 for ; Tue, 04 Aug 2015 10:26:26 -0700 (PDT) References: <1438593291-27109-1-git-send-email-alex.bennee@linaro.org> <1438593291-27109-10-git-send-email-alex.bennee@linaro.org> <55C0CFB9.3090105@twiddle.net> From: Alex =?utf-8?Q?Benn=C3=A9e?= In-reply-to: <55C0CFB9.3090105@twiddle.net> Date: Tue, 04 Aug 2015 18:26:23 +0100 Message-ID: <87bnenkls0.fsf@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH v4 09/11] target-arm: dfilter support for in_asm, op, opt_op List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Richard Henderson Cc: Peter Maydell , qemu-trivial@nongnu.org, qemu-devel@nongnu.org, crosthwaitepeter@gmail.com, pbonzini@redhat.com, aurelien@aurel32.net Richard Henderson writes: > On 08/03/2015 02:14 AM, Alex Bennée wrote: >> Each individual architecture needs to use the qemu_log_in_addr_range() >> feature for enabling in_asm and marking blocks for op/opt_op output. >> >> Signed-off-by: Alex Bennée >> --- >> target-arm/translate-a64.c | 6 ++++-- >> target-arm/translate.c | 6 ++++-- >> 2 files changed, 8 insertions(+), 4 deletions(-) >> >> diff --git a/target-arm/translate-a64.c b/target-arm/translate-a64.c >> index 689f2be..0b0f4ae 100644 >> --- a/target-arm/translate-a64.c >> +++ b/target-arm/translate-a64.c >> @@ -11026,7 +11026,8 @@ void gen_intermediate_code_internal_a64(ARMCPU *cpu, >> gen_io_start(); >> } >> >> - if (unlikely(qemu_loglevel_mask(CPU_LOG_TB_OP | CPU_LOG_TB_OP_OPT))) { >> + if (unlikely(qemu_loglevel_mask(CPU_LOG_TB_OP | CPU_LOG_TB_OP_OPT) && >> + qemu_log_in_addr_range(dc->pc))) { >> tcg_gen_debug_insn_start(dc->pc); >> } > > If there's more than one or two ranges, it's probably quicker to > generate the debug opcode regardless of the range. Remember, this > check is happening once per insn, not once per tb. Maybe I should hoist the check up to the start of a block? This would mean we would dump all instructions in a block even if they went past the end-point but the reverse case is probably just confusing. We'll still not dump anything that starts outside the range. > > > r~ -- Alex Bennée