aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/Makefile
diff options
context:
space:
mode:
authorTom Zanussi <tzanussi@gmail.com>2009-11-25 02:15:50 -0500
committerIngo Molnar <mingo@elte.hu>2009-11-28 04:04:27 -0500
commitd1b93772be78486397693fc39d3ddea3fda90105 (patch)
treefc4387cf44de336e655d03ee488a83cadde22e04 /tools/perf/Makefile
parentbcefe12eff5dca6fdfa94ed85e5bee66380d5cd9 (diff)
perf trace: Add interface to access perf data from Perl handlers
The Perl scripting support for perf trace allows most of a trace event's data to be accessed directly as handler arguments, but not all of it e.g. the less common fields aren't passed in. To give scripts access to the other fields and/or any other data or metadata in the main perf executable that might be useful, a way to access the C data in perf from Perl is needed; this patch uses the Perl XS facility to do it for the common_xxx event fields not passed to handler functions. Context.pm exports three functions to Perl scripts that access fields for the current event by calling back into perf: common_pc(), common_flags() and common_lock_depth(). Support for common_flags() field values was added to Core.pm and a script used to sanity check these and other basic scripting features, check-perf-trace.pl, was also added. Signed-off-by: Tom Zanussi <tzanussi@gmail.com> Cc: fweisbec@gmail.com Cc: rostedt@goodmis.org Cc: anton@samba.org Cc: hch@infradead.org LKML-Reference: <1259133352-23685-6-git-send-email-tzanussi@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/Makefile')
-rw-r--r--tools/perf/Makefile6
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index efbc0e864212..8ad57b51d648 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -497,6 +497,7 @@ ifneq ($(shell sh -c "(echo '\#include <EXTERN.h>'; echo '\#include <perl.h>'; e
497 BASIC_CFLAGS += -DNO_LIBPERL 497 BASIC_CFLAGS += -DNO_LIBPERL
498else 498else
499 ALL_LDFLAGS += $(PERL_EMBED_LDOPTS) 499 ALL_LDFLAGS += $(PERL_EMBED_LDOPTS)
500 LIB_OBJS += scripts/perl/Perf-Trace-Util/Context.o
500endif 501endif
501 502
502ifdef NO_DEMANGLE 503ifdef NO_DEMANGLE
@@ -873,6 +874,9 @@ util/find_next_bit.o: ../../lib/find_next_bit.c PERF-CFLAGS
873util/trace-event-perl.o: util/trace-event-perl.c PERF-CFLAGS 874util/trace-event-perl.o: util/trace-event-perl.c PERF-CFLAGS
874 $(QUIET_CC)$(CC) -o util/trace-event-perl.o -c $(ALL_CFLAGS) $(PERL_EMBED_CCOPTS) -Wno-redundant-decls -Wno-strict-prototypes -Wno-unused-parameter $< 875 $(QUIET_CC)$(CC) -o util/trace-event-perl.o -c $(ALL_CFLAGS) $(PERL_EMBED_CCOPTS) -Wno-redundant-decls -Wno-strict-prototypes -Wno-unused-parameter $<
875 876
877scripts/perl/Perf-Trace-Util/Context.o: scripts/perl/Perf-Trace-Util/Context.c PERF-CFLAGS
878 $(QUIET_CC)$(CC) -o scripts/perl/Perf-Trace-Util/Context.o -c $(ALL_CFLAGS) $(PERL_EMBED_CCOPTS) -Wno-redundant-decls -Wno-strict-prototypes -Wno-unused-parameter -Wno-nested-externs $<
879
876perf-%$X: %.o $(PERFLIBS) 880perf-%$X: %.o $(PERFLIBS)
877 $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS) 881 $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS)
878 882
@@ -1072,7 +1076,7 @@ distclean: clean
1072# $(RM) configure 1076# $(RM) configure
1073 1077
1074clean: 1078clean:
1075 $(RM) *.o */*.o $(LIB_FILE) 1079 $(RM) *.o */*.o */*/*.o */*/*/*.o $(LIB_FILE)
1076 $(RM) $(ALL_PROGRAMS) $(BUILT_INS) perf$X 1080 $(RM) $(ALL_PROGRAMS) $(BUILT_INS) perf$X
1077 $(RM) $(TEST_PROGRAMS) 1081 $(RM) $(TEST_PROGRAMS)
1078 $(RM) *.spec *.pyc *.pyo */*.pyc */*.pyo common-cmds.h TAGS tags cscope* 1082 $(RM) *.spec *.pyc *.pyo */*.pyc */*.pyo common-cmds.h TAGS tags cscope*