qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] trace: fix group name generation


From: Fam Zheng
Subject: Re: [Qemu-devel] [PATCH] trace: fix group name generation
Date: Thu, 17 Nov 2016 18:00:10 +0800
User-agent: Mutt/1.7.1 (2016-10-04)

On Thu, 11/17 10:48, Greg Kurz wrote:
> On Thu, 17 Nov 2016 17:34:44 +0800
> Fam Zheng <address@hidden> wrote:
> 
> > On Thu, 11/17 10:10, Greg Kurz wrote:
> > > On Thu, 17 Nov 2016 16:07:38 +0800
> > > Fam Zheng <address@hidden> wrote:
> > >   
> > > > On Thu, 10/20 15:25, Stefan Hajnoczi wrote:  
> > > > > > 
> > > > > > I have two other patches ready to fix the current situation:
> > > > > > - one using os.getcwd() to guess the build directory
> > > > > > - one implementing --group as mentioned in my other mail
> > > > > > 
> > > > > > But the one that filters unwanted characters is a less intrusive
> > > > > > workaround.    
> > > > > 
> > > > > If Dan's patches will eliminate the issue then we can take a 
> > > > > workaround.
> > > > > 
> > > > > Any more comments about Greg's patch before I merge it?    
> > > > 
> > > > Should we include this in -rc1? I still see a build error today.
> > > > 
> > > > Fam
> > > >   
> > > 
> > > Hi Fam,
> > > 
> > > My patch was partly superseded by this commit:
> > > 
> > > commit 630b210b9abbf362905a2096c22c5eb1d6224e77
> > > Author: Stefan Weil <address@hidden>
> > > Date:   Thu Oct 13 20:29:30 2016 +0200
> > > 
> > >     Fix build for less common build directories names
> > > 
> > > which does:
> > > 
> > > -    return re.sub(r"/|-", "_", dirname)
> > > +    return re.sub(r"[^A-Za-z0-9]", "_", dirname)
> > > 
> > > What is the build error you're hitting ?  
> > 
> > The substracted parts (basedir and dirname) are different paths for 
> > out-of-tree
> > build, and the "dirname" after the nonsense substraction as fed into 
> > re.sub()
> > could still start with a number. In my case the source is at
> > 
> >     /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
> 
> My patch was addressing this as well... it is unfortunate it got dumped. :-\
> 
> I guess the following should be enough to fix your issue... but I'm no 
> tracetool
> expert and I cannot assure it doesn't break anything elsewhere...
> 
> -    return re.sub(r"[^A-Za-z0-9]", "_", dirname)
> +    return "_" + re.sub(r"[^A-Za-z0-9]", "_", dirname)

Yes that does make a workaround for me.

Fam



reply via email to

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