Skip to contentSkip to conversation

perf probe: Fix examples section of documentation

PATCH In review SeongJae Park 5 participants 5 messages May 7, 2017 – Jun 8, 2017 perf events

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 perf probe: Fix examples section of documentation

An example in perf-probe documentation for pattern of function name based probe addition is not providing example command for the case. This commit fixes the example to give appropriate example command.

---
 tools/perf/Documentation/perf-probe.txt | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
tools/perf/Documentation/perf-probe.txt +6 -2
index e6c9902c6d82..165c2b1d4317 100644
@@ -240,9 +240,13 @@ Add a probe on schedule() function 12th line with recording cpu local variable:
  or
  ./perf probe --add='schedule:12 cpu'
 
- this will add one or more probes which has the name start with "schedule".
+Add one or more probes which has the name start with "schedule".
 
- Add probes on lines in schedule() function which calls update_rq_clock().
+ ./perf probe schedule*
+ or
+ ./perf probe --add='schedule*'
+
+Add probes on lines in schedule() function which calls update_rq_clock().
 
  ./perf probe 'schedule;update_rq_clock*'
  or
Signature · 1 line
2.12.0
#1 lore raw

Hi SeongJae,

Nice to see you :)

Quoted 20 lines · SeongJae Park

An example in perf-probe documentation for pattern of function name based probe addition is not providing example command for the case. This commit fixes the example to give appropriate example command.

---
 tools/perf/Documentation/perf-probe.txt | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
tools/perf/Documentation/perf-probe.txt +1 -1
index e6c9902c6d82..165c2b1d4317 100644
@@ -240,9 +240,13 @@ Add a probe on schedule() function 12th line with recording cpu local variable:
  or
  ./perf probe --add='schedule:12 cpu'
 
- this will add one or more probes which has the name start with "schedule".
+Add one or more probes which has the name start with "schedule".

tools/perf/Documentation/perf-probe.txt Add a probe on schedule() function 12th line with recording cpu local variable: · line 252

Quoted 10 lines
tools/perf/Documentation/perf-probe.txt +5 -1
 
- Add probes on lines in schedule() function which calls update_rq_clock().
+ ./perf probe schedule*
+ or
+ ./perf probe --add='schedule*'
+
+Add probes on lines in schedule() function which calls update_rq_clock().
 
  ./perf probe 'schedule;update_rq_clock*'
  or

LGTM
As a nitpick, it would be better to add "Fixes:" such as:

Fixes ee391de876ae ("perf probe: Update perf probe document")

And I added Cc: Masami Hiramatsu related to the line you modified and Cc: other developers who can review this.

Thanks,
Taeung

Acked-by on v1 1/1
#2 lore raw
In reply to SeongJae Park
Quoted 5 lines · On Sun, 7 May 2017 19:36:42 +0900 SeongJae Park <[email protected]> wrote:

An example in perf-probe documentation for pattern of function name based probe addition is not providing example command for the case. This commit fixes the example to give appropriate example command.

Good catch!

Thank you!

Quoted 27 lines
---
 tools/perf/Documentation/perf-probe.txt | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
tools/perf/Documentation/perf-probe.txt +6 -2
index e6c9902c6d82..165c2b1d4317 100644
@@ -240,9 +240,13 @@ Add a probe on schedule() function 12th line with recording cpu local variable:
  or
  ./perf probe --add='schedule:12 cpu'
 
- this will add one or more probes which has the name start with "schedule".
+Add one or more probes which has the name start with "schedule".
 
- Add probes on lines in schedule() function which calls update_rq_clock().
+ ./perf probe schedule*
+ or
+ ./perf probe --add='schedule*'
+
+Add probes on lines in schedule() function which calls update_rq_clock().
 
  ./perf probe 'schedule;update_rq_clock*'
  or
Signature · 1 line
2.12.0
Signature · 1 line
Masami Hiramatsu <[email protected]>
#3 lore raw

Em Tue, May 09, 2017 at 12:19:57AM +0900, Masami Hiramatsu escreveu:

Quoted 7 lines
Quoted 4 lines · On Sun, 7 May 2017 19:36:42 +0900 SeongJae Park <[email protected]> wrote:

An example in perf-probe documentation for pattern of function name based probe addition is not providing example command for the case. This commit fixes the example to give appropriate example command.

Quoted 5 lines
Quoted 1 line

Good catch!

Thanks, I added the suggested Fixes: tag,

- Arnaldo

Quoted 33 lines

Thank you!

Quoted 27 lines
---
 tools/perf/Documentation/perf-probe.txt | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
tools/perf/Documentation/perf-probe.txt +6 -2
index e6c9902c6d82..165c2b1d4317 100644
@@ -240,9 +240,13 @@ Add a probe on schedule() function 12th line with recording cpu local variable:
  or
  ./perf probe --add='schedule:12 cpu'
 
- this will add one or more probes which has the name start with "schedule".
+Add one or more probes which has the name start with "schedule".
 
- Add probes on lines in schedule() function which calls update_rq_clock().
+ ./perf probe schedule*
+ or
+ ./perf probe --add='schedule*'
+
+Add probes on lines in schedule() function which calls update_rq_clock().
 
  ./perf probe 'schedule;update_rq_clock*'
  or
Signature · 1 line
2.12.0
Signature · 1 line
Masami Hiramatsu <[email protected]>
#4 lore raw
In reply to SeongJae Park
perf probe: Fix examples section of documentation
Commit-ID:  d89269a89ebb6a74512f3f40e89cd12017f60a75
Gitweb:     http://git.kernel.org/tip/d89269a89ebb6a74512f3f40e89cd12017f60a75
Author:     SeongJae Park <[email protected]>
AuthorDate: Sun, 7 May 2017 19:36:42 +0900
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Wed, 7 Jun 2017 20:23:11 -0300

perf probe: Fix examples section of documentation

An example in perf-probe documentation for pattern of function name based probe addition is not providing example command for that case.

This commit fixes the example to give appropriate example command.

Cc Peter Zijlstra <[email protected]>
Cc Taeung Song <[email protected]>
Fixes ee391de876ae ("perf probe: Update perf probe document")
---
 tools/perf/Documentation/perf-probe.txt | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
tools/perf/Documentation/perf-probe.txt +6 -2
index e6c9902..165c2b1 100644
@@ -240,9 +240,13 @@ Add a probe on schedule() function 12th line with recording cpu local variable:
  or
  ./perf probe --add='schedule:12 cpu'
 
- this will add one or more probes which has the name start with "schedule".
+Add one or more probes which has the name start with "schedule".
 
- Add probes on lines in schedule() function which calls update_rq_clock().
+ ./perf probe schedule*
+ or
+ ./perf probe --add='schedule*'
+
+Add probes on lines in schedule() function which calls update_rq_clock().
 
  ./perf probe 'schedule;update_rq_clock*'
  or