Received: from eggs.gnu.org ([2001:4830:134:3::10]:56577) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bCS5Z-0000dU-F9 for qemu-devel@nongnu.org; Mon, 13 Jun 2016 09:39:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bCS5V-0006yu-AF for qemu-devel@nongnu.org; Mon, 13 Jun 2016 09:39:37 -0400 Received: from roura.ac.upc.es ([147.83.33.10]:44712) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bCS5U-0006ye-TV for qemu-devel@nongnu.org; Mon, 13 Jun 2016 09:39:33 -0400 From: =?utf-8?Q?Llu=C3=ADs_Vilanova?= References: <145641255678.30097.2919142707547689749.stgit@localhost> <145641258053.30097.3350702281012819654.stgit@localhost> Date: Mon, 13 Jun 2016 15:39:31 +0200 In-Reply-To: (Paolo Bonzini's message of "Mon, 13 Jun 2016 11:04:35 +0200") Message-ID: <87inxd8ay4.fsf@fimbulvetr.bsc.es> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 3/6] [trivial] trace: Cosmetic changes on fast-path tracing List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-devel@nongnu.org, Eduardo Habkost , Stefan Hajnoczi Paolo Bonzini writes: > On 25/02/2016 16:03, Llu=C3=ADs Vilanova wrote: >> static inline bool trace_event_get_state_dynamic(TraceEvent *ev) >> { >> - int id =3D trace_event_get_id(ev); >> + TraceEventID id; >> + assert(ev !=3D NULL); > Please don't add "!=3D 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 patc= h, since it is very unlikely this will ever happen (and asserts are always com= piled in in QEMU). Thanks, Lluis