Re: [PATCH v2 1/2] tools lib traceevent: Export dynamic symbols used by traceevent plugins

2015-05-15 Thread He Kuang
On 2015/5/14 21:31, Jiri Olsa wrote: On Thu, May 14, 2015 at 08:56:15PM +0800, He Kuang wrote: SNIP It seems new targets are needed. In the v2 patch, hum, I dont get it.. why ? dynamic-list-file gets rebuilt any time plugins are rebuilt.. why not keep just the 'plugins' dependency? You

Re: [PATCH v2 1/2] tools lib traceevent: Export dynamic symbols used by traceevent plugins

2015-05-15 Thread He Kuang
On 2015/5/14 21:31, Jiri Olsa wrote: On Thu, May 14, 2015 at 08:56:15PM +0800, He Kuang wrote: SNIP It seems new targets are needed. In the v2 patch, hum, I dont get it.. why ? dynamic-list-file gets rebuilt any time plugins are rebuilt.. why not keep just the 'plugins' dependency? You

Re: [PATCH v2 1/2] tools lib traceevent: Export dynamic symbols used by traceevent plugins

2015-05-14 Thread Jiri Olsa
On Tue, May 12, 2015 at 06:41:56AM +, He Kuang wrote: SNIP > diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf > index 03409cc..338c426 100644 > --- a/tools/perf/Makefile.perf > +++ b/tools/perf/Makefile.perf > @@ -172,6 +172,7 @@ endif > > LIBTRACEEVENT =

Re: [PATCH v2 1/2] tools lib traceevent: Export dynamic symbols used by traceevent plugins

2015-05-14 Thread Jiri Olsa
On Thu, May 14, 2015 at 08:56:15PM +0800, He Kuang wrote: SNIP > >>It seems new targets are needed. In the v2 patch, > > > >hum, I dont get it.. why ? > > > >dynamic-list-file gets rebuilt any time plugins are rebuilt.. > >why not keep just the 'plugins' dependency? > > You can test your patch

Re: [PATCH v2 1/2] tools lib traceevent: Export dynamic symbols used by traceevent plugins

2015-05-14 Thread He Kuang
Hi, jirka On 2015/5/13 22:50, Jiri Olsa wrote: On Tue, May 12, 2015 at 11:25:45PM +0800, hekuang wrote: Hi, jirka On 05/12/2015 08:37 PM, Jiri Olsa wrote: On Tue, May 12, 2015 at 06:41:56AM +, He Kuang wrote: SNIP $(Q)$(MAKE) $(build)=perf -$(OUTPUT)perf: $(PERFLIBS)

Re: [PATCH v2 1/2] tools lib traceevent: Export dynamic symbols used by traceevent plugins

2015-05-14 Thread Jiri Olsa
On Tue, May 12, 2015 at 06:41:56AM +, He Kuang wrote: SNIP diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf index 03409cc..338c426 100644 --- a/tools/perf/Makefile.perf +++ b/tools/perf/Makefile.perf @@ -172,6 +172,7 @@ endif LIBTRACEEVENT =

Re: [PATCH v2 1/2] tools lib traceevent: Export dynamic symbols used by traceevent plugins

2015-05-14 Thread Jiri Olsa
On Thu, May 14, 2015 at 08:56:15PM +0800, He Kuang wrote: SNIP It seems new targets are needed. In the v2 patch, hum, I dont get it.. why ? dynamic-list-file gets rebuilt any time plugins are rebuilt.. why not keep just the 'plugins' dependency? You can test your patch as following

Re: [PATCH v2 1/2] tools lib traceevent: Export dynamic symbols used by traceevent plugins

2015-05-14 Thread He Kuang
Hi, jirka On 2015/5/13 22:50, Jiri Olsa wrote: On Tue, May 12, 2015 at 11:25:45PM +0800, hekuang wrote: Hi, jirka On 05/12/2015 08:37 PM, Jiri Olsa wrote: On Tue, May 12, 2015 at 06:41:56AM +, He Kuang wrote: SNIP $(Q)$(MAKE) $(build)=perf -$(OUTPUT)perf: $(PERFLIBS)

Re: [PATCH v2 1/2] tools lib traceevent: Export dynamic symbols used by traceevent plugins

