Revert "perf record: Intercept all events"
This reverts commitf5a2c3dce0
. This patch is required for making "perf lock rec" work. The commitf5a2c3dce0
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>
This commit is contained in:
Родитель
6a1b751fb8
Коммит
a8e6f734ce
|
@ -113,24 +113,16 @@ static void write_output(void *buf, size_t size)
|
||||||
|
|
||||||
static void write_event(event_t *buf, size_t size)
|
static void write_event(event_t *buf, size_t size)
|
||||||
{
|
{
|
||||||
size_t processed_size = buf->header.size;
|
/*
|
||||||
event_t *ev = buf;
|
* Add it to the list of DSOs, so that when we finish this
|
||||||
|
* record session we can pick the available build-ids.
|
||||||
do {
|
*/
|
||||||
/*
|
if (buf->header.type == PERF_RECORD_MMAP) {
|
||||||
* Add it to the list of DSOs, so that when we finish this
|
struct list_head *head = &dsos__user;
|
||||||
* record session we can pick the available build-ids.
|
if (buf->mmap.header.misc == 1)
|
||||||
*/
|
head = &dsos__kernel;
|
||||||
if (ev->header.type == PERF_RECORD_MMAP) {
|
__dsos__findnew(head, buf->mmap.filename);
|
||||||
struct list_head *head = &dsos__user;
|
}
|
||||||
if (ev->header.misc == 1)
|
|
||||||
head = &dsos__kernel;
|
|
||||||
__dsos__findnew(head, ev->mmap.filename);
|
|
||||||
}
|
|
||||||
|
|
||||||
ev = ((void *)ev) + ev->header.size;
|
|
||||||
processed_size += ev->header.size;
|
|
||||||
} while (processed_size < size);
|
|
||||||
|
|
||||||
write_output(buf, size);
|
write_output(buf, size);
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче