All of lore.kernel.org
 help / color / mirror / Atom feed
From: He Kuang <hekuang@huawei.com>
To: Jiri Olsa <jolsa@redhat.com>, hekuang <hekuang@zoho.com>
Cc: <acme@kernel.org>, <jolsa@kernel.org>, <mingo@redhat.com>,
	<a.p.zijlstra@chello.nl>, <wangnan0@huawei.com>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 1/2] tools lib traceevent: Export dynamic symbols used by traceevent plugins
Date: Thu, 14 May 2015 20:56:15 +0800	[thread overview]
Message-ID: <55549B6F.3030701@huawei.com> (raw)
In-Reply-To: <20150513145049.GF25652@krava.redhat.com>

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 +0000, 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)
>>>> +$(OUTPUT)perf: $(PERFLIBS) $(PERF_IN) $(LIBTRACEEVENT_DYNAMIC_LIST)
>>>> +	$(QUIET_LINK)$(CC) $(CFLAGS) $(LDFLAGS) $(LD_LIBTRACEEVENT_FLAGS) $(PERF_IN) $(LIBS) -o $@
>>>>   $(GTK_IN): FORCE
>>>>   	$(Q)$(MAKE) $(build)=gtk
>>>> @@ -373,7 +375,13 @@ $(LIB_FILE): $(LIBPERF_IN)
>>>>   LIBTRACEEVENT_FLAGS += plugin_dir=$(plugindir_SQ)
>>>>   $(LIBTRACEEVENT): FORCE
>>>> -	$(Q)$(MAKE) -C $(TRACE_EVENT_DIR) $(LIBTRACEEVENT_FLAGS) O=$(OUTPUT) $(OUTPUT)libtraceevent.a plugins
>>>> +	$(Q)$(MAKE) -C $(TRACE_EVENT_DIR) $(LIBTRACEEVENT_FLAGS) O=$(OUTPUT) $(OUTPUT)libtraceevent.a
>>>> +
>>>> +libtraceevent_plugins: FORCE
>>>> +	$(Q)$(MAKE) -C $(TRACE_EVENT_DIR) $(LIBTRACEEVENT_FLAGS) O=$(OUTPUT) plugins
>>>> +
>>>> +$(LIBTRACEEVENT_DYNAMIC_LIST): libtraceevent_plugins
>>>> +	$(Q)$(MAKE) -C $(TRACE_EVENT_DIR) $(LIBTRACEEVENT_FLAGS) O=$(OUTPUT) $(OUTPUT)libtraceevent-dynamic-list
>>> I thought the idea of v2 was not to introduce new target,
>>> something like in attached patch (not completely tested)
>>>
>>> jirka
>>
>> There is a problem, the target perf executable is dependent on
>> the dynamic-list-file, so we should add plugins or the
>> dynamic-list-file to perf's dependencies.
>>
>> As your patch below, the dynamic-list-file is built implictly
>> when building plugins, so we should not add it directly to the
>> dependency list of perf.
>>
>> 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 steps:

$ touch ../lib/traceevent/plugin_function.c
$ make
   CC       plugin_function.o
   LD       plugin_function-in.o
   LINK     plugin_function.so
   GEN      libtraceevent-dynamic-list

perf is not rebuilt. There should be a 'GEN perf', right?

>
> jirka
>


  reply	other threads:[~2015-05-14 12:57 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-12  6:41 [PATCH v2 1/2] tools lib traceevent: Export dynamic symbols used by traceevent plugins He Kuang
2015-05-12  6:41 ` [PATCH v2 2/2] tools lib traceevent: Ignore libtrace-dynamic-list file He Kuang
2015-05-12 12:37 ` [PATCH v2 1/2] tools lib traceevent: Export dynamic symbols used by traceevent plugins Jiri Olsa
2015-05-12 15:25   ` hekuang
2015-05-13 14:50     ` Jiri Olsa
2015-05-14 12:56       ` He Kuang [this message]
2015-05-14 13:31         ` Jiri Olsa
2015-05-15  8:01           ` He Kuang
2015-05-14 13:33 ` Jiri Olsa

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=55549B6F.3030701@huawei.com \
    --to=hekuang@huawei.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@kernel.org \
    --cc=hekuang@zoho.com \
    --cc=jolsa@kernel.org \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=wangnan0@huawei.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.