* [QUESTION] Can uprobe_event support @ADDR, $retval, offs(FETCHARG)?
@ 2012-09-26 2:52 Hyeoncheol Lee
2012-09-26 4:42 ` Srikar Dronamraju
2012-09-26 5:33 ` Masami Hiramatsu
0 siblings, 2 replies; 6+ messages in thread
From: Hyeoncheol Lee @ 2012-09-26 2:52 UTC (permalink / raw)
To: srikar; +Cc: masami.hiramatsu.pt, linux-kernel
Hi,
uprobe_event only supports %REG arguments. I think that memory fetch,
return value fetch, memory dereference functions in
kernel/trace/trace_probe.c are good for uprobe_event. So with a little
modification of parse_probe_arg(), uprobe_event can support @ADDR,
$retval, offs(FETCHARGS) except @SYM, $stack, $stackN. Is it right?
Thanks,
Hyeoncheol
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [QUESTION] Can uprobe_event support @ADDR, $retval, offs(FETCHARG)?
2012-09-26 2:52 [QUESTION] Can uprobe_event support @ADDR, $retval, offs(FETCHARG)? Hyeoncheol Lee
@ 2012-09-26 4:42 ` Srikar Dronamraju
2012-09-26 5:33 ` Masami Hiramatsu
1 sibling, 0 replies; 6+ messages in thread
From: Srikar Dronamraju @ 2012-09-26 4:42 UTC (permalink / raw)
To: Hyeoncheol Lee; +Cc: masami.hiramatsu.pt, linux-kernel
Hi Hyeoncheol,
> uprobe_event only supports %REG arguments. I think that memory fetch,
> return value fetch, memory dereference functions in
> kernel/trace/trace_probe.c are good for uprobe_event.
Yes, these will be good to have and is listed as todo.
> So with a little
> modification of parse_probe_arg(), uprobe_event can support @ADDR,
> $retval, offs(FETCHARGS) except @SYM, $stack, $stackN. Is it right?
For some of these like the @sym, trace_uprobe.c may not be the right
place because the kernel will not be able to decode user space symbols.
$retval needs uretprobes support
--
Thanks and Regards
Srikar
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [QUESTION] Can uprobe_event support @ADDR, $retval, offs(FETCHARG)?
2012-09-26 5:33 ` Masami Hiramatsu
@ 2012-09-26 5:23 ` Srikar Dronamraju
2012-09-26 7:07 ` Hyeoncheol Lee
2012-09-26 6:55 ` Hyeoncheol Lee
1 sibling, 1 reply; 6+ messages in thread
From: Srikar Dronamraju @ 2012-09-26 5:23 UTC (permalink / raw)
To: Masami Hiramatsu; +Cc: Hyeoncheol Lee, linux-kernel, yrl.pp-manager.tt
>
> Perhaps, it is not so small things, but at least, we can try.
> In the userspace, memories(pages) can be paged out on swap or
> files. In that case, memory dereference function needs to track
> down the data on the disk and it causes I/O. This means we will
> see the visible performance degradation with tracing.
> And also, sometime a pointer value (address) is broken, in that
> case we have to ensure the address is actually valid before
> accessing it.
>
> Of cause, without tracking paged-out data, it is easy
> to support, because that is already done in kprobe event.
> I'm not sure how it is useful, because sometimes it will
> fail to access gather the data.
> However it is good for the first step, I think.
>
> Srikar, what would you think?
I think we should do the best effort basis first. i.e support for
tracking data thats not paged out.
Most times the data that is requested tends to the hot data.
We could look at supporting data that is paged out later.
>
> BTW, if we can support offs(FETCHARGS), $stack and $stackN
> are also available. ;)
>
--
Thanks and Regards
Srikar Dronamraju
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [QUESTION] Can uprobe_event support @ADDR, $retval, offs(FETCHARG)?
2012-09-26 2:52 [QUESTION] Can uprobe_event support @ADDR, $retval, offs(FETCHARG)? Hyeoncheol Lee
2012-09-26 4:42 ` Srikar Dronamraju
@ 2012-09-26 5:33 ` Masami Hiramatsu
2012-09-26 5:23 ` Srikar Dronamraju
2012-09-26 6:55 ` Hyeoncheol Lee
1 sibling, 2 replies; 6+ messages in thread
From: Masami Hiramatsu @ 2012-09-26 5:33 UTC (permalink / raw)
To: Hyeoncheol Lee; +Cc: srikar, linux-kernel, yrl.pp-manager.tt
(2012/09/26 11:52), Hyeoncheol Lee wrote:
> Hi,
>
> uprobe_event only supports %REG arguments. I think that memory fetch,
> return value fetch, memory dereference functions in
> kernel/trace/trace_probe.c are good for uprobe_event. So with a little
> modification of parse_probe_arg(), uprobe_event can support @ADDR,
> $retval, offs(FETCHARGS) except @SYM, $stack, $stackN. Is it right?
Hi Hyeoncheol,
Perhaps, it is not so small things, but at least, we can try.
In the userspace, memories(pages) can be paged out on swap or
files. In that case, memory dereference function needs to track
down the data on the disk and it causes I/O. This means we will
see the visible performance degradation with tracing.
And also, sometime a pointer value (address) is broken, in that
case we have to ensure the address is actually valid before
accessing it.
Of cause, without tracking paged-out data, it is easy
to support, because that is already done in kprobe event.
I'm not sure how it is useful, because sometimes it will
fail to access gather the data.
However it is good for the first step, I think.
Srikar, what would you think?
BTW, if we can support offs(FETCHARGS), $stack and $stackN
are also available. ;)
Thank you,
--
Masami HIRAMATSU
Software Platform Research Dept. Linux Technology Center
Hitachi, Ltd., Yokohama Research Laboratory
E-mail: masami.hiramatsu.pt@hitachi.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [QUESTION] Can uprobe_event support @ADDR, $retval, offs(FETCHARG)?
2012-09-26 5:33 ` Masami Hiramatsu
2012-09-26 5:23 ` Srikar Dronamraju
@ 2012-09-26 6:55 ` Hyeoncheol Lee
1 sibling, 0 replies; 6+ messages in thread
From: Hyeoncheol Lee @ 2012-09-26 6:55 UTC (permalink / raw)
To: Masami Hiramatsu; +Cc: srikar, linux-kernel, yrl.pp-manager.tt
Hi,
2012/9/26 Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>:
> (2012/09/26 11:52), Hyeoncheol Lee wrote:
>> Hi,
>>
>> uprobe_event only supports %REG arguments. I think that memory fetch,
>> return value fetch, memory dereference functions in
>> kernel/trace/trace_probe.c are good for uprobe_event. So with a little
>> modification of parse_probe_arg(), uprobe_event can support @ADDR,
>> $retval, offs(FETCHARGS) except @SYM, $stack, $stackN. Is it right?
>
> Hi Hyeoncheol,
>
> Perhaps, it is not so small things, but at least, we can try.
> In the userspace, memories(pages) can be paged out on swap or
> files. In that case, memory dereference function needs to track
> down the data on the disk and it causes I/O. This means we will
> see the visible performance degradation with tracing.
> And also, sometime a pointer value (address) is broken, in that
> case we have to ensure the address is actually valid before
> accessing it.
>
> Of cause, without tracking paged-out data, it is easy
> to support, because that is already done in kprobe event.
> I'm not sure how it is useful, because sometimes it will
> fail to access gather the data.
> However it is good for the first step, I think.
Yes, we should consider paged-out data. I forgot this.
>
> Srikar, what would you think?
>
> BTW, if we can support offs(FETCHARGS), $stack and $stackN
> are also available. ;)
Yes, but we should check whether the given address is in an user stack
or not. and these require CPU architecture dependent codes.
>
> Thank you,
>
> --
> Masami HIRAMATSU
> Software Platform Research Dept. Linux Technology Center
> Hitachi, Ltd., Yokohama Research Laboratory
> E-mail: masami.hiramatsu.pt@hitachi.com
>
>
Thanks for your answer. It is very help to me. ;)
Hyeoncheol
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [QUESTION] Can uprobe_event support @ADDR, $retval, offs(FETCHARG)?
2012-09-26 5:23 ` Srikar Dronamraju
@ 2012-09-26 7:07 ` Hyeoncheol Lee
0 siblings, 0 replies; 6+ messages in thread
From: Hyeoncheol Lee @ 2012-09-26 7:07 UTC (permalink / raw)
To: Srikar Dronamraju; +Cc: Masami Hiramatsu, linux-kernel, yrl.pp-manager.tt
2012/9/26 Srikar Dronamraju <srikar@linux.vnet.ibm.com>:
>>
>> Perhaps, it is not so small things, but at least, we can try.
>> In the userspace, memories(pages) can be paged out on swap or
>> files. In that case, memory dereference function needs to track
>> down the data on the disk and it causes I/O. This means we will
>> see the visible performance degradation with tracing.
>> And also, sometime a pointer value (address) is broken, in that
>> case we have to ensure the address is actually valid before
>> accessing it.
>>
>> Of cause, without tracking paged-out data, it is easy
>> to support, because that is already done in kprobe event.
>> I'm not sure how it is useful, because sometimes it will
>> fail to access gather the data.
>> However it is good for the first step, I think.
>>
>> Srikar, what would you think?
>
> I think we should do the best effort basis first. i.e support for
> tracking data thats not paged out.
> Most times the data that is requested tends to the hot data.
>
> We could look at supporting data that is paged out later.
>
>>
>> BTW, if we can support offs(FETCHARGS), $stack and $stackN
>> are also available. ;)
>>
>
> --
> Thanks and Regards
> Srikar Dronamraju
>
I asked this question. because I need Perf that supports to access
user process's variables. and I am trying to add this feature.
Thank you for your answer.
Hyeoncheol
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-09-26 7:07 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-26 2:52 [QUESTION] Can uprobe_event support @ADDR, $retval, offs(FETCHARG)? Hyeoncheol Lee
2012-09-26 4:42 ` Srikar Dronamraju
2012-09-26 5:33 ` Masami Hiramatsu
2012-09-26 5:23 ` Srikar Dronamraju
2012-09-26 7:07 ` Hyeoncheol Lee
2012-09-26 6:55 ` Hyeoncheol Lee
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.