From: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
To: Namhyung Kim <namhyung@kernel.org>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>,
srikar@linux.vnet.ibm.com, Peter Zijlstra <peterz@infradead.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Brendan Gregg <brendan.gregg@gmail.com>,
yrl.pp-manager.tt@hitachi.com,
Hemant Kumar <hemant@linux.vnet.ibm.com>,
Ingo Molnar <mingo@kernel.org>,
Adrian Hunter <adrian.hunter@intel.com>
Subject: Re: Re: [PATCH perf/core 0/6] perf-probe: Bugfix and add new options for cache
Date: Wed, 05 Nov 2014 17:46:10 +0900 [thread overview]
Message-ID: <5459E3D2.3050106@hitachi.com> (raw)
In-Reply-To: <87h9yew4gf.fsf@sejong.aot.lge.com>
(2014/11/05 15:23), Namhyung Kim wrote:
> On Wed, 05 Nov 2014 01:22:46 +0900, Masami Hiramatsu wrote:
>> (2014/11/04 23:38), Arnaldo Carvalho de Melo wrote:
>>> Em Tue, Nov 04, 2014 at 01:36:31PM +0900, Masami Hiramatsu escreveu:
>>>> OK, I agree using .debug/.buildid/ to store caches.
>>>> Here is what I'm thinking,
>>>
>>>> # this makes caches for given pattern instead of adding probes.
>>>> perf probe --cache '* $params'
>>>
>>>> # the cache is stored in .debug/.buildid/<buildid>.probe
>>>> # the cache entry can be queried by buildid and eventname
>>>
>>> To follow the existing standard this would instead go to:
>>>
>>>> # the cache is stored in .debug/probes/path/to/dso/name/buildid
>>>> # And can be found via its buildid link .debug/.buildid/bu/ildid -> ../../probes/path/to/dso/name/buildid
>>
>> Ah, I see. so you meant adding a top-level .debug/probes/ dir.
>> But in that case, shouldn't we change .debug/.buildid/bu/ildid to
>> .debug/probes/.buildid/bu/ildid ?
>
> Either is fine to me. But my concern is that it might be bloated as
> system/package update is going on, so we need to control it somehow.
> That's why I suggested the probe-cache command.
Yes, that is also my question. Should we really have 3 cache management
commands? At the first step, maybe we can have those as separated,
but it would better be consolidated to one perf-cache command, I think.
>>>> perf probe --query ${remote_buildid}:do_fork
>>>> p:probe/do_fork _text+298722 clone_flags=%di:u64 stack_start=%si:u64 stack_size=%dx:u64 parent_tidptr=%cx:u64 child_tidptr=%r8:u64
>>>
>>>> # or perf can set it up directly to local
>>>> perf probe --query-add do_fork
>>>
>>> You missed the build id above, no? I.e. it would be:
>>>
>>>> # or perf can set it up directly to local
>>>> perf probe --query-add ${remote_buildid}:do_fork
>>
>> No, since this command set the event to local machine, perf-probe
>> should check the local build-id and query the appropriate event
>> from the cache.
>> # BTW, maybe we'd better use perf probe --add '$do_fork' (calls
>> # "cache of do_fork") instead of long --query-add. :)
>
> It should take care of uprobe case too. So simple do_fork should have
> group/event or provider/marker form instead so that it can help to find
> which binary defines the cached event. Maybe we also need to keep a
> event-to-binary table and then check (current?) build-id somehow to
> identify correct event to be used.
>
Good catch! :)
perf probe --add '$group:event $params' # for cached event
perf probe --add '%provider[@path]:marker $params' # for SDT event
and these are automatically check the build-id.
> Also this function entry level event cache can be used with uprobes..
Yes, of course :)
Thank you,
--
Masami HIRAMATSU
Software Platform Research Dept. Linux Technology Research Center
Hitachi, Ltd., Yokohama Research Laboratory
E-mail: masami.hiramatsu.pt@hitachi.com
next prev parent reply other threads:[~2014-11-05 8:46 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-31 18:51 [PATCH perf/core 0/6] perf-probe: Bugfix and add new options for cache Masami Hiramatsu
2014-10-31 12:13 ` Arnaldo Carvalho de Melo
2014-11-03 12:11 ` Masami Hiramatsu
2014-11-03 16:19 ` Arnaldo Carvalho de Melo
2014-11-04 4:36 ` Masami Hiramatsu
2014-11-04 14:38 ` Arnaldo Carvalho de Melo
2014-11-04 16:22 ` Masami Hiramatsu
2014-11-05 6:23 ` Namhyung Kim
2014-11-05 8:46 ` Masami Hiramatsu [this message]
2014-11-05 13:04 ` Arnaldo Carvalho de Melo
2014-11-06 10:15 ` Masami Hiramatsu
2014-11-04 5:02 ` Namhyung Kim
2014-10-31 18:51 ` [PATCH perf/core 1/6] [BUGFIX] perf-probe: Fix to handle optimized not-inlined but has no instance Masami Hiramatsu
2014-10-31 18:51 ` [PATCH perf/core 2/6] [DOC] perf-probe: Update perf-probe document Masami Hiramatsu
2014-10-31 18:51 ` [PATCH perf/core 3/6] perf-probe: Add --output option to write commands in a standard file Masami Hiramatsu
2014-10-31 18:51 ` [PATCH perf/core 4/6] perf-probe: Add --no-inlines option to avoid searching inline functions Masami Hiramatsu
2014-10-31 18:52 ` [PATCH perf/core 5/6] perf-probe: Support $params special probe argument Masami Hiramatsu
2014-10-31 18:52 ` [PATCH perf/core 6/6] perf-probe: Support glob wildcards for function name Masami Hiramatsu
2014-11-04 3:14 ` [PATCH perf/core 0/6] perf-probe: Bugfix and add new options for cache Namhyung Kim
2014-11-04 5:44 ` Masami Hiramatsu
2014-11-05 6:09 ` Namhyung Kim
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=5459E3D2.3050106@hitachi.com \
--to=masami.hiramatsu.pt@hitachi.com \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=brendan.gregg@gmail.com \
--cc=hemant@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=srikar@linux.vnet.ibm.com \
--cc=yrl.pp-manager.tt@hitachi.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;
as well as URLs for NNTP newsgroup(s).