2010-01-14 02:15:02

by KOSAKI Motohiro

[permalink] [raw]
Subject: [resend][PATCH 1/2] kprobetrace,doc: shell need single quote to use $ character

shell interpret $val is as shell variable. thus we need quote if
we use echo command.

Signed-off-by: KOSAKI Motohiro <[email protected]>
Acked-by: Masami Hiramatsu <[email protected]>
---
Documentation/trace/kprobetrace.txt | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/trace/kprobetrace.txt b/Documentation/trace/kprobetrace.txt
index 47aabee..2be6e19 100644
--- a/Documentation/trace/kprobetrace.txt
+++ b/Documentation/trace/kprobetrace.txt
@@ -82,13 +82,13 @@ Usage examples
To add a probe as a new event, write a new definition to kprobe_events
as below.

- echo p:myprobe do_sys_open dfd=$arg0 filename=$arg1 flags=$arg2 mode=$arg3 > /sys/kernel/debug/tracing/kprobe_events
+ echo 'p:myprobe do_sys_open dfd=$arg0 filename=$arg1 flags=$arg2 mode=$arg3' > /sys/kernel/debug/tracing/kprobe_events

This sets a kprobe on the top of do_sys_open() function with recording
1st to 4th arguments as "myprobe" event. As this example shows, users can
choose more familiar names for each arguments.

- echo r:myretprobe do_sys_open $retval >> /sys/kernel/debug/tracing/kprobe_events
+ echo 'r:myretprobe do_sys_open $retval' >> /sys/kernel/debug/tracing/kprobe_events

This sets a kretprobe on the return point of do_sys_open() function with
recording return value as "myretprobe" event.
--
1.6.5.2



2010-01-14 02:16:22

by KOSAKI Motohiro

[permalink] [raw]
Subject: [resend][PATCH 2/2] kprobetrace, doc: Add the explanation to remove probe points

Latest kprobetrace can remove probe points selectively. thus
documentation should be updated too.

Signed-off-by: KOSAKI Motohiro <[email protected]>
Acked-by: Masami Hiramatsu <[email protected]>
---
Documentation/trace/kprobetrace.txt | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/Documentation/trace/kprobetrace.txt b/Documentation/trace/kprobetrace.txt
index 2be6e19..8c88930 100644
--- a/Documentation/trace/kprobetrace.txt
+++ b/Documentation/trace/kprobetrace.txt
@@ -24,6 +24,7 @@ Synopsis of kprobe_events
-------------------------
p[:[GRP/]EVENT] SYMBOL[+offs]|MEMADDR [FETCHARGS] : Set a probe
r[:[GRP/]EVENT] SYMBOL[+0] [FETCHARGS] : Set a return probe
+ -:[GRP/]EVENT : Clear a probe

GRP : Group name. If omitted, use "kprobes" for it.
EVENT : Event name. If omitted, the event name is generated
@@ -121,6 +122,12 @@ print fmt: "(%lx) dfd=%lx filename=%lx flags=%lx mode=%lx", REC->ip, REC->dfd, R

This clears all probe points.

+ Or,
+
+ echo -:myprobe >> kprobe_events
+
+ This clears probe points selectively.
+
Right after definition, each event is disabled by default. For tracing these
events, you need to enable it.

--
1.6.5.2



2010-01-14 04:57:53

by Masami Hiramatsu

[permalink] [raw]
Subject: Re: [resend][PATCH 1/2] kprobetrace,doc: shell need single quote to use $ character

KOSAKI Motohiro wrote:
> shell interpret $val is as shell variable. thus we need quote if
> we use echo command.
>
> Signed-off-by: KOSAKI Motohiro <[email protected]>
> Acked-by: Masami Hiramatsu <[email protected]>

Hi Ingo and KOSAKI-san,

Sorry, now this patch conflicts with my patch(commit 1464010) on the
latest -tip tree. The patch drops $argN support, so I updated the
1st example command.

Thank you,

