trace-cmd: add trace-record.o to the python shared lib
PATCH 1/1 trace-cmd: add trace-record.o to the python shared lib
When trying to use the python library it was giving me an error about not being able to resolve tracecmd_stat_cpu. This is because we weren't linking trace-record.o to ctracecmd.so. Fix this in the makefile and now I can import trace-cmd in python properly. Thanks,
--- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Makefile +1 -1
@@ -321,7 +321,7 @@ KERNEL_SHARK_OBJS = $(TRACE_VIEW_OBJS) $(TRACE_GRAPH_OBJS) $(TRACE_GUI_OBJS) \ PEVENT_LIB_OBJS = event-parse.o trace-seq.o parse-filter.o parse-utils.o TCMD_LIB_OBJS = $(PEVENT_LIB_OBJS) trace-util.o trace-input.o trace-ftrace.o \ trace-output.o trace-recorder.o trace-restore.o trace-usage.o \ - trace-blk-hack.o kbuffer-parse.o event-plugin.o + trace-blk-hack.o kbuffer-parse.o event-plugin.o trace-record.o PLUGIN_OBJS = PLUGIN_OBJS += plugin_jbd2.o
Signature · 1 line
1.8.3.1
Cc'd my python gurus.
Acks?
-- Steve
Quoted 23 lines · On Mon, 21 Jul 2014 16:50:44 -0400 Josef Bacik <[email protected]> wrote:
When trying to use the python library it was giving me an error about not being able to resolve
tracecmd_stat_cpu. This is because we weren't linking trace-record.o to ctracecmd.so. Fix this in the makefile and now I can import trace-cmd in python properly. Thanks,Signed-off-by Josef Bacik <[email protected]>--- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)Makefile +1
-1@@ -321,7 +321,7 @@ KERNEL_SHARK_OBJS = $(TRACE_VIEW_OBJS) $(TRACE_GRAPH_OBJS) $(TRACE_GUI_OBJS) \ PEVENT_LIB_OBJS = event-parse.o trace-seq.o parse-filter.o parse-utils.o TCMD_LIB_OBJS = $(PEVENT_LIB_OBJS) trace-util.o trace-input.o trace-ftrace.o \ trace-output.o trace-recorder.o trace-restore.o trace-usage.o \ - trace-blk-hack.o kbuffer-parse.o event-plugin.o + trace-blk-hack.o kbuffer-parse.o event-plugin.o trace-record.o PLUGIN_OBJS = PLUGIN_OBJS += plugin_jbd2.o
Quoted 8 lines · Steven Rostedt
Cc'd my python gurus.
Acks?
Quoted 4 lines
When trying to use the python library it was giving me an error about not being able to resolve
tracecmd_stat_cpu. This is because we weren't linking trace-record.o to ctracecmd.so. Fix this in the makefile and now I can import trace-cmd in python properly. Thanks,
I guess, I don't see anything wrong with that. I don't usually use ctracecmd.so standalone, only as part of trace-cmd, which may explain why I didn't see any problem?
johannes
Quoted 5 lines · Johannes Berg
Quoted 3 lines · Steven Rostedt
Cc'd my python gurus.
Acks?
Quoted 9 lines
Quoted 4 lines
Quoted 4 lines
When trying to use the python library it was giving me an error about not being able to resolve
tracecmd_stat_cpu. This is because we weren't linking trace-record.o to ctracecmd.so. Fix this in the makefile and now I can import trace-cmd in python properly. Thanks,I guess, I don't see anything wrong with that. I don't usually use ctracecmd.so standalone, only as part of trace-cmd, which may explain why I didn't see any problem?
Maybe? I'm not sure how it worked for you, with just a normal install I can load up python and import tracecmd and it blows up immediately. This is pointing at the /usr/local/lib/trace-cmd/python stuff, not using it from trace-cmd directly. Steve can you take these two patches so I can close out my internal stuff? I don't like carrying patches I can't point at an upstream commit for. Thanks,
Josef