Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 182376
b: refs/heads/master
c: f5a2c3d
h: refs/heads/master
v: v3
  • Loading branch information
Arnaldo Carvalho de Melo authored and Ingo Molnar committed Jan 16, 2010
1 parent 0d0f205 commit 6631555
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2c5851747bcf751908c02e253cb7582d342b4612
refs/heads/master: f5a2c3dce03621b55f84496f58adc2d1a87ca16f
28 changes: 18 additions & 10 deletions trunk/tools/perf/builtin-record.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,16 +113,24 @@ static void write_output(void *buf, size_t size)

static void write_event(event_t *buf, size_t size)
{
/*
* Add it to the list of DSOs, so that when we finish this
* record session we can pick the available build-ids.
*/
if (buf->header.type == PERF_RECORD_MMAP) {
struct list_head *head = &dsos__user;
if (buf->mmap.header.misc == 1)
head = &dsos__kernel;
__dsos__findnew(head, buf->mmap.filename);
}
size_t processed_size = buf->header.size;
event_t *ev = buf;

do {
/*
* Add it to the list of DSOs, so that when we finish this
* record session we can pick the available build-ids.
*/
if (ev->header.type == PERF_RECORD_MMAP) {
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);
}
Expand Down

0 comments on commit 6631555

Please sign in to comment.