> ---
> Documentation/trace/kprobetrace.txt | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/Documentation/trace/kprobetrace.txt b/Documentation/trace/kprobetrace.txt
> index 47aabee..2be6e19 100644
> --- a/Documentation/trace/kprobetrace.txt
> +++ b/Documentation/trace/kprobetrace.txt
> @@ -82,13 +82,13 @@ Usage examples
> To add a probe as a new event, write a new definition to kprobe_events
> as below.
>
> - echo p:myprobe do_sys_open dfd=$arg0 filename=$arg1 flags=$arg2 mode=$arg3 > /sys/kernel/debug/tracing/kprobe_events
> + echo 'p:myprobe do_sys_open dfd=$arg0 filename=$arg1 flags=$arg2 mode=$arg3' > /sys/kernel/debug/tracing/kprobe_events
>
> This sets a kprobe on the top of do_sys_open() function with recording
> 1st to 4th arguments as "myprobe" event. As this example shows, users can
> choose more familiar names for each arguments.
>
> - echo r:myretprobe do_sys_open $retval >> /sys/kernel/debug/tracing/kprobe_events
> + echo 'r:myretprobe do_sys_open $retval' >> /sys/kernel/debug/tracing/kprobe_events
>
> This sets a kretprobe on the return point of do_sys_open() function with
> recording return value as "myretprobe" event.

--
Masami Hiramatsu

Software Engineer
Hitachi Computer Products (America), Inc.
Software Solutions Division

e-mail: [email protected]

2010-01-14 05:17:18

by KOSAKI Motohiro

[permalink] [raw]
Subject: Re: [resend][PATCH 1/2] kprobetrace,doc: shell need single quote to use $ character

> KOSAKI Motohiro wrote:
> > shell interpret $val is as shell variable. thus we need quote if
> > we use echo command.
> >
> > Signed-off-by: KOSAKI Motohiro <[email protected]>
> > Acked-by: Masami Hiramatsu <[email protected]>
>
> Hi Ingo and KOSAKI-san,
>
> Sorry, now this patch conflicts with my patch(commit 1464010) on the
> latest -tip tree. The patch drops $argN support, so I updated the
> 1st example command.
>
> Thank you,

Oh, I'm sorry. I didn't notice that.


2010-01-17 07:14:34

by Ingo Molnar

[permalink] [raw]
Subject: Re: [resend][PATCH 1/2] kprobetrace,doc: shell need single quote to use $ character

* KOSAKI Motohiro <[email protected]> wrote:

> > KOSAKI Motohiro wrote:
> > > shell interpret $val is as shell variable. thus we need quote if
> > > we use echo command.
> > >
> > > Signed-off-by: KOSAKI Motohiro <[email protected]>
> > > Acked-by: Masami Hiramatsu <[email protected]>
> >
> > Hi Ingo and KOSAKI-san,
> >
> > Sorry, now this patch conflicts with my patch(commit 1464010) on the
> > latest -tip tree. The patch drops $argN support, so I updated the
> > 1st example command.
> >
> > Thank you,
>
> Oh, I'm sorry. I didn't notice that.

Mind resending a version with the patch conflicts resolved?

Thanks,

Ingo

2010-01-19 02:34:38

by Masami Hiramatsu

[permalink] [raw]
Subject: [PATCH -tip 2/2] kprobetrace, doc: Add the explanation to remove probe points

From: Motohiro KOSAKI <[email protected]>

Latest kprobetrace can remove probe points selectively. thus
documentation should be updated too.

Signed-off-by: KOSAKI Motohiro <[email protected]>
Acked-by: Masami Hiramatsu <[email protected]>
---

Documentation/trace/kprobetrace.txt | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/Documentation/trace/kprobetrace.txt b/Documentation/trace/kprobetrace.txt
index ab57f02..a9100b2 100644
--- a/Documentation/trace/kprobetrace.txt
+++ b/Documentation/trace/kprobetrace.txt
@@ -24,6 +24,7 @@ Synopsis of kprobe_events
-------------------------
p[:[GRP/]EVENT] SYMBOL[+offs]|MEMADDR [FETCHARGS] : Set a probe
r[:[GRP/]EVENT] SYMBOL[+0] [FETCHARGS] : Set a return probe
+ -:[GRP/]EVENT : Clear a probe

