From: Arnaldo Carvalho de Melo <acme@infradead.org>
To: Ingo Molnar <mingo@elte.hu>
Cc: linux-kernel@vger.kernel.org,
Clark Williams <williams@redhat.com>,
Frederic Weisbecker <fweisbec@gmail.com>,
Mike Galbraith <efault@gmx.de>, Paul Mackerras <paulus@samba.org>,
Peter Zijlstra <peterz@infradead.org>,
Stephane Eranian <eranian@google.com>,
Tom Zanussi <tzanussi@gmail.com>
Subject: Re: [PATCH 7/7] perf tools: Initial python binding
Date: Sun, 30 Jan 2011 11:44:29 -0200 [thread overview]
Message-ID: <20110130134429.GF13616@ghostprotocols.net> (raw)
In-Reply-To: <1296339559-20914-8-git-send-email-acme@infradead.org>
Em Sat, Jan 29, 2011 at 08:19:19PM -0200, Arnaldo Carvalho de Melo escreveu:
> From: Arnaldo Carvalho de Melo <acme@redhat.com>
>
> First clarifying that this kind of binding is not a replacement or an
> equivalent to the 'perf script' way of using python with perf.
>
> The 'perf script' way is to process events and look at a given script
> for some python function that matches the events to pass each event for
> processing.
Ooops, forgot to add this to this cset, fixed it up and force pushed it
there.
- Arnaldo
diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index eedcf95..36ff73c 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -315,6 +315,7 @@ COMPAT_CFLAGS =
COMPAT_OBJS =
LIB_H =
LIB_OBJS =
+PYRF_OBJS =
SCRIPT_PERL =
SCRIPT_SH =
TEST_PROGRAMS =
@@ -324,6 +325,9 @@ SCRIPT_SH += perf-archive.sh
grep-libs = $(filter -l%,$(1))
strip-libs = $(filter-out -l%,$(1))
+pyrf: $(PYRF_OBJS)
+ python util/setup.py build --build-base='$(OUTPUT)'
+
#
# No Perl scripts right now:
#
@@ -349,7 +353,7 @@ PROGRAMS += $(OUTPUT)perf
#
# what 'all' will build and 'install' will install, in perfexecdir
-ALL_PROGRAMS = $(PROGRAMS) $(SCRIPTS)
+ALL_PROGRAMS = $(PROGRAMS) $(SCRIPTS) pyrf
# what 'all' will build but not install in perfexecdir
OTHER_PROGRAMS = $(OUTPUT)perf$X
@@ -520,6 +524,20 @@ BUILTIN_OBJS += $(OUTPUT)builtin-inject.o
PERFLIBS = $(LIB_FILE)
+# Files needed for the python binding, perf.so
+# pyrf is just an internal name needed for all those wrappers.
+# This has to be in sync with what is in the 'sources' variable in
+# tools/perf/util/setup.py
+
+PYRF_OBJS += $(OUTPUT)util/cpumap.o
+PYRF_OBJS += $(OUTPUT)util/ctype.o
+PYRF_OBJS += $(OUTPUT)util/evlist.o
+PYRF_OBJS += $(OUTPUT)util/evsel.o
+PYRF_OBJS += $(OUTPUT)util/python.o
+PYRF_OBJS += $(OUTPUT)util/thread_map.o
+PYRF_OBJS += $(OUTPUT)util/util.o
+PYRF_OBJS += $(OUTPUT)util/xyarray.o
+
#
# Platform specific tweaks
#
next prev parent reply other threads:[~2011-01-30 13:44 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-29 22:19 [GIT PULL 0/7] perf/core improvements Arnaldo Carvalho de Melo
2011-01-29 22:19 ` [PATCH 1/7] perf record: No need to check for overwrites Arnaldo Carvalho de Melo
2011-01-29 22:19 ` [PATCH 2/7] perf events: Account PERF_RECORD_LOST events in event__process Arnaldo Carvalho de Melo
2011-01-29 22:19 ` [PATCH 3/7] perf evlist: Support non overwrite mode in perf_evlist__read_on_cpu Arnaldo Carvalho de Melo
2011-01-29 22:19 ` [PATCH 4/7] perf top: Switch to non overwrite mode Arnaldo Carvalho de Melo
2011-01-29 22:19 ` [PATCH 5/7] perf tools: Rename 'struct sample_data' to 'struct perf_sample' Arnaldo Carvalho de Melo
2011-01-29 22:19 ` [PATCH 6/7] perf tools: Kill event_t typedef, use 'union perf_event' instead Arnaldo Carvalho de Melo
2011-01-29 22:19 ` [PATCH 7/7] perf tools: Initial python binding Arnaldo Carvalho de Melo
2011-01-30 0:39 ` Lucian Adrian Grijincu
2011-01-30 13:44 ` Arnaldo Carvalho de Melo [this message]
2011-01-31 10:37 ` Ingo Molnar
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=20110130134429.GF13616@ghostprotocols.net \
--to=acme@infradead.org \
--cc=efault@gmx.de \
--cc=eranian@google.com \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=paulus@samba.org \
--cc=peterz@infradead.org \
--cc=tzanussi@gmail.com \
--cc=williams@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