qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] compile failure if I enable guest_mem_before trace even


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] compile failure if I enable guest_mem_before trace event
Date: Mon, 27 Mar 2017 14:17:52 +0100
User-agent: Mutt/1.8.0 (2017-02-23)

On Thu, Mar 23, 2017 at 10:39:43PM -0400, Emilio G. Cota wrote:
> On Thu, Mar 23, 2017 at 19:08:11 +0000, Peter Maydell wrote:
> > Hi; I thought I'd have a look at the guest_mem_before trace event,
> > but if I enable it (by deleting "disable" from the line in trace-events)
> > QEMU doesn't compile:
> > 
> >   CC      arm-softmmu/tcg/tcg-op.o
> > In file included from
> > /home/petmay01/linaro/qemu-from-laptop/qemu/include/trace-tcg.h:4:0,
> >                  from
> > /home/petmay01/linaro/qemu-from-laptop/qemu/tcg/tcg-op.c:31:
> > ../trace/generated-tcg-tracers.h: In function ‘trace_guest_mem_before_tcg’:
> > ../trace/generated-tcg-tracers.h:11:5: error: implicit declaration of
> > function ‘trace_guest_mem_before_trans’
> > [-Werror=implicit-function-declaration]
> >      trace_guest_mem_before_trans(__cpu, info);
> >      ^
> > ../trace/generated-tcg-tracers.h:11:5: error: nested extern
> > declaration of ‘trace_guest_mem_before_trans’ [-Werror=nested-externs]
> > 
> > Am I doing something wrong, or is this a bug?
> 
> It doesn't work for me either. I bisected it to:
> 
> 0ab8ed18 "trace: switch to modular code generation for sub-directories"
> 
> It seems that after that commit no appropriate include is added
> to the generated tcg tracing .h files. The 'header' variable isn't used
> in the generation scripts for TCG, which is suspicious, e.g.:
> 
> --- a/scripts/tracetool/format/tcg_h.py
> +++ b/scripts/tracetool/format/tcg_h.py
> @@ -28,13 +28,17 @@ def vcpu_transform_args(args):
> 
> 
>  def generate(events, backend, group):
> +    if group == "root":
> +        header = "trace-root.h"
> +    else:
> +        header = "trace.h"
> +
>      out('/* This file is autogenerated by tracetool, do not edit. */',
>          '/* You must include this file after the inclusion of helper.h */',
>          '',
>          '#ifndef TRACE_%s_GENERATED_TCG_TRACERS_H' % group.upper(),
>          '#define TRACE_%s_GENERATED_TCG_TRACERS_H' % group.upper(),
>          '',
> -        '#include "trace.h"',
>          '#include "exec/helper-proto.h"',
>          '',
>          )
> 
> 
> The appended fixes it for me; I hope it's enough for the tracing
> people to come quickly to a proper fix (sorry, I didn't even know
> what the tracing features were only a few minutes ago!).

Thanks for looking into this.  I have sent a patch.

Stefan

Attachment: signature.asc
Description: PGP signature


reply via email to

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