From: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Steven Rostedt <rostedt@goodmis.org>,
Srikar Dronamraju <srikar@linux.vnet.ibm.com>,
Ingo Molnar <mingo@elte.hu>,
Linus Torvalds <torvalds@linux-foundation.org>,
Ananth N Mavinakayanahalli <ananth@in.ibm.com>,
LKML <linux-kernel@vger.kernel.org>,
Oleg Nesterov <oleg@redhat.com>,
Christoph Hellwig <hch@infradead.org>,
Arnaldo Carvalho de Melo <acme@infradead.org>,
Anton Arapov <anton@redhat.com>,
Stephen Boyd <sboyd@codeaurora.org>,
yrl.pp-manager.tt@hitachi.com
Subject: Re: [PATCH v20] tracing: Fix kconfig warning due to a typo
Date: Wed, 09 May 2012 14:55:20 +0900 [thread overview]
Message-ID: <4FAA06C8.6050700@hitachi.com> (raw)
In-Reply-To: <1336483073.16236.37.camel@twins>
(2012/05/08 22:17), Peter Zijlstra wrote:
> On Tue, 2012-05-08 at 08:48 -0400, Steven Rostedt wrote:
>> On Tue, 2012-05-08 at 13:29 +0200, Peter Zijlstra wrote:
>>> On Tue, 2012-05-08 at 16:41 +0530, Srikar Dronamraju wrote:
>>>> + p:uprobes/p_zsh_0x46420 /bin/zsh:0x00046420 arg1=%ip arg2=%ax
>>>
>>> can you also do things like:
>>>
>>> p:uprobes/ponies /bin/zsh:foo arg1=bar
>>>
>>> when bar is either a function argument of foo (or an otherwise live
>>> variable at the probe point)?
>>>
>>> Only sampling register content is somewhat limiting, you might want to
>>> have %ax[5] + 24 for example, or a pure memory deref -- and the dwarves
>>> know where it all lives.
>>
>> But this is for the raw entry into the kernel. The kernel wont know the
>> variable name. Although perf could do that parsing for you.
>
> Ah, ok. Yes I meant for perf to do this, I overlooked it was the kernel
> input.
Right, perf-probe can provide that interface, if we can find debuginfo.
>> That said, the %ax[5] + 24 could be done in kernel, and that would be
>> useful. Does kprobes handle that?
>
> In general something like: %mr + %c * %cr + %cr would be most useful I
> think (%m - memory address, %r - register, %c - constant). Although
> maybe it needs segment registers too, dunno. Also no idea if this covers
> the addressing scope of all archs.
Would you mean SIB + displacement addressing? :)
Currently, kprobe tracer just accept [[%mr + %c] + %c] ...,
because it's a basic functionality for accessing members of
a data structure.
I see that this is not enough for the person who want to debug
kernel in machine code level.
Now I'm considering that it may be better to re-implement
internal argument parser/fetcher for supporting those kind
of memory addressing.
Thank you,
--
Masami HIRAMATSU
Software Platform Research Dept. Linux Technology Center
Hitachi, Ltd., Yokohama Research Laboratory
E-mail: masami.hiramatsu.pt@hitachi.com
next prev parent reply other threads:[~2012-05-09 5:55 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-08 11:11 [PATCH v20] tracing: Fix kconfig warning due to a typo Srikar Dronamraju
2012-05-08 11:29 ` Peter Zijlstra
2012-05-08 12:48 ` Steven Rostedt
2012-05-08 13:17 ` Peter Zijlstra
2012-05-09 5:55 ` Masami Hiramatsu [this message]
2012-05-09 10:57 ` Peter Zijlstra
2012-05-10 11:47 ` Masami Hiramatsu
2012-05-08 12:49 ` [tip:perf/uprobes] " tip-bot for Srikar Dronamraju
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=4FAA06C8.6050700@hitachi.com \
--to=masami.hiramatsu.pt@hitachi.com \
--cc=acme@infradead.org \
--cc=ananth@in.ibm.com \
--cc=anton@redhat.com \
--cc=hch@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=oleg@redhat.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=sboyd@codeaurora.org \
--cc=srikar@linux.vnet.ibm.com \
--cc=torvalds@linux-foundation.org \
--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 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.