aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf
diff options
context:
space:
mode:
authorHitoshi Mitake <mitake@dcl.info.waseda.ac.jp>2010-01-30 06:55:41 -0500
committerIngo Molnar <mingo@elte.hu>2010-01-31 02:27:52 -0500
commita8e6f734ce9a79d44ebb296f2a341f435227b34e (patch)
tree4fc66912214ff92b387d079b3d7eac6a2495b4a7 /tools/perf
parent6a1b751fb89b61ef7240f2e3ed65a2e2776e7cfd (diff)
Revert "perf record: Intercept all events"
This reverts commit f5a2c3dce03621b55f84496f58adc2d1a87ca16f. This patch is required for making "perf lock rec" work. The commit f5a2c3dce0 changes write_event() of builtin-record.c . And changed write_event() sometimes doesn't stop with perf lock rec. Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Mike Galbraith <efault@gmx.de> Cc: Paul Mackerras <paulus@samba.org> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> LKML-Reference: <new-submission> [ that commit also causes perf record to not be Ctrl-C-able, and it's concetually wrong to parse the data at record time (unconditionally - even when not needed), as we eventually want to be able to do zero-copy recording, at least for non-archive recordings. ] Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf')
-rw-r--r--tools/perf/builtin-record.c28
1 files changed, 10 insertions, 18 deletions
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index 90345223908c..eea56910b91c 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -113,24 +113,16 @@ static void write_output(void *buf, size_t size)
113 113
114static void write_event(event_t *buf, size_t size) 114static void write_event(event_t *buf, size_t size)
115{ 115{
116 size_t processed_size = buf->header.size; 116 /*
117 event_t *ev = buf; 117 * Add it to the list of DSOs, so that when we finish this
118 118 * record session we can pick the available build-ids.
119 do { 119 */
120 /* 120 if (buf->header.type == PERF_RECORD_MMAP) {
121 * Add it to the list of DSOs, so that when we finish this 121 struct list_head *head = &dsos__user;
122 * record session we can pick the available build-ids. 122 if (buf->mmap.header.misc == 1)
123 */ 123 head = &dsos__kernel;
124 if (ev->header.type == PERF_RECORD_MMAP) { 124 __dsos__findnew(head, buf->mmap.filename);
125 struct list_head *head = &dsos__user; 125 }
126 if (ev->header.misc == 1)
127 head = &dsos__kernel;
128 __dsos__findnew(head, ev->mmap.filename);
129 }
130
131 ev = ((void *)ev) + ev->header.size;
132 processed_size += ev->header.size;
133 } while (processed_size < size);
134 126
135 write_output(buf, size); 127 write_output(buf, size);
136} 128}