[Top][All Lists]

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

Re: [Qemu-devel] [PATCH 3/6] [trivial] trace: Cosmetic changes on fast-p

From: Lluís Vilanova
Subject: Re: [Qemu-devel] [PATCH 3/6] [trivial] trace: Cosmetic changes on fast-path tracing
Date: Mon, 13 Jun 2016 15:39:31 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Paolo Bonzini writes:

> On 25/02/2016 16:03, Lluís Vilanova wrote:
>> static inline bool trace_event_get_state_dynamic(TraceEvent *ev)
>> {
>> -    int id = trace_event_get_id(ev);
>> +    TraceEventID id;
>> +    assert(ev != NULL);

> Please don't add "!= NULL" asserts.  The reason of a crash would be
> pretty obvious from the backtrace.

> In fact a NULL event is especially unlikely given that all events are
> held in an array...

Actually, I was thinking about removing all "assert(ev)" on a separate patch,
since it is very unlikely this will ever happen (and asserts are always compiled
in in QEMU).


reply via email to

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