Lines Matching defs:mmap_size
2180 prefetch_event(char *buf, u64 head, size_t mmap_size,
2190 if (head + sizeof(event->header) > mmap_size)
2198 if (head + event_size <= mmap_size)
2206 if (event_size <= mmap_size - head % page_size) {
2211 /* Invalid input. Event size should never exceed mmap_size. */
2212 pr_debug("%s: head=%#" PRIx64 " event->header.size=%#x, mmap_size=%#zx:"
2213 " fuzzed or compressed perf.data?\n", __func__, head, event_size, mmap_size);
2219 fetch_mmaped_event(u64 head, size_t mmap_size, char *buf, bool needs_swap)
2221 return prefetch_event(buf, head, mmap_size, needs_swap, ERR_PTR(-EINVAL));
2225 fetch_decomp_event(u64 head, size_t mmap_size, char *buf, bool needs_swap)
2227 return prefetch_event(buf, head, mmap_size, needs_swap, NULL);
2294 size_t mmap_size;
2315 rd->mmap_size = MMAP_SIZE;
2316 if (rd->mmap_size > data_size) {
2317 rd->mmap_size = data_size;
2356 munmap(mmaps[rd->mmap_idx], rd->mmap_size);
2364 buf = mmap(NULL, rd->mmap_size, mmap_prot, mmap_flags, rd->fd,
2395 event = fetch_mmaped_event(rd->head, rd->mmap_size, rd->mmap_cur,