This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: [PATCH tracing/kprobes 0/7] tracing/kprobes: kprobe-based event tracer update and perf support
- From: Frederic Weisbecker <fweisbec at gmail dot com>
- To: Masami Hiramatsu <mhiramat at redhat dot com>
- Cc: Steven Rostedt <rostedt at goodmis dot org>, Ingo Molnar <mingo at elte dot hu>, lkml <linux-kernel at vger dot kernel dot org>, Ananth N Mavinakayanahalli <ananth at in dot ibm dot com>, Andi Kleen <ak at linux dot intel dot com>, Christoph Hellwig <hch at infradead dot org>, "Frank Ch. Eigler" <fche at redhat dot com>, "H. Peter Anvin" <hpa at zytor dot com>, Jason Baron <jbaron at redhat dot com>, Jim Keniston <jkenisto at us dot ibm dot com>, "K.Prasad" <prasad at linux dot vnet dot ibm dot com>, Lai Jiangshan <laijs at cn dot fujitsu dot com>, Li Zefan <lizf at cn dot fujitsu dot com>, Peter Zijlstra <peterz at infradead dot org>, Srikar Dronamraju <srikar at linux dot vnet dot ibm dot com>, Tom Zanussi <tzanussi at gmail dot com>, systemtap <systemtap at sources dot redhat dot com>, DLE <dle-develop at lists dot sourceforge dot net>
- Date: Mon, 14 Sep 2009 23:09:35 +0200
- Subject: Re: [PATCH tracing/kprobes 0/7] tracing/kprobes: kprobe-based event tracer update and perf support
- References: <20090910235258.22412.29317.stgit@dhcp-100-2-132.bos.redhat.com> <20090911013332.GB16396@nowhere> <4AAA74D2.9060203@redhat.com> <20090914025949.GB14306@nowhere> <4AAE7A5D.8010503@redhat.com> <20090914205250.GG6045@nowhere> <4AAEB149.2070300@redhat.com>
On Mon, Sep 14, 2009 at 05:10:33PM -0400, Masami Hiramatsu wrote:
> Frederic Weisbecker wrote:
>> On Mon, Sep 14, 2009 at 01:16:13PM -0400, Masami Hiramatsu wrote:
>>> Frederic Weisbecker wrote:
>>>> On Fri, Sep 11, 2009 at 12:03:30PM -0400, Masami Hiramatsu wrote:
>>>>> Frederic Weisbecker wrote:
>>>>>> May be another step in the todo-list that would be nice: define the format
>>>>>> for a type. Like it's done from ftrace events.
>>>>>
>>>>> Thanks!
>>>>>
>>>>> BTW, I'm not sure what the type means. Each event already has its own
>>>>> event ID and event_call. Could you tell me which part of ftrace I should
>>>>> refer to ?
>>>>>
>>>>
>>>>
>>>> Actually I meant the format for a field.
>>>> Say you define filename=arg1, it would be nice to have
>>>>
>>>> print "%s", filename
>>>>
>>>> in the format file.
>>>
>>> Ah, indeed. It is better to support 'type' casting for each argument.
>>> I think type casting can be done as below syntax.
>>>
>>> NAME=ARG:TYPE
>>> e.g.
>>> jiffies64=@jiffies64:u64
>>> message=%ax:str
>>>
>>
>>
>> Yeah looks good!
>>
>>
>>
>>>> Hmm, now that I think about it, we can't dereference an array...for now :-)
>>>
>>> :-)
>>> BTW, currently, an entry of the array can be shown, e.g. +10(sa).
>>> Hmm, for more complex dereference(e.g. accessing a->b[a->c]), it might need
>>> another dereferencing syntax(e.g. "sa[16][sa[8]]"), or
>>> just allow to use braces(e.g. "+(+8(sa))(+16(sa))").
>>
>>
>> Well, that may be too much complexity.
>> I guess if we want multi level dereference, say you want a->b->c
>> it should be sufficient to probe the point where b->c gets it's
>> value (if any).
>>
>> But it would be nice to fetch a range: sa[begin:end]
>> Or at least just giving the length of the range.
>
> Hmm, I think it is better to treat the range as a type, because
> we don't know how to express each entry without the type.
>
> NAME=ARG:TYPE[LEN]
> e.g.
> regs=sa:u64[16]
>
Yeah indeed, and that fits well in the NAME=ARG:TYPE logic
that you have suggested.