diff options
author | Ingo Molnar <mingo@elte.hu> | 2010-08-05 08:46:15 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2010-08-05 08:46:15 +0200 |
commit | fc9ea5a1e53ee54f681e226d735008e2a6f8f470 (patch) | |
tree | fe59eb9aef5d797ae387885e6833c9c4d05735ad /tools/perf/util/event.c | |
parent | 61be7fdec2f51b99570cd5dcc30c7848c8e56513 (diff) | |
parent | 9da79ab83ee33ddc1fdd0858fd3d70925a1bde99 (diff) | |
download | talos-op-linux-fc9ea5a1e53ee54f681e226d735008e2a6f8f470.tar.gz talos-op-linux-fc9ea5a1e53ee54f681e226d735008e2a6f8f470.zip |
Merge branch 'perf/core' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux-2.6 into perf/core
Diffstat (limited to 'tools/perf/util/event.c')
-rw-r--r-- | tools/perf/util/event.c | 28 |
1 files changed, 21 insertions, 7 deletions
diff --git a/tools/perf/util/event.c b/tools/perf/util/event.c index 6b0db5577929..dab9e754a281 100644 --- a/tools/perf/util/event.c +++ b/tools/perf/util/event.c @@ -151,7 +151,6 @@ static int event__synthesize_mmap_events(pid_t pid, pid_t tgid, continue; pbf += n + 3; if (*pbf == 'x') { /* vm_exec */ - u64 vm_pgoff; char *execname = strchr(bf, '/'); /* Catch VDSO */ @@ -162,12 +161,7 @@ static int event__synthesize_mmap_events(pid_t pid, pid_t tgid, continue; pbf += 3; - n = hex2u64(pbf, &vm_pgoff); - /* pgoff is in bytes, not pages */ - if (n >= 0) - ev.mmap.pgoff = vm_pgoff << getpagesize(); - else - ev.mmap.pgoff = 0; + n = hex2u64(pbf, &ev.mmap.pgoff); size = strlen(execname); execname[size - 1] = '\0'; /* Remove \n */ @@ -554,6 +548,26 @@ int event__process_task(event_t *self, struct perf_session *session) return 0; } +int event__process(event_t *event, struct perf_session *session) +{ + switch (event->header.type) { + case PERF_RECORD_COMM: + event__process_comm(event, session); + break; + case PERF_RECORD_MMAP: + event__process_mmap(event, session); + break; + case PERF_RECORD_FORK: + case PERF_RECORD_EXIT: + event__process_task(event, session); + break; + default: + break; + } + + return 0; +} + void thread__find_addr_map(struct thread *self, struct perf_session *session, u8 cpumode, enum map_type type, pid_t pid, u64 addr, |