qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] trace: fix generated code build break


From: Fam Zheng
Subject: Re: [Qemu-devel] [PATCH] trace: fix generated code build break
Date: Thu, 17 Nov 2016 22:22:00 +0800
User-agent: Mutt/1.7.1 (2016-10-04)

On Thu, 11/17 14:59, Greg Kurz wrote:
> If the QEMU source dir is
> 
>     /var/tmp/aaa-qemu-clone
> 
> and the build dir is
> 
>     /var/tmp/qemu-aio-poll-v2
> 
> Then I get an error as:
> 
> trace/generated-tracers.c:15950:13: error: invalid suffix "_trace_events"
>  on integer constant
>  TraceEvent *2_trace_events[] = {
>              ^
> trace/generated-tracers.c:15950:13: error: expected identifier or ‘(’ before
>  numeric constant
> trace/generated-tracers.c: In function ‘trace_2_register_events’:
> trace/generated-tracers.c:17949:32: error: invalid suffix "_trace_events" on
>  integer constant
>      trace_event_register_group(2_trace_events);
>                                 ^
> make: *** [trace/generated-tracers.o] Error 1
> 
> This patch fixes the issue.
> 
> Reported-by: Fam Zheng <address@hidden>
> Signed-off-by: Greg Kurz <address@hidden>
> ---
>  scripts/tracetool.py |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/scripts/tracetool.py b/scripts/tracetool.py
> index fe9c9e904b03..c9e47371d3c6 100755
> --- a/scripts/tracetool.py
> +++ b/scripts/tracetool.py
> @@ -70,7 +70,7 @@ def make_group_name(filename):
>  
>      if dirname == "":
>          return "common"
> -    return re.sub(r"[^A-Za-z0-9]", "_", dirname)
> +    return "_" + re.sub(r"[^A-Za-z0-9]", "_", dirname)
>  
>  def main(args):
>      global _SCRIPT
> 
> 

What make_group_name does here (returning substring of build dir based on source
dir) doesn't make sense to me at all, maybe it's because the patchset Dan is
working on was only partly merged.  But as a bandage for 2.8, it makes things
better on top of the previous attemp 630b210b9 'Fix build for less common build
directories names'. Thanks!

Tested-by: Fam Zheng <address@hidden>



reply via email to

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