2015-05-13 Thread Jiri Olsa
On Tue, May 12, 2015 at 11:25:45PM +0800, hekuang wrote: > Hi, jirka > > On 05/12/2015 08:37 PM, Jiri Olsa wrote: > >On Tue, May 12, 2015 at 06:41:56AM +, He Kuang wrote: > > > >SNIP > > > >>$(Q)$(MAKE) $(build)=perf > >>-$(OUTPUT)perf: $(PERFLIBS) $(PERF_IN) > >>- $(QUIET_LINK)$(CC)

Re: [PATCH v2 1/2] tools lib traceevent: Export dynamic symbols used by traceevent plugins

2015-05-13 Thread Jiri Olsa
On Tue, May 12, 2015 at 11:25:45PM +0800, hekuang wrote: Hi, jirka On 05/12/2015 08:37 PM, Jiri Olsa wrote: On Tue, May 12, 2015 at 06:41:56AM +, He Kuang wrote: SNIP $(Q)$(MAKE) $(build)=perf -$(OUTPUT)perf: $(PERFLIBS) $(PERF_IN) - $(QUIET_LINK)$(CC) $(CFLAGS) $(LDFLAGS)

Re: [PATCH v2 1/2] tools lib traceevent: Export dynamic symbols used by traceevent plugins

2015-05-12 Thread hekuang
Hi, jirka On 05/12/2015 08:37 PM, Jiri Olsa wrote: On Tue, May 12, 2015 at 06:41:56AM +, He Kuang wrote: SNIP $(Q)$(MAKE) $(build)=perf -$(OUTPUT)perf: $(PERFLIBS) $(PERF_IN) - $(QUIET_LINK)$(CC) $(CFLAGS) $(LDFLAGS) $(PERF_IN) $(LIBS) -o $@ +LD_LIBTRACEEVENT_FLAGS +=

Re: [PATCH v2 1/2] tools lib traceevent: Export dynamic symbols used by traceevent plugins

2015-05-12 Thread Jiri Olsa
On Tue, May 12, 2015 at 06:41:56AM +, He Kuang wrote: SNIP > $(Q)$(MAKE) $(build)=perf > > -$(OUTPUT)perf: $(PERFLIBS) $(PERF_IN) > - $(QUIET_LINK)$(CC) $(CFLAGS) $(LDFLAGS) $(PERF_IN) $(LIBS) -o $@ > +LD_LIBTRACEEVENT_FLAGS += -Xlinker >

[PATCH v2 1/2] tools lib traceevent: Export dynamic symbols used by traceevent plugins

2015-05-12 Thread He Kuang
Traceevent plugins need dynamic symbols exported from libtraceevent.a, otherwise a dlopen error will occur during plugins loading. This patch uses dynamic-list-file to export dynamic symbols which will be used in plugins to perf executable. The problem is covered up if feature-libpython is

[PATCH v2 1/2] tools lib traceevent: Export dynamic symbols used by traceevent plugins

2015-05-12 Thread He Kuang
Traceevent plugins need dynamic symbols exported from libtraceevent.a, otherwise a dlopen error will occur during plugins loading. This patch uses dynamic-list-file to export dynamic symbols which will be used in plugins to perf executable. The problem is covered up if feature-libpython is

Re: [PATCH v2 1/2] tools lib traceevent: Export dynamic symbols used by traceevent plugins

2015-05-12 Thread Jiri Olsa
On Tue, May 12, 2015 at 06:41:56AM +, He Kuang wrote: SNIP $(Q)$(MAKE) $(build)=perf -$(OUTPUT)perf: $(PERFLIBS) $(PERF_IN) - $(QUIET_LINK)$(CC) $(CFLAGS) $(LDFLAGS) $(PERF_IN) $(LIBS) -o $@ +LD_LIBTRACEEVENT_FLAGS += -Xlinker --dynamic-list=$(LIBTRACEEVENT_DYNAMIC_LIST)

Re: [PATCH v2 1/2] tools lib traceevent: Export dynamic symbols used by traceevent plugins

2015-05-12 Thread hekuang
Hi, jirka On 05/12/2015 08:37 PM, Jiri Olsa wrote: On Tue, May 12, 2015 at 06:41:56AM +, He Kuang wrote: SNIP $(Q)$(MAKE) $(build)=perf -$(OUTPUT)perf: $(PERFLIBS) $(PERF_IN) - $(QUIET_LINK)$(CC) $(CFLAGS) $(LDFLAGS) $(PERF_IN) $(LIBS) -o $@ +LD_LIBTRACEEVENT_FLAGS +=