aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/session.h
diff options
context:
space:
mode:
authorTom Zanussi <tzanussi@gmail.com>2010-04-01 23:59:15 -0500
committerIngo Molnar <mingo@elte.hu>2010-04-14 11:56:05 +0200
commit8dc58101f2c838355d44402aa77646649d10dbec (patch)
treed4cc08cccfec56d37dee4c4b2383ffe56d176494 /tools/perf/util/session.h
parentperf: Fix endianness argument compatibility with OPT_BOOLEAN() and introduce OPT_INCR() (diff)
downloadlinux-dev-8dc58101f2c838355d44402aa77646649d10dbec.tar.xz
linux-dev-8dc58101f2c838355d44402aa77646649d10dbec.zip
perf: Add pipe-specific header read/write and event processing code
This patch makes several changes to allow the perf event stream to be sent and received over a pipe: - adds pipe-specific versions of the header read/write code - adds pipe-specific version of the event processing code - adds a range of event types to be used for header or other pseudo events, above the range used by the kernel - checks the return value of event handlers, which they can use to skip over large events during event processing rather than actually reading them into event objects. - unifies the multiple do_read() functions and updates its users. Note that none of these changes affect the existing perf data file format or processing - this code only comes into play if perf output is sent to stdout (or is read from stdin). 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-2-git-send-email-tzanussi@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/util/session.h')
-rw-r--r--tools/perf/util/session.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/perf/util/session.h b/tools/perf/util/session.h
index 27f4c2dc715b..5f7891136655 100644
--- a/tools/perf/util/session.h
+++ b/tools/perf/util/session.h
@@ -27,6 +27,7 @@ struct perf_session {
u64 sample_type;
struct ref_reloc_sym ref_reloc_sym;
int fd;
+ bool fd_pipe;
int cwdlen;
char *cwd;
char filename[0];
@@ -92,6 +93,9 @@ static inline struct map *
return map_groups__new_module(&self->kmaps, start, filename);
}
+int do_read(int fd, void *buf, size_t size);
+void perf_session__update_sample_type(struct perf_session *self);
+
#ifdef NO_NEWT_SUPPORT
static inline int perf_session__browse_hists(struct rb_root *hists __used,
u64 nr_hists __used,