diff options
| author | Tom Zanussi <[email protected]> | 2010-05-01 06:41:20 +0000 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <[email protected]> | 2010-05-02 16:36:56 +0000 |
| commit | 454c407ec17a0c63e4023ac0877d687945a7df4a (patch) | |
| tree | 1271299a59a89419c0dd4dcbf29b4492b63555ca /tools/perf/builtin-annotate.c | |
| parent | perf/live: don't synthesize build ids at the end of a live mode trace (diff) | |
| download | kernel-454c407ec17a0c63e4023ac0877d687945a7df4a.tar.gz kernel-454c407ec17a0c63e4023ac0877d687945a7df4a.zip | |
perf: add perf-inject builtin
Currently, perf 'live mode' writes build-ids at the end of the
session, which isn't actually useful for processing live mode events.
What would be better would be to have the build-ids sent before any of
the samples that reference them, which can be done by processing the
event stream and retrieving the build-ids on the first hit. Doing
that in perf-record itself, however, is off-limits.
This patch introduces perf-inject, which does the same job while
leaving perf-record untouched. Normal mode perf still records the
build-ids at the end of the session as it should, but for live mode,
perf-inject can be injected in between the record and report steps
e.g.:
perf record -o - ./hackbench 10 | perf inject -v -b | perf report -v -i -
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 stream.
Build-ids are just the first user of perf-inject - potentially
anything that needs userspace processing to augment the trace stream
with additional information could make use of this facility.
Cc: Ingo Molnar <[email protected]>
Cc: Steven Rostedt <[email protected]>
Cc: Frédéric Weisbecker <[email protected]>
LKML-Reference: <[email protected]>
Signed-off-by: Tom Zanussi <[email protected]>
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/perf/builtin-annotate.c')
| -rw-r--r-- | tools/perf/builtin-annotate.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/builtin-annotate.c b/tools/perf/builtin-annotate.c index b57dbcf62af3..ee154b58772b 100644 --- a/tools/perf/builtin-annotate.c +++ b/tools/perf/builtin-annotate.c @@ -554,7 +554,7 @@ static int __cmd_annotate(void) int ret; struct perf_session *session; - session = perf_session__new(input_name, O_RDONLY, force); + session = perf_session__new(input_name, O_RDONLY, force, false); if (session == NULL) return -ENOMEM; |
