1 #include "process_event.h"
7 process_mmap_event(event_t *event, unsigned long offset, unsigned long head)
9 struct map *map = map__new(&event->mmap, cwd, cwdlen);
10 struct thread *thread = threads__findnew(event->mmap.pid);
12 dump_printf("%p [%p]: PERF_RECORD_MMAP %d/%d: [%p(%p) @ %p]: %s\n",
13 (void *)(offset + head),
14 (void *)(long)(event->header.size),
17 (void *)(long)event->mmap.start,
18 (void *)(long)event->mmap.len,
19 (void *)(long)event->mmap.pgoff,
20 event->mmap.filename);
22 if (thread == NULL || map == NULL) {
23 dump_printf("problem processing PERF_RECORD_MMAP, skipping event.\n");
27 thread__insert_map(thread, map);
35 process_comm_event(event_t *event, unsigned long offset, unsigned long head)
37 struct thread *thread = threads__findnew(event->comm.pid);
39 dump_printf("%p [%p]: PERF_RECORD_COMM: %s:%d\n",
40 (void *)(offset + head),
41 (void *)(long)(event->header.size),
42 event->comm.comm, event->comm.pid);
45 thread__set_comm_adjust(thread, event->comm.comm)) {
46 dump_printf("problem processing PERF_RECORD_COMM, skipping event.\n");