[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
- [Qemu-devel] [PATCH v2 0/5] trace: [tcg] Optimize per-vCPU tracing states with separate TB caches, Lluís Vilanova, 2016/09/15
- [Qemu-devel] [PATCH v2 1/5] exec: [tcg] Refactor flush of per-CPU virtual TB cache, Lluís Vilanova, 2016/09/15
- [Qemu-devel] [PATCH v2 2/5] exec: [tcg] Use multiple physical TB caches, Lluís Vilanova, 2016/09/15
- [Qemu-devel] [PATCH v2 3/5] exec: [tcg] Switch physical TB cache based on vCPU tracing state, Lluís Vilanova, 2016/09/15
- [Qemu-devel] [PATCH v2 4/5] trace: [tcg] Do not generate TCG code to trace dinamically-disabled events, Lluís Vilanova, 2016/09/15
- [Qemu-devel] [PATCH v2 5/5] trace: [tcg, trivial] Re-align generated code, Lluís Vilanova, 2016/09/15
- Re: [Qemu-devel] [PATCH v2 0/5] trace: [tcg] Optimize per-vCPU tracing states with separate TB caches, Stefan Hajnoczi, 2016/09/26