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 15:14:38 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.1

Le 20/11/2019 à 13:58, Taylor Simpson a écrit :
> Is there a precedent for this?  I'm OK with DEBUG_HEX, but I assumed 
> reviewers wouldn't approve
> #ifdef FIXME
> #define DEBUG_HEX
> #endif


For instance, in target/mips/translate.c you have:

     42
     43 #define MIPS_DEBUG_DISAS 0
     44
...
   2603 #define LOG_DISAS(...)  \
   2604     do { \
   2605         if (MIPS_DEBUG_DISAS) { \
   2606             qemu_log_mask(CPU_LOG_TB_IN_ASM, ## __VA_ARGS__);\
   2607         }  \
   2608     } while (0)
   2609
...

  10121     LOG_DISAS("mftr (reg %d u %d sel %d h %d)\n", rt, u, sel,
h);
...

For the linux-user part, I don't think you need the DEBUG_HEX traces.

Thanks,
Laurent
> 
> -----Original Message-----
> From: Richard Henderson <address@hidden>
> Sent: Wednesday, November 20, 2019 3:02 AM
> To: Laurent Vivier <address@hidden>; Taylor Simpson <address@hidden>; 
> Philippe Mathieu-Daudé <address@hidden>; address@hidden; address@hidden
> 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
> 
> 
> On 11/20/19 9:33 AM, Laurent Vivier wrote:
>> 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 something like this, I'd keep DEBUG_HEX.
> 
>>>     if (qemu_loglevel_maks(CPU_LOG_EXEC)) {
> 
> CPU_LOG_EXEC already has a specific structure, listing the TranslationBlocks 
> that are executed.  It shouldn't be hijacked for something else.
> 
> If you really want a runtime flag for this, we should add a new CPU_LOG_* 
> flag.
> 
> 
> r~
> 




reply via email to

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