Add patch to fix perf build

This commit is contained in:
Josh Boyer 2012-05-23 11:23:37 -04:00
parent c37235ee61
commit 0801954b57
2 changed files with 177 additions and 0 deletions

View File

@ -747,6 +747,8 @@ Patch21400: unhandled-irqs-switch-to-polling.patch
Patch21620: vgaarb-vga_default_device.patch
Patch21621: perf-Fix-trace-event-perl.c-build.patch
Patch22000: weird-root-dentry-name-debug.patch
#selinux ptrace child permissions
@ -1449,6 +1451,8 @@ ApplyPatch highbank-export-clock-functions.patch
#vgaarb patches. blame mjg59
ApplyPatch vgaarb-vga_default_device.patch
ApplyPatch perf-Fix-trace-event-perl.c-build.patch
# END OF PATCH APPLICATIONS
%endif
@ -2300,6 +2304,7 @@ fi
# || ||
%changelog
* Wed May 23 2012 Josh Boyer <jwboyer@redhat.com> - 3.5.0-0.rc0.git4.1
- Add patch to fix perf build
- Linux v3.4-4842-g61011677
* Wed May 23 2012 Dennis Gilmore <dennis@ausil.us>

View File

@ -0,0 +1,172 @@
Delivered-To: jwboyer@gmail.com
Received: by 10.229.175.203 with SMTP id bb11csp37689qcb;
Wed, 23 May 2012 07:33:41 -0700 (PDT)
Received: by 10.68.134.1 with SMTP id pg1mr319034pbb.1.1337783620495;
Wed, 23 May 2012 07:33:40 -0700 (PDT)
Return-Path: <linux-kernel-owner@vger.kernel.org>
Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67])
by mx.google.com with ESMTP id qb6si2574804pbb.317.2012.05.23.07.33.39;
Wed, 23 May 2012 07:33:40 -0700 (PDT)
Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67;
Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mail=linux-kernel-owner@vger.kernel.org
Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
id S1756238Ab2EWOdN (ORCPT <rfc822;calvin.scott@gmail.com>
+ 99 others); Wed, 23 May 2012 10:33:13 -0400
Received: from mx1.redhat.com ([209.132.183.28]:17128 "EHLO mx1.redhat.com"
rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
id S1755923Ab2EWOdM (ORCPT <rfc822;linux-kernel@vger.kernel.org>);
Wed, 23 May 2012 10:33:12 -0400
Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22])
by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q4NEX8KW009980
(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
Wed, 23 May 2012 10:33:08 -0400
Received: from zod.bos.redhat.com (ovpn-113-71.phx2.redhat.com [10.3.113.71])
by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q4NEX5le017375
(version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO);
Wed, 23 May 2012 10:33:07 -0400
Date: Wed, 23 May 2012 10:33:05 -0400
From: Josh Boyer <jwboyer@redhat.com>
To: Steven Rostedt <srostedt@redhat.com>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Ingo Molnar <mingo@redhat.com>,
Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Perf build failure in v3.4-4842-g61011677
Message-ID: <20120523143304.GF1143@zod.bos.redhat.com>
References: <20120523141359.GE1143@zod.bos.redhat.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20120523141359.GE1143@zod.bos.redhat.com>
User-Agent: Mutt/1.5.21 (2010-09-15)
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22
Sender: linux-kernel-owner@vger.kernel.org
Precedence: bulk
List-ID: <linux-kernel.vger.kernel.org>
X-Mailing-List: linux-kernel@vger.kernel.org
On Wed, May 23, 2012 at 10:13:59AM -0400, Josh Boyer wrote:
> Building Linus' latest tree as of this morning results in perf being
> very unhappy. The build machine is running Fedora 17, so gcc 4.7. The
> gtk2 missing errors are fine as far as I'm concerned, but the rest of
> the errors seem like things that might want fixing?
>
> josh
>
> + make -j8 -C tools/perf -s V=1 WERROR=0 HAVE_CPLUS_DEMANGLE=1
<snip>
> util/scripting-engines/trace-event-perl.c: In function
> 'define_event_symbols':
> util/scripting-engines/trace-event-perl.c:188:2: warning: enumeration
> value 'PRINT_BSTRING' not handled in switch [-Wswitch-enum]
> util/scripting-engines/trace-event-perl.c:188:2: warning: enumeration
> value 'PRINT_DYNAMIC_ARRAY' not handled in switch [-Wswitch-enum]
> util/scripting-engines/trace-event-perl.c:188:2: warning: enumeration
> value 'PRINT_FUNC' not handled in switch [-Wswitch-enum]
> util/scripting-engines/trace-event-perl.c: In function
> 'find_cache_event':
> util/scripting-engines/trace-event-perl.c:240:23: warning: assignment
> from incompatible pointer type [enabled by default]
> util/scripting-engines/trace-event-perl.c:244:34: error: dereferencing
> pointer to incomplete type
> util/scripting-engines/trace-event-perl.c:244:49: error: dereferencing
> pointer to incomplete type
> util/scripting-engines/trace-event-perl.c:246:44: error: dereferencing
> pointer to incomplete type
<snip>
OK, seems Steven fixed the trace-event-python.c file with commit
aaf045f7233, but missed the perl one. This patch seems to fixup the
errors.
josh
-----
From: Josh Boyer <jwboyer@redhat.com>
Subject: [PATCH] perf: Fix trace-event-perl.c build
Commit aaf045f7233 (perf: Have perf use the new libtraceevent.a library)
converted the trace-event-python.c scripting engine but missed the
trace-event-perl.c file. Fix it up to use the event_format structure
and clean up a few enum warnings from GCC.
Signed-off-by: Josh Boyer <jwboyer@redhat.com>
---
diff --git a/tools/perf/util/scripting-engines/trace-event-perl.c b/tools/perf/util/scripting-engines/trace-event-perl.c
index e30749e..b1ac27b 100644
--- a/tools/perf/util/scripting-engines/trace-event-perl.c
+++ b/tools/perf/util/scripting-engines/trace-event-perl.c
@@ -56,7 +56,7 @@ INTERP my_perl;
#define FTRACE_MAX_EVENT \
((1 << (sizeof(unsigned short) * 8)) - 1)
-struct event *events[FTRACE_MAX_EVENT];
+struct event_format *events[FTRACE_MAX_EVENT];
extern struct scripting_context *scripting_context;
@@ -181,7 +181,7 @@ static void define_flag_field(const char *ev_name,
LEAVE;
}
-static void define_event_symbols(struct event *event,
+static void define_event_symbols(struct event_format *event,
const char *ev_name,
struct print_arg *args)
{
@@ -221,6 +221,9 @@ static void define_event_symbols(struct event *event,
define_event_symbols(event, ev_name, args->op.right);
break;
default:
+ case PRINT_BSTRING:
+ case PRINT_DYNAMIC_ARRAY:
+ case PRINT_FUNC:
/* we should warn... */
return;
}
@@ -229,10 +232,10 @@ static void define_event_symbols(struct event *event,
define_event_symbols(event, ev_name, args->next);
}
-static inline struct event *find_cache_event(int type)
+static inline struct event_format *find_cache_event(int type)
{
static char ev_name[256];
- struct event *event;
+ struct event_format *event;
if (events[type])
return events[type];
@@ -258,7 +261,7 @@ static void perl_process_tracepoint(union perf_event *pevent __unused,
static char handler[256];
unsigned long long val;
unsigned long s, ns;
- struct event *event;
+ struct event_format *event;
int type;
int pid;
int cpu = sample->cpu;
@@ -446,7 +449,7 @@ static int perl_stop_script(void)
static int perl_generate_script(const char *outfile)
{
- struct event *event = NULL;
+ struct event_format *event = NULL;
struct format_field *f;
char fname[PATH_MAX];
int not_first, count;
>
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/