From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36190) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aSrlw-0005wF-Eb for qemu-devel@nongnu.org; Mon, 08 Feb 2016 14:46:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aSrls-0000oy-Dg for qemu-devel@nongnu.org; Mon, 08 Feb 2016 14:46:56 -0500 Received: from mail-wm0-x22b.google.com ([2a00:1450:400c:c09::22b]:33199) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aSrls-0000ob-0k for qemu-devel@nongnu.org; Mon, 08 Feb 2016 14:46:52 -0500 Received: by mail-wm0-x22b.google.com with SMTP id g62so147324638wme.0 for ; Mon, 08 Feb 2016 11:46:51 -0800 (PST) References: <145408497756.24960.12454249118563529425.stgit@localhost> <145408498416.24960.1155193592028104008.stgit@localhost> From: Alex =?utf-8?Q?Benn=C3=A9e?= In-reply-to: <145408498416.24960.1155193592028104008.stgit@localhost> Date: Mon, 08 Feb 2016 19:46:49 +0000 Message-ID: <87io1zvvbq.fsf@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [Qemu-arm] [PATCH v5 1/2] trace: Add support for vCPU pointers in trace events List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?utf-8?Q?Llu=C3=ADs?= Vilanova Cc: Peter Maydell , Eduardo Habkost , Richard Henderson , Stefan Hajnoczi , Anthony Green , Mark Cave-Ayland , qemu-devel@nongnu.org, Alexander Graf , Blue Swirl , Max Filippov , Michael Walle , "open list:ARM" , "open list:PowerPC" , Stefan Hajnoczi , Bastian Koppelmann , Paolo Bonzini , Guan Xuetao , Leon Alrae , Aurelien Jarno , Jia Liu Lluís Vilanova writes: > The tracing infrastructure later needs to differentiate between regular > pointers and pointers to vCPUs. > > Also changes all targets to use the new 'TCGv_cpu' type instead of the > generic 'TCGv_ptr'. As of now, the change is merely cosmetic ('TCGv_cpu' > translates into 'TCGv_ptr'), but that could change in the future to > enforce the difference. > > Signed-off-by: Lluís Vilanova > --- > include/qemu/typedefs.h | 1 + > scripts/tracetool/transform.py | 9 ++++++++- > target-alpha/translate.c | 2 +- > target-arm/translate.c | 2 +- > target-arm/translate.h | 2 +- > target-cris/translate.c | 2 +- > target-i386/translate.c | 2 +- > target-lm32/translate.c | 2 +- > target-m68k/translate.c | 2 +- > target-microblaze/translate.c | 2 +- > target-mips/translate.c | 2 +- > target-moxie/translate.c | 2 +- > target-openrisc/translate.c | 2 +- > target-ppc/translate.c | 2 +- > target-s390x/translate.c | 2 +- > target-sh4/translate.c | 2 +- > target-sparc/translate.c | 5 +++-- > target-tilegx/translate.c | 2 +- > target-tricore/translate.c | 2 +- > target-unicore32/translate.c | 2 +- > target-xtensa/translate.c | 2 +- > tcg/tcg-op.h | 2 -- > tcg/tcg.h | 6 ++++++ > trace/control.h | 3 ++- > 24 files changed, 38 insertions(+), 24 deletions(-) > > diff --git a/include/qemu/typedefs.h b/include/qemu/typedefs.h > index 78fe6e8..efbc8a9 100644 > --- a/include/qemu/typedefs.h > +++ b/include/qemu/typedefs.h > @@ -18,6 +18,7 @@ typedef struct BusState BusState; > typedef struct CharDriverState CharDriverState; > typedef struct CompatProperty CompatProperty; > typedef struct CPUAddressSpace CPUAddressSpace; > +typedef struct CPUState CPUState; > typedef struct DeviceListener DeviceListener; > typedef struct DeviceState DeviceState; > typedef struct DisplayChangeListener DisplayChangeListener; > diff --git a/scripts/tracetool/transform.py b/scripts/tracetool/transform.py > index fc5e679..8a43a4e 100644 > --- a/scripts/tracetool/transform.py > +++ b/scripts/tracetool/transform.py > @@ -6,7 +6,7 @@ Type-transformation rules. > """ > > __author__ = "Lluís Vilanova " > -__copyright__ = "Copyright 2012-2014, Lluís Vilanova " > +__copyright__ = "Copyright 2012-2016, Lluís Vilanova " > __license__ = "GPL version 2 or (at your option) any later version" > > __maintainer__ = "Stefan Hajnoczi" > @@ -74,6 +74,7 @@ TCG_2_HOST = { > "TCGv_i32": "uint32_t", > "TCGv_i64": "uint64_t", > "TCGv_ptr": "void *", > + "TCGv_cpu": "CPUState *", > None: _tcg_2_host, > } > > @@ -98,6 +99,7 @@ HOST_2_TCG = { > "uint32_t": "TCGv_i32", > "uint64_t": "TCGv_i64", > "void *" : "TCGv_ptr", > + "CPUState *": "TCGv_cpu", > None: _host_2_tcg, > } > > @@ -115,6 +117,8 @@ TCG_2_TCG_HELPER_DEF = { > +typedef TCGv_ptr TCGv_cpu; > +#if TARGET_LONG_BITS == 32 > +typedef TCGv_i32 TCGv; > +#else /* TARGET_LONG_BITS == 64 */ > +typedef TCGv_i64 TCGv; > +#endif BTW something is amiss in the encoding for these patches as checkpatch.pl barfed on: +typedef TCGv_ptr TCGv_cpu; +#if TARGET_LONG_BITS =3D=3D 32 +typedef TCGv_i32 TCGv; +#else /* TARGET_LONG_BITS =3D=3D 64 */ +typedef TCGv_i64 TCGv; +#endif It might just be your outgoing email gateway being fancy: X-MIME-Autoconverted: from 8bit to quoted-printable by roura.ac.upc.es id u0TGTjbf023394 -- Alex Bennée