GRP : Group name. If omitted, use "kprobes" for it.
EVENT : Event name. If omitted, the event name is generated
@@ -122,6 +123,12 @@ REC->dfd, REC->filename, REC->flags, REC->mode

This clears all probe points.

+ Or,
+
+ echo -:myprobe >> kprobe_events
+
+ This clears probe points selectively.
+
Right after definition, each event is disabled by default. For tracing these
events, you need to enable it.

2010-01-19 02:34:49

by Masami Hiramatsu

[permalink] [raw]
Subject: [PATCH -tip 1/2] kprobetrace, doc: shell need single quote to use $ character

From: Motohiro KOSAKI <[email protected]>

shell interpret $val is as shell variable. thus we need quote if
we use echo command.

Signed-off-by: KOSAKI Motohiro <[email protected]>
Signed-off-by: Masami Hiramatsu <[email protected]>
---

Documentation/trace/kprobetrace.txt | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/trace/kprobetrace.txt b/Documentation/trace/kprobetrace.txt
index f30978e..ab57f02 100644
--- a/Documentation/trace/kprobetrace.txt
+++ b/Documentation/trace/kprobetrace.txt
@@ -79,7 +79,7 @@ Usage examples
To add a probe as a new event, write a new definition to kprobe_events
as below.

- echo p:myprobe do_sys_open dfd=%ax filename=%dx flags=%cx mode=+4($stack) > /sys/kernel/debug/tracing/kprobe_events
+ echo 'p:myprobe do_sys_open dfd=%ax filename=%dx flags=%cx mode=+4($stack)' > /sys/kernel/debug/tracing/kprobe_events

This sets a kprobe on the top of do_sys_open() function with recording
1st to 4th arguments as "myprobe" event. Note, which register/stack entry is
@@ -88,7 +88,7 @@ the ABI, please try to use probe subcommand of perf-tools (you can find it
under tools/perf/).
As this example shows, users can choose more familiar names for each arguments.

- echo r:myretprobe do_sys_open $retval >> /sys/kernel/debug/tracing/kprobe_events
+ echo 'r:myretprobe do_sys_open $retval' >> /sys/kernel/debug/tracing/kprobe_events

This sets a kretprobe on the return point of do_sys_open() function with
recording return value as "myretprobe" event.

2010-01-19 02:45:55

by Li Zefan

[permalink] [raw]
Subject: Re: [PATCH -tip 2/2] kprobetrace, doc: Add the explanation to remove probe points

Masami Hiramatsu wrote:
> From: Motohiro KOSAKI <[email protected]>
>
> Latest kprobetrace can remove probe points selectively. thus
> documentation should be updated too.
>
> Signed-off-by: KOSAKI Motohiro <[email protected]>
> Acked-by: Masami Hiramatsu <[email protected]>

You should add your sob instead of ack. :)

2010-01-19 03:02:30

by Masami Hiramatsu

[permalink] [raw]
Subject: Re: [PATCH -tip 2/2] kprobetrace, doc: Add the explanation to remove probe points

Li Zefan wrote:
> Masami Hiramatsu wrote:
>> From: Motohiro KOSAKI <[email protected]>
>>
>> Latest kprobetrace can remove probe points selectively. thus
>> documentation should be updated too.
>>
>> Signed-off-by: KOSAKI Motohiro <[email protected]>
>> Acked-by: Masami Hiramatsu <[email protected]>
>
> You should add your sob instead of ack. :)

Ah, I didn't change anything on this patch.
Just resent :-)

Thank you,

--
Masami Hiramatsu

Software Engineer
Hitachi Computer Products (America), Inc.
Software Solutions Division

e-mail: [email protected]

2010-01-19 03:05:22

by Li Zefan

[permalink] [raw]
Subject: Re: [PATCH -tip 2/2] kprobetrace, doc: Add the explanation to remove probe points

