From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33263) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zn1Al-0004va-H5 for qemu-devel@nongnu.org; Fri, 16 Oct 2015 05:19:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zn1Ai-0003JE-AF for qemu-devel@nongnu.org; Fri, 16 Oct 2015 05:19:35 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60297) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zn1Ai-0003Iv-60 for qemu-devel@nongnu.org; Fri, 16 Oct 2015 05:19:32 -0400 Date: Fri, 16 Oct 2015 11:19:29 +0200 From: Stefan Hajnoczi Message-ID: <20151016091929.GG7432@stefanha-thinkpad.redhat.com> References: <20151013171020.21325.27626.stgit@localhost> <20151013171107.21325.37133.stgit@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <20151013171107.21325.37133.stgit@localhost> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCHv18/8] trace: [tcg] Add per-vCPU tracing states for events with the 'vcpu' property List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?iso-8859-1?Q?Llu=EDs?= Vilanova Cc: Stefan Hajnoczi , qemu-devel@nongnu.org, Markus Armbruster , Gerd Hoffmann , Andreas =?iso-8859-1?Q?F=E4rber?= On Tue, Oct 13, 2015 at 07:11:07PM +0200, Llu=EDs Vilanova wrote: > diff --git a/trace/control-internal.h b/trace/control-internal.h > index 70e55df..b4069e3 100644 > --- a/trace/control-internal.h > +++ b/trace/control-internal.h > @@ -12,6 +12,12 @@ > =20 > #include > =20 > +#include "qemu-common.h" > +/* GTK headers conflict with QOM's '_' */ > +#if !defined(TRACE_CPU_INCLUDE_HACK) > +#include "qom/cpu.h" > +#endif > + > =20 > extern TraceEvent trace_events[]; > =20 > @@ -63,11 +69,16 @@ static inline bool trace_event_get_state_dynamic(Tr= aceEvent *ev) > return ev->dstate; > } > =20 > -static inline void trace_event_set_state_dynamic(TraceEvent *ev, bool = state) > +static inline bool trace_event_get_cpu_state_dynamic(CPUState *cpu, > + TraceEvent *ev) > { > +#if !defined(TRACE_CPU_INCLUDE_HACK) > + assert(cpu !=3D NULL); > assert(ev !=3D NULL); > - assert(trace_event_get_state_static(ev)); > - ev->dstate =3D state; > + return cpu->tb_phys_idx & (((unsigned long)1) << ev->cpu_id); > +#else > + abort(); > +#endif > } What exactly is the header conflict?