Lines Matching refs:mmap2
461 event->mmap2.filename[0] = '\0'; in perf_event__synthesize_mmap_events()
465 &event->mmap2.start, in perf_event__synthesize_mmap_events()
466 &event->mmap2.len, in perf_event__synthesize_mmap_events()
467 &event->mmap2.prot, in perf_event__synthesize_mmap_events()
468 &event->mmap2.flags, in perf_event__synthesize_mmap_events()
469 &event->mmap2.pgoff, in perf_event__synthesize_mmap_events()
470 &event->mmap2.maj, in perf_event__synthesize_mmap_events()
471 &event->mmap2.min, in perf_event__synthesize_mmap_events()
472 &event->mmap2.ino, in perf_event__synthesize_mmap_events()
473 sizeof(event->mmap2.filename), in perf_event__synthesize_mmap_events()
474 event->mmap2.filename)) in perf_event__synthesize_mmap_events()
486 event->mmap2.ino_generation = 0; in perf_event__synthesize_mmap_events()
496 if ((event->mmap2.prot & PROT_EXEC) == 0) { in perf_event__synthesize_mmap_events()
497 if (!mmap_data || (event->mmap2.prot & PROT_READ) == 0) in perf_event__synthesize_mmap_events()
507 if (!strcmp(event->mmap2.filename, "")) in perf_event__synthesize_mmap_events()
508 strcpy(event->mmap2.filename, anonstr); in perf_event__synthesize_mmap_events()
511 !strncmp(event->mmap2.filename, hugetlbfs_mnt, in perf_event__synthesize_mmap_events()
513 strcpy(event->mmap2.filename, anonstr); in perf_event__synthesize_mmap_events()
514 event->mmap2.flags |= MAP_HUGETLB; in perf_event__synthesize_mmap_events()
517 size = strlen(event->mmap2.filename) + 1; in perf_event__synthesize_mmap_events()
519 event->mmap2.len -= event->mmap.start; in perf_event__synthesize_mmap_events()
520 event->mmap2.header.size = (sizeof(event->mmap2) - in perf_event__synthesize_mmap_events()
521 (sizeof(event->mmap2.filename) - aligned_size)); in perf_event__synthesize_mmap_events()
522 memset(event->mmap2.filename + size, 0, machine->id_hdr_size + in perf_event__synthesize_mmap_events()
524 event->mmap2.header.size += machine->id_hdr_size; in perf_event__synthesize_mmap_events()
525 event->mmap2.pid = tgid; in perf_event__synthesize_mmap_events()
526 event->mmap2.tid = pid; in perf_event__synthesize_mmap_events()
529 perf_record_mmap2__read_build_id(&event->mmap2, machine, false); in perf_event__synthesize_mmap_events()
688 event->mmap2.header.type = PERF_RECORD_MMAP2; in perf_event__synthesize_modules_maps_cb()
689 event->mmap2.header.size = (sizeof(event->mmap2) - in perf_event__synthesize_modules_maps_cb()
690 (sizeof(event->mmap2.filename) - size)); in perf_event__synthesize_modules_maps_cb()
691 memset(event->mmap2.filename + size, 0, args->machine->id_hdr_size); in perf_event__synthesize_modules_maps_cb()
692 event->mmap2.header.size += args->machine->id_hdr_size; in perf_event__synthesize_modules_maps_cb()
693 event->mmap2.start = map__start(map); in perf_event__synthesize_modules_maps_cb()
694 event->mmap2.len = map__size(map); in perf_event__synthesize_modules_maps_cb()
695 event->mmap2.pid = args->machine->pid; in perf_event__synthesize_modules_maps_cb()
697 memcpy(event->mmap2.filename, dso__long_name(dso), dso__long_name_len(dso) + 1); in perf_event__synthesize_modules_maps_cb()
699 perf_record_mmap2__read_build_id(&event->mmap2, args->machine, false); in perf_event__synthesize_modules_maps_cb()
731 ? sizeof(args.event->mmap2) in perf_event__synthesize_modules()
869 mmap_event = malloc(sizeof(mmap_event->mmap2) + machine->id_hdr_size); in perf_event__synthesize_thread_map()
952 mmap_event = malloc(sizeof(mmap_event->mmap2) + machine->id_hdr_size); in __perf_event__synthesize_threads()
1120 sizeof(event->mmap2) : sizeof(event->mmap); in __perf_event__synthesize_kernel_mmap()
1155 size = snprintf(event->mmap2.filename, sizeof(event->mmap2.filename), in __perf_event__synthesize_kernel_mmap()
1158 event->mmap2.header.type = PERF_RECORD_MMAP2; in __perf_event__synthesize_kernel_mmap()
1159 event->mmap2.header.size = (sizeof(event->mmap2) - in __perf_event__synthesize_kernel_mmap()
1160 (sizeof(event->mmap2.filename) - size) + machine->id_hdr_size); in __perf_event__synthesize_kernel_mmap()
1161 event->mmap2.pgoff = kmap->ref_reloc_sym->addr; in __perf_event__synthesize_kernel_mmap()
1162 event->mmap2.start = map__start(map); in __perf_event__synthesize_kernel_mmap()
1163 event->mmap2.len = map__end(map) - event->mmap.start; in __perf_event__synthesize_kernel_mmap()
1164 event->mmap2.pid = machine->pid; in __perf_event__synthesize_kernel_mmap()
1166 perf_record_mmap2__read_build_id(&event->mmap2, machine, true); in __perf_event__synthesize_kernel_mmap()
2290 ev_len = sizeof(ev.mmap2) - sizeof(ev.mmap2.filename) + strlen(filename) + 1; in perf_event__synthesize_mmap2_build_id()
2295 ev.mmap2.header.type = PERF_RECORD_MMAP2; in perf_event__synthesize_mmap2_build_id()
2296 ev.mmap2.header.misc = misc | PERF_RECORD_MISC_MMAP_BUILD_ID; in perf_event__synthesize_mmap2_build_id()
2297 ev.mmap2.header.size = ev_len; in perf_event__synthesize_mmap2_build_id()
2299 ev.mmap2.pid = pid; in perf_event__synthesize_mmap2_build_id()
2300 ev.mmap2.tid = tid; in perf_event__synthesize_mmap2_build_id()
2301 ev.mmap2.start = start; in perf_event__synthesize_mmap2_build_id()
2302 ev.mmap2.len = len; in perf_event__synthesize_mmap2_build_id()
2303 ev.mmap2.pgoff = pgoff; in perf_event__synthesize_mmap2_build_id()
2305 ev.mmap2.build_id_size = min(bid->size, sizeof(ev.mmap2.build_id)); in perf_event__synthesize_mmap2_build_id()
2306 memcpy(ev.mmap2.build_id, bid->data, ev.mmap2.build_id_size); in perf_event__synthesize_mmap2_build_id()
2308 ev.mmap2.prot = prot; in perf_event__synthesize_mmap2_build_id()
2309 ev.mmap2.flags = flags; in perf_event__synthesize_mmap2_build_id()
2311 memcpy(ev.mmap2.filename, filename, min(strlen(filename), sizeof(ev.mmap.filename))); in perf_event__synthesize_mmap2_build_id()