aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-record.c
diff options
context:
space:
mode:
authorTom Zanussi <tzanussi@gmail.com>2010-04-02 00:59:19 -0400
committerIngo Molnar <mingo@elte.hu>2010-04-14 05:56:07 -0400
commit2c46dbb517a10b18d459e6ceffefde5bfb290cf6 (patch)
tree20853decc73cd1fc69c2db7d8227d11cce6ee4de /tools/perf/builtin-record.c
parentc239da3b4b55dbb8f30bcb8d1a0d63fc44a567c3 (diff)
perf: Convert perf header attrs into attr events
Bypasses the attr 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. Making the attrs into events allows them to be streamed over a pipe along with the rest of the header data (in later patches). It also paves the way to allowing events to be added and removed from perf sessions dynamically. 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-6-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.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index d4464f7fcea5..289d9cf3bf73 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -584,6 +584,16 @@ static int __cmd_record(int argc, const char **argv)
584 584
585 post_processing_offset = lseek(output, 0, SEEK_CUR); 585 post_processing_offset = lseek(output, 0, SEEK_CUR);
586 586
587 if (pipe_output) {
588 err = event__synthesize_attrs(&session->header,
589 process_synthesized_event,
590 session);
591 if (err < 0) {
592 pr_err("Couldn't synthesize attrs.\n");
593 return err;
594 }
595 }
596
587 err = event__synthesize_kernel_mmap(process_synthesized_event, 597 err = event__synthesize_kernel_mmap(process_synthesized_event,
588 session, "_text"); 598 session, "_text");
589 if (err < 0) 599 if (err < 0)