qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2 4/5] trace: [tcg] Do not generate TCG code to


From: Lluís Vilanova
Subject: Re: [Qemu-devel] [PATCH v2 4/5] trace: [tcg] Do not generate TCG code to trace dinamically-disabled events
Date: Mon, 26 Sep 2016 18:12:55 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Stefan Hajnoczi writes:

> On Thu, Sep 15, 2016 at 05:50:58PM +0200, Lluís Vilanova wrote:
> In the subject line:
> s/dinamically-disabled/dynamically/

>> for e in events:
>> +        # tracer without checks
>> +        out('',
>> +            'static inline void __nocheck__%(api)s(%(args)s)',

> In QEMU we avoid using double underscore since that part of the
> namespace is reserved according to the C standard:

> "7.1.3 Reserved identifiers
> [...]
> All identifiers that begin with an underscore and either an uppercase
> letter or another underscore are always reserved for any use."

Oops! It's one of those rules I always forget about (being used to reading it on
other codebases). I'll use a single underscore then.

I was also recommending Daniel to prefix some symbols with a double underscore
in his modular trace refactoring to make it more explicit they should not be
used directly. In his case, they are uppercase names, so I'm not sure what's the
appropriate way to go there. Daniel: change it to something like this?

  QEMU_EVENT = "_event_{NAME}"

Then "ev.api(ev.QEMU_EVENT)" would generate:

  TraceEvent _event_QEMU_MEMALIGN = {...};


Thanks,
  Lluis



reply via email to

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