Skip to contentSkip to conversation

kprobetrace,doc: shell need single quote to use $ character

PATCH RESEND In review KOSAKI Motohiro 4 participants 14 messages Jan 14, 2010 – Jan 20, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH RESEND 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.

---
 Documentation/trace/kprobetrace.txt |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
Documentation/trace/kprobetrace.txt +2 -2
index 47aabee..2be6e19 100644
@@ -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.
Signature · 9 lines
1.6.5.2



--
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/
#1 lore raw

PATCH RESEND 2/2 kprobetrace, doc: Add the explanation to remove probe points

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

---
 Documentation/trace/kprobetrace.txt |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
Documentation/trace/kprobetrace.txt +7 -0
index 2be6e19..8c88930 100644
@@ -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.
 
Signature · 1 line
1.6.5.2
#2 lore raw
In reply to KOSAKI Motohiro
Quoted 5 lines · KOSAKI Motohiro

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

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,

Quoted 24 lines
---
 Documentation/trace/kprobetrace.txt |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
Documentation/trace/kprobetrace.txt +2 -2
index 47aabee..2be6e19 100644
@@ -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.
Signature · 7 lines
Masami Hiramatsu

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

e-mail: [email protected]
#3 lore raw
Quoted 7 lines
Quoted 5 lines · KOSAKI Motohiro

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

Quoted 7 lines

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.

#4 lore raw
Quoted 9 lines · KOSAKI Motohiro
Quoted 9 lines
Quoted 5 lines · KOSAKI Motohiro

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

Hi Ingo and KOSAKI-san,

Quoted 7 lines
Quoted 5 lines

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

#5 lore raw

PATCH 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.

---

 Documentation/trace/kprobetrace.txt |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
Documentation/trace/kprobetrace.txt +2 -2
index f30978e..ab57f02 100644
@@ -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.
#6 lore raw

[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.

LKML-Reference: <[email protected]>

---
 Documentation/trace/kprobetrace.txt |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
Documentation/trace/kprobetrace.txt +2 -2
index f30978e..ab57f02 100644
@@ -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.
#7 lore raw

PATCH 2/2 kprobetrace, doc: Add the explanation to remove probe points

In reply to Ingo Molnar

From: Motohiro KOSAKI <[email protected]>

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

---

 Documentation/trace/kprobetrace.txt |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
Documentation/trace/kprobetrace.txt +7 -0
index ab57f02..a9100b2 100644
@@ -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.
 
#9 lore raw

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

Quoted 10 lines · Li Zefan
Quoted 7 lines · Masami Hiramatsu

From: Motohiro KOSAKI <[email protected]>

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

You should add your sob instead of ack. :)

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

Thank you,

Signature · 7 lines
Masami Hiramatsu

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

e-mail: [email protected]
#10 lore raw

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

Quoted 7 lines · Masami Hiramatsu
Quoted 6 lines · Li Zefan
Quoted 5 lines · Masami Hiramatsu

From: Motohiro KOSAKI <[email protected]>

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

Quoted 7 lines
Quoted 3 lines
Quoted 2 lines

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.

#11 lore raw

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

In reply to Masami Hiramatsu
Quoted 6 lines · Masami Hiramatsu

From: Motohiro KOSAKI <[email protected]>

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

Since I've delivered this patch.:-)

Quoted 36 lines

---

 Documentation/trace/kprobetrace.txt |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
Documentation/trace/kprobetrace.txt +7 -1
index ab57f02..a9100b2 100644
@@ -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/

Signature · 7 lines
Masami Hiramatsu

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

e-mail: [email protected]
#12 lore raw

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

Quoted 11 lines · Masami Hiramatsu
Quoted 6 lines · Masami Hiramatsu

From: Motohiro KOSAKI <[email protected]>

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

Since I've delivered this patch.:-)

Correct - thanks guys!

Ingo

#13 lore raw

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

In reply to Masami Hiramatsu
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.

LKML-Reference: <[email protected]>

---
 Documentation/trace/kprobetrace.txt |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
Documentation/trace/kprobetrace.txt +7 -0
index ab57f02..a9100b2 100644
@@ -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.