diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-18 11:19:03 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-18 11:19:03 -0400 |
commit | 4d7b4ac22fbec1a03206c6cde353f2fd6942f828 (patch) | |
tree | 2d96a9e9c28cf6fa628a278decc00ad55a8b043b /tools/perf/Documentation/perf-trace-python.txt | |
parent | 3aaf51ace5975050ab43c7d4d7e439e0ae7d13d7 (diff) | |
parent | 94f3ca95787ada3d64339a4ecb2754236ab563f6 (diff) |
Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (311 commits)
perf tools: Add mode to build without newt support
perf symbols: symbol inconsistency message should be done only at verbose=1
perf tui: Add explicit -lslang option
perf options: Type check all the remaining OPT_ variants
perf options: Type check OPT_BOOLEAN and fix the offenders
perf options: Check v type in OPT_U?INTEGER
perf options: Introduce OPT_UINTEGER
perf tui: Add workaround for slang < 2.1.4
perf record: Fix bug mismatch with -c option definition
perf options: Introduce OPT_U64
perf tui: Add help window to show key associations
perf tui: Make <- exit menus too
perf newt: Add single key shortcuts for zoom into DSO and threads
perf newt: Exit browser unconditionally when CTRL+C, q or Q is pressed
perf newt: Fix the 'A'/'a' shortcut for annotate
perf newt: Make <- exit the ui_browser
x86, perf: P4 PMU - fix counters management logic
perf newt: Make <- zoom out filters
perf report: Report number of events, not samples
perf hist: Clarify events_stats fields usage
...
Fix up trivial conflicts in kernel/fork.c and tools/perf/builtin-record.c
Diffstat (limited to 'tools/perf/Documentation/perf-trace-python.txt')
-rw-r--r-- | tools/perf/Documentation/perf-trace-python.txt | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/tools/perf/Documentation/perf-trace-python.txt b/tools/perf/Documentation/perf-trace-python.txt index a241aca77184..693be804dd3d 100644 --- a/tools/perf/Documentation/perf-trace-python.txt +++ b/tools/perf/Documentation/perf-trace-python.txt | |||
@@ -1,5 +1,5 @@ | |||
1 | perf-trace-python(1) | 1 | perf-trace-python(1) |
2 | ================== | 2 | ==================== |
3 | 3 | ||
4 | NAME | 4 | NAME |
5 | ---- | 5 | ---- |
@@ -93,7 +93,7 @@ don't care how it exited, so we'll use 'perf record' to record only | |||
93 | the sys_enter events: | 93 | the sys_enter events: |
94 | 94 | ||
95 | ---- | 95 | ---- |
96 | # perf record -c 1 -f -a -M -R -e raw_syscalls:sys_enter | 96 | # perf record -a -e raw_syscalls:sys_enter |
97 | 97 | ||
98 | ^C[ perf record: Woken up 1 times to write data ] | 98 | ^C[ perf record: Woken up 1 times to write data ] |
99 | [ perf record: Captured and wrote 56.545 MB perf.data (~2470503 samples) ] | 99 | [ perf record: Captured and wrote 56.545 MB perf.data (~2470503 samples) ] |
@@ -182,7 +182,7 @@ mean either that the record step recorded event types that it wasn't | |||
182 | really interested in, or the script was run against a trace file that | 182 | really interested in, or the script was run against a trace file that |
183 | doesn't correspond to the script. | 183 | doesn't correspond to the script. |
184 | 184 | ||
185 | The script generated by -g option option simply prints a line for each | 185 | The script generated by -g option simply prints a line for each |
186 | event found in the trace stream i.e. it basically just dumps the event | 186 | event found in the trace stream i.e. it basically just dumps the event |
187 | and its parameter values to stdout. The print_header() function is | 187 | and its parameter values to stdout. The print_header() function is |
188 | simply a utility function used for that purpose. Let's rename the | 188 | simply a utility function used for that purpose. Let's rename the |
@@ -359,7 +359,7 @@ your script: | |||
359 | # cat kernel-source/tools/perf/scripts/python/bin/syscall-counts-record | 359 | # cat kernel-source/tools/perf/scripts/python/bin/syscall-counts-record |
360 | 360 | ||
361 | #!/bin/bash | 361 | #!/bin/bash |
362 | perf record -c 1 -f -a -M -R -e raw_syscalls:sys_enter | 362 | perf record -a -e raw_syscalls:sys_enter |
363 | ---- | 363 | ---- |
364 | 364 | ||
365 | The 'report' script is also a shell script with the same base name as | 365 | The 'report' script is also a shell script with the same base name as |
@@ -449,12 +449,10 @@ available as calls back into the perf executable (see below). | |||
449 | As an example, the following perf record command can be used to record | 449 | As an example, the following perf record command can be used to record |
450 | all sched_wakeup events in the system: | 450 | all sched_wakeup events in the system: |
451 | 451 | ||
452 | # perf record -c 1 -f -a -M -R -e sched:sched_wakeup | 452 | # perf record -a -e sched:sched_wakeup |
453 | 453 | ||
454 | Traces meant to be processed using a script should be recorded with | 454 | Traces meant to be processed using a script should be recorded with |
455 | the above options: -c 1 says to sample every event, -a to enable | 455 | the above option: -a to enable system-wide collection. |
456 | system-wide collection, -M to multiplex the output, and -R to collect | ||
457 | raw samples. | ||
458 | 456 | ||
459 | The format file for the sched_wakep event defines the following fields | 457 | The format file for the sched_wakep event defines the following fields |
460 | (see /sys/kernel/debug/tracing/events/sched/sched_wakeup/format): | 458 | (see /sys/kernel/debug/tracing/events/sched/sched_wakeup/format): |
@@ -584,7 +582,7 @@ files: | |||
584 | flag_str(event_name, field_name, field_value) - returns the string represention corresponding to field_value for the flag field field_name of event event_name | 582 | flag_str(event_name, field_name, field_value) - returns the string represention corresponding to field_value for the flag field field_name of event event_name |
585 | symbol_str(event_name, field_name, field_value) - returns the string represention corresponding to field_value for the symbolic field field_name of event event_name | 583 | symbol_str(event_name, field_name, field_value) - returns the string represention corresponding to field_value for the symbolic field field_name of event event_name |
586 | 584 | ||
587 | The *autodict* function returns a special special kind of Python | 585 | The *autodict* function returns a special kind of Python |
588 | dictionary that implements Perl's 'autovivifying' hashes in Python | 586 | dictionary that implements Perl's 'autovivifying' hashes in Python |
589 | i.e. with autovivifying hashes, you can assign nested hash values | 587 | i.e. with autovivifying hashes, you can assign nested hash values |
590 | without having to go to the trouble of creating intermediate levels if | 588 | without having to go to the trouble of creating intermediate levels if |