This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: [PATCH 1/2] SDT markers listing by perf
- From: Hemant <hkshaw at linux dot vnet dot ibm dot com>
- To: Masami Hiramatsu <masami dot hiramatsu dot pt at hitachi dot com>
- Cc: Namhyung Kim <namhyung at kernel dot org>, linux-kernel at vger dot kernel dot org, srikar at linux dot vnet dot ibm dot com, peterz at infradead dot org, oleg at redhat dot com, mingo at redhat dot com, anton at redhat dot com, systemtap at sourceware dot org
- Date: Wed, 25 Sep 2013 11:33:26 +0530
- Subject: Re: [PATCH 1/2] SDT markers listing by perf
- Authentication-results: sourceware.org; auth=none
- References: <20130903072944 dot 4793 dot 93584 dot stgit at hemant-fedora> <20130903073655 dot 4793 dot 20013 dot stgit at hemant-fedora> <87ioyht7e4 dot fsf at sejong dot aot dot lge dot com> <5226E8F4 dot 5060505 at hitachi dot com> <523599C2 dot 6020204 at linux dot vnet dot ibm dot com> <5242687A dot 9030209 at hitachi dot com>
On 09/25/2013 10:07 AM, Masami Hiramatsu wrote:
> (2013/09/15 20:28), Hemant wrote:
>> Hi Masami,
> Hi, and sorry for replying so late. I missed this in my mailbox.
>
>> On 09/04/2013 01:31 PM, Masami Hiramatsu wrote:
>>> (2013/09/04 15:42), Namhyung Kim wrote:
>>>> [SNIP]
>>>> You need to add it to Documentation/perf-probe.txt too. In addition if
>>>> the --sdt option is only able to work with libelf, it should be wrapped
>>>> into the #ifdef LIBELF_SUPPORT pair.
>>>>
>>>> And I'm not sure that it's a good idea to have two behavior on a single
>>>> option (S) - show and probe (add). Maybe it can be separated into two
>>>> or the S option can be used as a flag with existing --list and --add
>>>> option?
>>>>
>>> Good catch! :)
>>> No, that is really bad idea. All probes must be added by "--add" action.
>>> So we need a new probe syntax for specifying sdt marker.
>>>
>>> How about the below syntax?
>>>
>>> [EVENT=]%PROVIDER:MARKER [ARG ...]
>>>
>>> Of course, this will require to list up all markers with "%" prefix for
>>> continuity.
>>>
>>> And since --list option is to list up all existing(defined) probe events,
>>> I think --markers (as like as --funcs) is better for listing it up.
>>>
>>> Thank you!
>>>
>> I have one doubt here. Why do we need [ARG ...] in the syntax you
>> specified? I believe these args are to fetched from the sdt notes'
>> section of the elf of the executable/library. Or am I taking this in a
>> wrong way and this suggested syntax is actually for the uprobe_events
>> file in the tracing directory?
> Hm, indeed. Since all the arguments of the marker is defined in sdt notes,
> we actually don't need to specify each of them. However, other probe syntax
> has those arguments. I'd like to keep the same syntax style in the
> same command (action) for avoiding confusion.
Hmm, got it.
> I recommend this way; at the first step, we just find the marker address from
> sdt. And next, we will make the argument available. And eventually,
> it is better to introduce "$args" meta argument to fetch all the arguments
> of the marker.
>
> At this point, we can do
>
> perf probe %foo:bar $args
So, at first step (ignoring the arguments), we can go with :
perf probe %foo:bar
And, once, the argument support is enabled (all the arguments will be
fetched at the marker location), we can go with:
perf probe %foo:bar $args
>
> to trace full information from the marker foo:bar.
>
> Thank you,
>
--
Thanks
Hemant Kumar Shaw