From: Stefan Hajnoczi <stefanha@gmail.com>
To: Greg Kurz <groug@kaod.org>
Cc: Fam Zheng <famz@redhat.com>,
Peter Maydell <peter.maydell@linaro.org>,
qemu-devel@nongnu.org, Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] trace: fix group name generation
Date: Thu, 17 Nov 2016 10:05:01 +0000 [thread overview]
Message-ID: <20161117100501.GA24138@stefanha-x1.localdomain> (raw)
In-Reply-To: <20161117104834.314dc73d@bahia>
[-- Attachment #1: Type: text/plain, Size: 2903 bytes --]
On Thu, Nov 17, 2016 at 10:48:34AM +0100, Greg Kurz wrote:
> On Thu, 17 Nov 2016 17:34:44 +0800
> Fam Zheng <famz@redhat.com> wrote:
>
> > On Thu, 11/17 10:10, Greg Kurz wrote:
> > > On Thu, 17 Nov 2016 16:07:38 +0800
> > > Fam Zheng <famz@redhat.com> 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 <sw@weilnetz.de>
> > > 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)
I think that will solve the problem for QEMU 2.8. Please send a patch.
Thanks,
Stefan
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 455 bytes --]
next prev parent reply other threads:[~2016-11-17 10:05 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-14 21:26 [Qemu-devel] [PATCH] trace: fix group name generation Greg Kurz
2016-10-14 21:31 ` Eric Blake
2016-10-14 22:06 ` Greg Kurz
2016-10-15 12:03 ` Peter Maydell
2016-10-16 9:20 ` Greg Kurz
2016-10-18 15:16 ` Daniel P. Berrange
2016-10-18 15:31 ` Daniel P. Berrange
2016-10-18 15:52 ` Greg Kurz
2016-10-20 14:25 ` Stefan Hajnoczi
2016-11-17 8:07 ` Fam Zheng
2016-11-17 9:10 ` Greg Kurz
2016-11-17 9:34 ` Fam Zheng
2016-11-17 9:48 ` Greg Kurz
2016-11-17 10:00 ` Fam Zheng
2016-11-17 10:05 ` Stefan Hajnoczi [this message]
2016-10-18 15:36 ` Greg Kurz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161117100501.GA24138@stefanha-x1.localdomain \
--to=stefanha@gmail.com \
--cc=famz@redhat.com \
--cc=groug@kaod.org \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).