Masami Hiramatsu wrote:
> Li Zefan wrote:
>> Masami Hiramatsu wrote:
>>> From: Motohiro KOSAKI <[email protected]>
>>>
>>> Latest kprobetrace can remove probe points selectively. thus
>>> documentation should be updated too.
>>>
>>> Signed-off-by: KOSAKI Motohiro <[email protected]>
>>> Acked-by: Masami Hiramatsu <[email protected]>
>> You should add your sob instead of ack. :)
>
> Ah, I didn't change anything on this patch.
> Just resent :-)
>

Still you should add your sob, since you are delivering the patch,
Andrew one reminded me on this. Also you can refer to
Documentation/SubmittingPatches:

The Signed-off-by: tag indicates that the signer was involved in the
development of the patch, or that he/she was in the patch's delivery path.

2010-01-19 04:20:09

by Masami Hiramatsu

[permalink] [raw]
Subject: Re: [PATCH -tip 2/2] kprobetrace, doc: Add the explanation to remove probe points

Masami Hiramatsu wrote:
> From: Motohiro KOSAKI <[email protected]>
>
> Latest kprobetrace can remove probe points selectively. thus
> documentation should be updated too.
>
> Signed-off-by: KOSAKI Motohiro <[email protected]>

Signed-off-by: Masami Hiramatsu <[email protected]>

Since I've delivered this patch.:-)

> ---
>
> Documentation/trace/kprobetrace.txt | 7 +++++++
> 1 files changed, 7 insertions(+), 0 deletions(-)
>
> diff --git a/Documentation/trace/kprobetrace.txt b/Documentation/trace/kprobetrace.txt
> index ab57f02..a9100b2 100644
> --- a/Documentation/trace/kprobetrace.txt
> +++ b/Documentation/trace/kprobetrace.txt
> @@ -24,6 +24,7 @@ Synopsis of kprobe_events
> -------------------------
> p[:[GRP/]EVENT] SYMBOL[+offs]|MEMADDR [FETCHARGS] : Set a probe
> r[:[GRP/]EVENT] SYMBOL[+0] [FETCHARGS] : Set a return probe
> + -:[GRP/]EVENT : Clear a probe
>
> GRP : Group name. If omitted, use "kprobes" for it.
> EVENT : Event name. If omitted, the event name is generated
> @@ -122,6 +123,12 @@ REC->dfd, REC->filename, REC->flags, REC->mode
>
> This clears all probe points.
>
> + Or,
> +
> + echo -:myprobe >> kprobe_events
> +
> + This clears probe points selectively.
> +
> Right after definition, each event is disabled by default. For tracing these
> events, you need to enable it.
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/

--
Masami Hiramatsu

Software Engineer
Hitachi Computer Products (America), Inc.
Software Solutions Division

e-mail: [email protected]

2010-01-20 06:19:26

by Ingo Molnar

[permalink] [raw]
Subject: Re: [PATCH -tip 2/2] kprobetrace, doc: Add the explanation to remove probe points


* Masami Hiramatsu <[email protected]> wrote:

> Masami Hiramatsu wrote:
> > From: Motohiro KOSAKI <[email protected]>
> >
> > Latest kprobetrace can remove probe points selectively. thus
> > documentation should be updated too.
> >
> > Signed-off-by: KOSAKI Motohiro <[email protected]>
>
> Signed-off-by: Masami Hiramatsu <[email protected]>
>
> Since I've delivered this patch.:-)

Correct - thanks guys!

Ingo

2010-01-20 07:14:35

by KOSAKI Motohiro

[permalink] [raw]
Subject: [tip:perf/core] kprobetrace, doc: Shell needs single quote to use $ character

Commit-ID: 580d9e00fdfb85e65c5097dcd739c6efcdbadc96
Gitweb: http://git.kernel.org/tip/580d9e00fdfb85e65c5097dcd739c6efcdbadc96
Author: Motohiro KOSAKI <[email protected]>
AuthorDate: Mon, 18 Jan 2010 21:35:05 -0500
Committer: Ingo Molnar <[email protected]>
CommitDate: Wed, 20 Jan 2010 07:18:14 +0100

