Skip to content

Commit

Permalink
trace: fix generated code build break
Browse files Browse the repository at this point in the history
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 <famz@redhat.com>
Signed-off-by: Greg Kurz <groug@kaod.org>
Tested-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
  • Loading branch information
gkurz authored and stefanhaRH committed Nov 18, 2016
1 parent b0bcc86 commit d4f7ca5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/tracetool.py
Expand Up @@ -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
Expand Down

0 comments on commit d4f7ca5

Please sign in to comment.