diff options
author | Tom Zanussi <tzanussi@gmail.com> | 2010-04-02 00:59:22 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2010-04-14 05:56:08 -0400 |
commit | c7929e4727e8ff2d6fc8327188820e3b1c2f1dc3 (patch) | |
tree | 59f85cc7a5a381761f1583624f1ce2d62c060e5d /tools/perf/builtin-record.c | |
parent | 9215545e99d8c0b27323df2de504f4294bf5e407 (diff) |
perf: Convert perf header build_ids into build_id events
Bypasses the build_id perf header code and replaces it with a
synthesized event and processing function that accomplishes the
same thing, used when reading/writing perf data to/from a pipe.
Signed-off-by: Tom Zanussi <tzanussi@gmail.com>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Cc: fweisbec@gmail.com
Cc: rostedt@goodmis.org
Cc: k-keiichi@bx.jp.nec.com
Cc: acme@ghostprotocols.net
LKML-Reference: <1270184365-8281-9-git-send-email-tzanussi@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/builtin-record.c')
-rw-r--r-- | tools/perf/builtin-record.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c index 3775abe2af7..0bde31bc8e2 100644 --- a/tools/perf/builtin-record.c +++ b/tools/perf/builtin-record.c | |||
@@ -426,10 +426,19 @@ static int process_buildids(void) | |||
426 | 426 | ||
427 | static void atexit_header(void) | 427 | static void atexit_header(void) |
428 | { | 428 | { |
429 | session->header.data_size += bytes_written; | 429 | if (!pipe_output) { |
430 | session->header.data_size += bytes_written; | ||
430 | 431 | ||
431 | process_buildids(); | 432 | process_buildids(); |
432 | perf_header__write(&session->header, output, true); | 433 | perf_header__write(&session->header, output, true); |
434 | } else { | ||
435 | int err; | ||
436 | |||
437 | err = event__synthesize_build_ids(process_synthesized_event, | ||
438 | session); | ||
439 | if (err < 0) | ||
440 | pr_err("Couldn't synthesize build ids.\n"); | ||
441 | } | ||
433 | } | 442 | } |
434 | 443 | ||
435 | static int __cmd_record(int argc, const char **argv) | 444 | static int __cmd_record(int argc, const char **argv) |