kprobetrace, doc: Shell needs single quote to use $ character

Shell interprets $val as shell variable, thus we need quote if
we use the echo command.

Signed-off-by: KOSAKI Motohiro <[email protected]>
Signed-off-by: Masami Hiramatsu <[email protected]>
Cc: systemtap <[email protected]>
Cc: DLE <[email protected]>
LKML-Reference: <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
---
Documentation/trace/kprobetrace.txt | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/trace/kprobetrace.txt b/Documentation/trace/kprobetrace.txt
index f30978e..ab57f02 100644
--- a/Documentation/trace/kprobetrace.txt
+++ b/Documentation/trace/kprobetrace.txt
@@ -79,7 +79,7 @@ Usage examples
To add a probe as a new event, write a new definition to kprobe_events
as below.

- echo p:myprobe do_sys_open dfd=%ax filename=%dx flags=%cx mode=+4($stack) > /sys/kernel/debug/tracing/kprobe_events
+ echo 'p:myprobe do_sys_open dfd=%ax filename=%dx flags=%cx mode=+4($stack)' > /sys/kernel/debug/tracing/kprobe_events

This sets a kprobe on the top of do_sys_open() function with recording
1st to 4th arguments as "myprobe" event. Note, which register/stack entry is
@@ -88,7 +88,7 @@ the ABI, please try to use probe subcommand of perf-tools (you can find it
under tools/perf/).
As this example shows, users can choose more familiar names for each arguments.

- echo r:myretprobe do_sys_open $retval >> /sys/kernel/debug/tracing/kprobe_events
+ echo 'r:myretprobe do_sys_open $retval' >> /sys/kernel/debug/tracing/kprobe_events

This sets a kretprobe on the return point of do_sys_open() function with
recording return value as "myretprobe" event.

2010-01-20 07:14:33

by KOSAKI Motohiro

[permalink] [raw]
Subject: [tip:perf/core] kprobetrace, doc: Add the explanation to remove probe points

Commit-ID: df3ab708b787a2b35de5101452bd51d4a8ae0ded
Gitweb: http://git.kernel.org/tip/df3ab708b787a2b35de5101452bd51d4a8ae0ded
Author: Motohiro KOSAKI <[email protected]>
AuthorDate: Mon, 18 Jan 2010 21:35:12 -0500
Committer: Ingo Molnar <[email protected]>
CommitDate: Wed, 20 Jan 2010 07:18:15 +0100

kprobetrace, doc: Add the explanation to remove probe points

Latest kprobetrace can remove probe points selectively, thus
the documentation should be updated too.

Signed-off-by: KOSAKI Motohiro <[email protected]>
Signed-off-by: Masami Hiramatsu <[email protected]>
Cc: systemtap <[email protected]>
Cc: DLE <[email protected]>
LKML-Reference: <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
---
Documentation/trace/kprobetrace.txt | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/Documentation/trace/kprobetrace.txt b/Documentation/trace/kprobetrace.txt
index ab57f02..a9100b2 100644
--- a/Documentation/trace/kprobetrace.txt
+++ b/Documentation/trace/kprobetrace.txt
@@ -24,6 +24,7 @@ Synopsis of kprobe_events
-------------------------
p[:[GRP/]EVENT] SYMBOL[+offs]|MEMADDR [FETCHARGS] : Set a probe
r[:[GRP/]EVENT] SYMBOL[+0] [FETCHARGS] : Set a return probe
+ -:[GRP/]EVENT : Clear a probe

GRP : Group name. If omitted, use "kprobes" for it.
EVENT : Event name. If omitted, the event name is generated
@@ -122,6 +123,12 @@ REC->dfd, REC->filename, REC->flags, REC->mode

This clears all probe points.

+ Or,
+
+ echo -:myprobe >> kprobe_events
+
+ This clears probe points selectively.
+
Right after definition, each event is disabled by default. For tracing these
events, you need to enable it.