[lkml]   [2010]   [May]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH 2/3] perf inject: Add missing bits
From: Arnaldo Carvalho de Melo <>

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 (created by perf record) and display annotated code
archive Create archive with object files with build-ids found in file
bench General framework for benchmark suites
buildid-cache Manage build-id cache.
buildid-list List the buildids in a file
diff Read two 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
report Read (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 (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 <>
Cc: Frédéric Weisbecker <>
Cc: Mike Galbraith <>
Cc: Paul Mackerras <>
Cc: Peter Zijlstra <>
Cc: Tom Zanussi <>
LKML-Reference: <new-submission>
Signed-off-by: Arnaldo Carvalho de Melo <>
tools/perf/Documentation/perf-buildid-cache.txt | 4 +-
tools/perf/Documentation/perf-inject.txt | 35 +++++++++++++++++++++++
tools/perf/builtin-inject.c | 2 +-
tools/perf/command-list.txt | 1 +
4 files changed, 39 insertions(+), 3 deletions(-)
create mode 100644 tools/perf/Documentation/perf-inject.txt

diff --git a/tools/perf/Documentation/perf-buildid-cache.txt b/tools/perf/Documentation/perf-buildid-cache.txt
index 88bc3b5..5d1a950 100644
--- a/tools/perf/Documentation/perf-buildid-cache.txt
+++ b/tools/perf/Documentation/perf-buildid-cache.txt
@@ -8,7 +8,7 @@ perf-buildid-cache - Manage build-id cache.
-'perf buildid-list <options>'
+'perf buildid-cache <options>'

@@ -30,4 +30,4 @@ OPTIONS

-linkperf:perf-record[1], linkperf:perf-report[1]
+linkperf:perf-record[1], linkperf:perf-report[1], linkperf:perf-buildid-list[1]
diff --git a/tools/perf/Documentation/perf-inject.txt b/tools/perf/Documentation/perf-inject.txt
new file mode 100644
index 0000000..025630d
--- /dev/null
+++ b/tools/perf/Documentation/perf-inject.txt
@@ -0,0 +1,35 @@
+perf-inject - Filter to augment the events stream with additional information
+'perf inject <options>'
+perf-inject reads a perf-record event stream and repipes it to stdout. At any
+point the processing code can inject other events into the event stream - in
+this case build-ids (-b option) are read and injected as needed into the event
+Build-ids are just the first user of perf-inject - potentially anything that
+needs userspace processing to augment the events stream with additional
+information could make use of this facility.
+ Inject build-ids into the output stream
+ Be more verbose.
+linkperf:perf-record[1], linkperf:perf-report[1], linkperf:perf-archive[1]
diff --git a/tools/perf/builtin-inject.c b/tools/perf/builtin-inject.c
index 59e981a..8e3e47b 100644
--- a/tools/perf/builtin-inject.c
+++ b/tools/perf/builtin-inject.c
@@ -204,7 +204,7 @@ static const char * const report_usage[] = {

static const struct option options[] = {
- OPT_BOOLEAN('b', "inject build-ids", &inject_build_ids,
+ OPT_BOOLEAN('b', "build-ids", &inject_build_ids,
"Inject build-ids into the output stream"),
OPT_INCR('v', "verbose", &verbose,
"be more verbose (show build ids, etc)"),
diff --git a/tools/perf/command-list.txt b/tools/perf/command-list.txt
index 80a1a44..949d77f 100644
--- a/tools/perf/command-list.txt
+++ b/tools/perf/command-list.txt
@@ -8,6 +8,7 @@ perf-bench mainporcelain common
perf-buildid-cache mainporcelain common
perf-buildid-list mainporcelain common
perf-diff mainporcelain common
+perf-inject mainporcelain common
perf-list mainporcelain common
perf-sched mainporcelain common
perf-record mainporcelain common
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2010-05-04 16:03    [W:0.070 / U:2.512 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site