[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4ACA60E9.30404@redhat.com>
Date: Mon, 05 Oct 2009 17:11:05 -0400
From: Masami Hiramatsu <mhiramat@...hat.com>
To: Frederic Weisbecker <fweisbec@...il.com>
CC: Steven Rostedt <rostedt@...dmis.org>, Ingo Molnar <mingo@...e.hu>,
lkml <linux-kernel@...r.kernel.org>,
systemtap <systemtap@...rces.redhat.com>,
DLE <dle-develop@...ts.sourceforge.net>,
Thomas Gleixner <tglx@...utronix.de>,
Arnaldo Carvalho de Melo <acme@...hat.com>,
Mike Galbraith <efault@....de>,
Paul Mackerras <paulus@...ba.org>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Christoph Hellwig <hch@...radead.org>,
Ananth N Mavinakayanahalli <ananth@...ibm.com>,
Jim Keniston <jkenisto@...ibm.com>,
"Frank Ch. Eigler" <fche@...hat.com>
Subject: Re: [PATCH tracing/kprobes v2 1/5] tracing/kprobes: Rename special
variables syntax
Frederic Weisbecker wrote:
> On Mon, Oct 05, 2009 at 04:18:39PM -0400, Masami Hiramatsu wrote:
>> Frederic Weisbecker wrote:
>>> For the function arguments, I guess we don't need to worry
>>> anymore about r0, r1, etc... but we can deal with the true var
>>> name, without any kind of prefixes.
>>
>> This depends on ABI, function argument from ABI doesn't need
>> debuginfo, but it will be unstable on some arch, e.g. x86-32
>> with/without asmlinkage.
>>
>> Thus, I think that we can just describe where function arguments
>> will be(e.g. arg0 is ax) as a note for each architecture
>> in Documents/trace/kprobetrace.txt.
>
>
> Yeah that may help. Although everyone can look at the calling convention
> ABI for a given arch but that would still help.
>
>
>>> What about @return :-) ?
>>
>> Hmm, it might conflict with global symbol... Maybe, we can remove this
>> because retprobe already shows return address in the head of entry.
>
>
> It won't conflict since "return" is a reserved word and can't then be
> used as a symbol.
>
> But yeah, if it's an embeded field, we should remove it.
>
>
>>> What if we take the following:
>>>
>>> [Ftrace and perf probe side]
>>>
>>> %reg = registers, we can also play with deref and offsets like (%esp), 8(%esp), etc.
>>
>> Hmm, on x86-32, sp at intr context is not pointing the top of stack. actually&sp is
>> the real address of the stack :(
>> Perhaps, on x86-32, we can translate %sp to stack address in kprobe-tracer.
>
>
> Oh? You mean in the saved registers while triggering an int 3?
Yes, interrupt/exception handlers don't save sp on x86-32.
>>> arg(n) = arg number, where n is the number
>>
>> How about %N? or just adds a note in documents.
>>
>
>
> Hmm, the problem is that %1, %2, etc. is not very self-explainable.
>
> May be %arg1, %arg2, etc.. But would that sound confusing since we
> have % for registers?
As I sent right now, how about %argumentN ? it will not conflict with
register names...
Thank you,
--
Masami Hiramatsu
Software Engineer
Hitachi Computer Products (America), Inc.
Software Solutions Division
e-mail: mhiramat@...hat.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists