diff options
author | Tom Zanussi <tzanussi@gmail.com> | 2010-04-02 00:59:19 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2010-04-14 05:56:07 -0400 |
commit | 2c46dbb517a10b18d459e6ceffefde5bfb290cf6 (patch) | |
tree | 20853decc73cd1fc69c2db7d8227d11cce6ee4de /tools/perf/util/header.h | |
parent | c239da3b4b55dbb8f30bcb8d1a0d63fc44a567c3 (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/util/header.h')
-rw-r--r-- | tools/perf/util/header.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/perf/util/header.h b/tools/perf/util/header.h index 6562ece67064..e916ac509a69 100644 --- a/tools/perf/util/header.h +++ b/tools/perf/util/header.h | |||
@@ -95,4 +95,12 @@ int build_id_cache__add_s(const char *sbuild_id, const char *debugdir, | |||
95 | const char *name, bool is_kallsyms); | 95 | const char *name, bool is_kallsyms); |
96 | int build_id_cache__remove_s(const char *sbuild_id, const char *debugdir); | 96 | int build_id_cache__remove_s(const char *sbuild_id, const char *debugdir); |
97 | 97 | ||
98 | int event__synthesize_attr(struct perf_event_attr *attr, u16 ids, u64 *id, | ||
99 | event__handler_t process, | ||
100 | struct perf_session *session); | ||
101 | int event__synthesize_attrs(struct perf_header *self, | ||
102 | event__handler_t process, | ||
103 | struct perf_session *session); | ||
104 | int event__process_attr(event_t *self, struct perf_session *session); | ||
105 | |||
98 | #endif /* __PERF_HEADER_H */ | 106 | #endif /* __PERF_HEADER_H */ |