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
prefix=/usr all
Package gtk+-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gtk+-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gtk+-2.0' found
Makefile:515: GTK2 not found, disables GTK2 support. Please install
gtk2-devel or libgtk2.0-dev
PERF_VERSION = 3.5.0-0.rc0.git4.1.fc18.x86_64
Package gtk+-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gtk+-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gtk+-2.0' found
Makefile:515: GTK2 not found, disables GTK2 support. Please install
gtk2-devel or libgtk2.0-dev
* new build flags or prefix
make[1]: warning: jobserver unavailable: using -j1. Add `+' to parent
make rule.
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
util/scripting-engines/trace-event-perl.c: In function
'perl_process_tracepoint':
util/scripting-engines/trace-event-perl.c:282:34: error: dereferencing
pointer to incomplete type
util/scripting-engines/trace-event-perl.c:282:49: error: dereferencing
pointer to incomplete type
util/scripting-engines/trace-event-perl.c:303:20: error: dereferencing
pointer to incomplete type
util/scripting-engines/trace-event-perl.c: In function
'perl_generate_script':
util/scripting-engines/trace-event-perl.c:494:2: warning: passing
argument 1 of 'trace_find_next_event' from incompatible pointer type
[enabled by default]
In file included from util/scripting-engines/trace-event-perl.c:32:0:
util/scripting-engines/../trace-event.h:56:22: note: expected 'struct
event_format *' but argument is of type 'struct event *'
util/scripting-engines/trace-event-perl.c:494:16: warning: assignment
from incompatible pointer type [enabled by default]
util/scripting-engines/trace-event-perl.c:495:40: error: dereferencing
pointer to incomplete type
util/scripting-engines/trace-event-perl.c:495:55: error: dereferencing
pointer to incomplete type
util/scripting-engines/trace-event-perl.c:509:17: error: dereferencing
pointer to incomplete type
util/scripting-engines/trace-event-perl.c:528:17: error: dereferencing
pointer to incomplete type
util/scripting-engines/trace-event-perl.c:552:17: error: dereferencing
pointer to incomplete type
util/scripting-engines/trace-event-perl.c:565:37: error: dereferencing
pointer to incomplete type
util/scripting-engines/trace-event-perl.c:566:11: error: dereferencing
pointer to incomplete type
util/scripting-engines/trace-event-perl.c:575:37: error: dereferencing
pointer to incomplete type
util/scripting-engines/trace-event-perl.c:576:11: error: dereferencing
pointer to incomplete type
make: *** [util/scripting-engines/trace-event-perl.o] Error 1
make: *** Waiting for unfinished jobs....
/home/jwboyer/kernel/kernel-3.4.fc18/linux-3.5.0-0.rc0.git4.1.fc18.x86_64/tools/lib/traceevent/parse-filter.c:
In function 'create_arg_item':
/home/jwboyer/kernel/kernel-3.4.fc18/linux-3.5.0-0.rc0.git4.1.fc18.x86_64/tools/lib/traceevent/parse-filter.c:343:9:
warning: comparison between 'enum filter_arg_type' and 'enum event_type'
[-Wenum-compare]
/home/jwboyer/kernel/kernel-3.4.fc18/linux-3.5.0-0.rc0.git4.1.fc18.x86_64/tools/lib/traceevent/parse-filter.c:339:2:
warning: case value '8' not in enumerated type 'enum filter_arg_type'
[-Wswitch]
error: Bad exit status from /var/tmp/rpm-tmp.WBR9jG (%build)
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 <[email protected]>
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 <[email protected]>
---
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;
>
>
>
Em Wed, May 23, 2012 at 10:33:05AM -0400, Josh Boyer escreveu:
> 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.
I reported this to Fr?d?ric, that fixed it, I merged on my perf/core
branch, that Ingo already pulled, thanks anyway,
- Arnaldo
On Wed, May 23, 2012 at 02:13:14PM -0300, Arnaldo Carvalho de Melo wrote:
> Em Wed, May 23, 2012 at 10:33:05AM -0400, Josh Boyer escreveu:
> > 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.
>
> I reported this to Fr?d?ric, that fixed it, I merged on my perf/core
> branch, that Ingo already pulled, thanks anyway,
Oh good. And that's headed to Linus' tree soon?
josh
Em Wed, May 23, 2012 at 01:15:08PM -0400, Josh Boyer escreveu:
> On Wed, May 23, 2012 at 02:13:14PM -0300, Arnaldo Carvalho de Melo wrote:
> > Em Wed, May 23, 2012 at 10:33:05AM -0400, Josh Boyer escreveu:
> > > 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.
> >
> > I reported this to Fr?d?ric, that fixed it, I merged on my perf/core
> > branch, that Ingo already pulled, thanks anyway,
>
> Oh good. And that's headed to Linus' tree soon?
I guess so.
- Arnaldo