Skip to contentSkip to conversation

perf tool: add example to perf-trace documentation

PATCH Superseded Ramkumar Ramachandra 1 participant 1 message Oct 2, 2013 perf events

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 perf tool: add example to perf-trace documentation

It's not clear that perf trace must be run as a privileged user, so include an example demonstrating its usage with sudo. While at it, update the synopsis to include options.

Cc Ingo Molnar <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc Arnaldo Carvalho de Melo <[email protected]>
Cc David Ahern <[email protected]>
---
 tools/perf/Documentation/perf-trace.txt | 22 +++++++++++++++++++++-
 1 file changed, 21 insertions(+), 1 deletion(-)
tools/perf/Documentation/perf-trace.txt +21 -1
index daccd2c..4ad8950 100644
@@ -8,7 +8,7 @@ perf-trace - strace inspired tool
 SYNOPSIS
 --------
 [verse]
-'perf trace'
+'perf trace' [<options>]
 
 DESCRIPTION
 -----------
@@ -78,6 +78,26 @@ the thread executes on the designated CPUs. Default is to monitor all CPUs.
 --input
 	Process events from a given perf data file.
 
+EXAMPLES
+--------
+
+$ sudo perf trace -a -e open
+
+   349.934 ( 0.012 ms): 832 open(filename: 0xc1a4f0, flags: RDONLY                                ) = 14
+   349.985 ( 0.004 ms): 832 open(filename: 0xb390e0, flags: RDONLY                                ) = 14
+   350.012 ( 0.004 ms): 832 open(filename: 0xa9c930, flags: RDONLY                                ) = 14
+   350.037 ( 0.003 ms): 832 open(filename: 0xc1a4f0, flags: RDONLY                                ) = 14
+   350.060 ( 0.003 ms): 832 open(filename: 0xb390e0, flags: RDONLY                                ) = 14
+   349.943 ( 0.010 ms): 9379 open(filename: 0x17d3080, flags: RDONLY                               ) = 19
+   350.213 ( 0.003 ms): 832 open(filename: 0xc93d10, flags: RDONLY                                ) = 14
+   350.307 ( 0.002 ms): 832 open(filename: 0xc64820, flags: RDONLY                                ) = 14
+   350.399 ( 0.002 ms): 832 open(filename: 0xea20f0, flags: RDONLY                                ) = 14
+   350.481 ( 0.002 ms): 832 open(filename: 0xbfb940, flags: RDONLY                                ) = 14
+   350.567 ( 0.002 ms): 832 open(filename: 0xb3edb0, flags: RDONLY                                ) = 14
+   850.345 ( 0.010 ms): 832 open(filename: 0xb72ba0, flags: RDONLY                                ) = 14
+   850.390 ( 0.003 ms): 832 open(filename: 0xfd8860, flags: RDONLY                                ) = 14
+   850.414 ( 0.003 ms): 832 open(filename: 0xee4740, flags: RDONLY                                ) = 14
+
 SEE ALSO
 --------
 linkperf:perf-record[1], linkperf:perf-script[1]
Signature · 1 line
1.8.4.477.g5d89aa9