Lines Matching refs:mmap_size
2155 prefetch_event(char *buf, u64 head, size_t mmap_size,
2165 if (head + sizeof(event->header) > mmap_size)
2173 if (head + event_size <= mmap_size)
2181 if (event_size <= mmap_size - head % page_size) {
2186 /* Invalid input. Event size should never exceed mmap_size. */
2187 pr_debug("%s: head=%#" PRIx64 " event->header.size=%#x, mmap_size=%#zx:"
2188 " fuzzed or compressed perf.data?\n", __func__, head, event_size, mmap_size);
2194 fetch_mmaped_event(u64 head, size_t mmap_size, char *buf, bool needs_swap)
2196 return prefetch_event(buf, head, mmap_size, needs_swap, ERR_PTR(-EINVAL));
2200 fetch_decomp_event(u64 head, size_t mmap_size, char *buf, bool needs_swap)
2202 return prefetch_event(buf, head, mmap_size, needs_swap, NULL);
2267 size_t mmap_size;
2288 rd->mmap_size = MMAP_SIZE;
2289 if (rd->mmap_size > data_size) {
2290 rd->mmap_size = data_size;
2329 munmap(mmaps[rd->mmap_idx], rd->mmap_size);
2337 buf = mmap(NULL, rd->mmap_size, mmap_prot, mmap_flags, rd->fd,
2368 event = fetch_mmaped_event(rd->head, rd->mmap_size, rd->mmap_cur,