Skip to content

Commit 11d232e

Browse files
committed
perf inject: Add missing bits
New commands need to have Documentation and be added to command-list.txt so that they can appear when 'perf' is called withouth any subcommand: [root@doppio linux-2.6-tip]# perf usage: perf [--version] [--help] COMMAND [ARGS] The most commonly used perf commands are: annotate Read perf.data (created by perf record) and display annotated code archive Create archive with object files with build-ids found in perf.data file bench General framework for benchmark suites buildid-cache Manage build-id cache. buildid-list List the buildids in a perf.data file diff Read two perf.data files and display the differential profile inject Filter to augment the events stream with additional information kmem Tool to trace/measure kernel memory(slab) properties kvm Tool to trace/measure kvm guest os list List all symbolic event types lock Analyze lock events probe Define new dynamic tracepoints record Run a command and record its profile into perf.data report Read perf.data (created by perf record) and display the profile sched Tool to trace/measure scheduler properties (latencies) stat Run a command and gather performance counter statistics test Runs sanity tests. timechart Tool to visualize total system behavior during a workload top System profiling tool. trace Read perf.data (created by perf record) and display trace output See 'perf help COMMAND' for more information on a specific command. [root@doppio linux-2.6-tip]# The new 'perf inject' command hadn't so it wasn't appearing on that list. Also fix the long option, that should have no spaces in it, rename the faulty one to be '--build-ids', instead of '--inject build-ids'. Reported-by: Ingo Molnar <mingo@elte.hu> Cc: Frédéric Weisbecker <fweisbec@gmail.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Tom Zanussi <tzanussi@gmail.com> LKML-Reference: <new-submission> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
1 parent 63e0c77 commit 11d232e

4 files changed

Lines changed: 39 additions & 3 deletions

File tree

‎tools/perf/Documentation/perf-buildid-cache.txt‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ perf-buildid-cache - Manage build-id cache.
88
SYNOPSIS
99
--------
1010
[verse]
11-
'perf buildid-list <options>'
11+
'perf buildid-cache <options>'
1212

1313
DESCRIPTION
1414
-----------
@@ -30,4 +30,4 @@ OPTIONS
3030

3131
SEE ALSO
3232
--------
33-
linkperf:perf-record[1], linkperf:perf-report[1]
33+
linkperf:perf-record[1], linkperf:perf-report[1], linkperf:perf-buildid-list[1]
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
perf-inject(1)
2+
==============
3+
4+
NAME
5+
----
6+
perf-inject - Filter to augment the events stream with additional information
7+
8+
SYNOPSIS
9+
--------
10+
[verse]
11+
'perf inject <options>'
12+
13+
DESCRIPTION
14+
-----------
15+
perf-inject reads a perf-record event stream and repipes it to stdout. At any
16+
point the processing code can inject other events into the event stream - in
17+
this case build-ids (-b option) are read and injected as needed into the event
18+
stream.
19+
20+
Build-ids are just the first user of perf-inject - potentially anything that
21+
needs userspace processing to augment the events stream with additional
22+
information could make use of this facility.
23+
24+
OPTIONS
25+
-------
26+
-b::
27+
--build-ids=::
28+
Inject build-ids into the output stream
29+
-v::
30+
--verbose::
31+
Be more verbose.
32+
33+
SEE ALSO
34+
--------
35+
linkperf:perf-record[1], linkperf:perf-report[1], linkperf:perf-archive[1]

‎tools/perf/builtin-inject.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ static const char * const report_usage[] = {
204204
};
205205

206206
static const struct option options[] = {
207-
OPT_BOOLEAN('b', "inject build-ids", &inject_build_ids,
207+
OPT_BOOLEAN('b', "build-ids", &inject_build_ids,
208208
"Inject build-ids into the output stream"),
209209
OPT_INCR('v', "verbose", &verbose,
210210
"be more verbose (show build ids, etc)"),

‎tools/perf/command-list.txt‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ perf-bench mainporcelain common
88
perf-buildid-cache mainporcelain common
99
perf-buildid-list mainporcelain common
1010
perf-diff mainporcelain common
11+
perf-inject mainporcelain common
1112
perf-list mainporcelain common
1213
perf-sched mainporcelain common
1314
perf-record mainporcelain common

0 commit comments

Comments
 (0)