qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Add minimal Hexagon target - First in a series of patches -


From: Laurent Vivier
Subject: Re: [PATCH] Add minimal Hexagon target - First in a series of patches - linux-user changes + linux-user/hexagon + skeleton of target/hexagon - Files in target/hexagon/imported are from another project and therefore do not conform to qemu coding standards
Date: Wed, 20 Nov 2019 09:33:44 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.1

Le 20/11/2019 à 05:48, Taylor Simpson a écrit :
> For the general DEBUG_HEX messages, I think the trace infrastructure isn't 
> quite what I'm looking for.
> 
> Here's a sample of what it prints
> Start packet: pc = 0x4002f0
> Packet committed: pc = 0x4002f0
> Regs written
>         r18 = -69420 (0xfffef0d4)
>         r19 = -69412 (0xfffef0dc)
> Stores
>         memd[0xfffef0b0] = 0 (0x0000000000000000)
> Next PC = 0x4002f8
> Exec counters: pkt = 17, insn = 24, hvx = 0
> 
> For performance, I'd like a way to disable them completely when 
> --enable-debug isn't passed to configure.  It looks like #ifdef 
> CONFIG_DEBUG_TCG will work for this.  Then, I'd like a command-line option to 
> turn them on.  The "-d exec" seems like a reasonable place.  So, the code 
> will look like this
> 
> #ifdef CONFIG_DEBUG_TCG
>     if (qemu_loglevel_maks(CPU_LOG_EXEC)) {
>         qemu_log(...);
>     }
> #endif
> 
> Please let me know if I'm on the right track here.
> 

I'm not sure CONFIG_DEBUG_TCG is the good choice (Richard should
know...), you should keep your DEBUG_HEX in this case.

But the performance impact should not be big without the #ifdef as
qemu_loglevel_maks() is a simple test and the rest of the code is not
executed (Perhaps an "unlikely(qemu_loglevel_maks(CPU_LOG_EXEC))" could
help).

Thanks,
Laurent



reply via email to

[Prev in Thread] Current Thread [Next in Thread]