qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v5 1/7] scripts/qapi/gen.py: add FOO.trace-events output modu


From: Markus Armbruster
Subject: Re: [PATCH v5 1/7] scripts/qapi/gen.py: add FOO.trace-events output module
Date: Wed, 26 Jan 2022 15:32:17 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)

Stefan Hajnoczi <stefanha@redhat.com> writes:

> On Tue, Jan 25, 2022 at 10:56:49PM +0100, Vladimir Sementsov-Ogievskiy wrote:
>> @@ -264,6 +272,14 @@ def _genh(self) -> QAPIGenH:
>>          assert self._current_module is not None
>>          return self._module[self._current_module][1]
>>  
>> +    @property
>> +    def _gent(self) -> QAPIGenTrace:
>
> If you respin maybe rename this to _gentrace() or even
> _gen_trace_events() so the name is clearer (although the latter collides
> with the self._gen_trace_events field and may need to be renamed to
> enable_trace_events or similar).

We have ._genc() for .c, and ._genh() for .h.  Applying the same to
.trace-events results in ._gentrace_events, but that's ugly.

I'm okay with ._gen_trace_events().  Regarding the name collision: I
already suggested renaming attribute ._gen_trace_events to
._gen_tracing.

We might want to rename ._genc() and .genh() to .gen_c() and .gen_h()
for consistency.  Don't worry about that now.




reply via email to

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