diff options
author | Darren Hart <dvhltc@us.ibm.com> | 2009-12-16 18:25:30 -0500 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2009-12-17 14:43:02 -0500 |
commit | 7e35a291ee133e918078362c15de62ccdb8087c4 (patch) | |
tree | 7a20f35c0d3f17236faf38da50b906baa65ef9e2 /Makefile | |
parent | 2c36d9bd41b3d0f4722e322ee4b062d046bf3ec5 (diff) |
trace-cmd: Start of a tracecmd swig wrapper for python
Introduce a python ctracecmd module for use in rapidly prototyping
tracing applications. The interface description is provided in
ctracecmd.i, it identifies which functions are available from within
python. A test python script is provided as tracecmd-test.py.
These bindings are expected to change significantly. Eventually I
would like to wrap this automated binding with more pythonic objects,
most likely including Trace and Event objects which merge the
functionality of tracecmd-input, pevent, record, and event structures.
This will make development of python apps much more accessible to many
application developers.
For now, this is mostly a proof of concept and is no where near
complete. It can however open a trace file and read all the events from
it, displaying them by CPU in chronological order.
V2: o Simplified interface file with SWIG ifdefs in the header files
V3: o Move attribute removal to interface file
o Remove proxy classes and rename module to ctracecmd
o Use the Makefile with a phony python target instead of swig.sh
Signed-off-by: Darren Hart <dvhltc@us.ibm.com>
LKML-Reference: <4B2A7878.6060209@us.ibm.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -83,6 +83,14 @@ plugin_mac80211.o: plugin_mac80211.c parse-events.h | |||
83 | plugin_mac80211.so: plugin_mac80211.o | 83 | plugin_mac80211.so: plugin_mac80211.o |
84 | $(CC) -shared -nostartfiles -o $@ $< | 84 | $(CC) -shared -nostartfiles -o $@ $< |
85 | 85 | ||
86 | |||
87 | .PHONY: python | ||
88 | python: $(TCMD_LIB_OBJS) trace-cmd.o trace-read.o | ||
89 | swig -Wall -python -noproxy ctracecmd.i | ||
90 | gcc -fpic -c -I/usr/include/python2.6/ -I/usr/lib/python2.6/config ctracecmd_wrap.c | ||
91 | $(CC) --shared $^ ctracecmd_wrap.o -o ctracecmd.so | ||
92 | |||
93 | |||
86 | .PHONY: force | 94 | .PHONY: force |
87 | force: | 95 | force: |
88 | 96 | ||
@@ -90,4 +98,4 @@ TAGS: force | |||
90 | find . -name '*.[ch]' | xargs etags | 98 | find . -name '*.[ch]' | xargs etags |
91 | 99 | ||
92 | clean: | 100 | clean: |
93 | $(RM) *.o *~ $(TARGETS) *.a *.so | 101 | $(RM) *.o *~ $(TARGETS) *.a *.so ctracecmd_wrap.c |