Lines Matching defs:buf
376 char buf[4096];
380 ret = read(fd, buf, min(n, (off_t)sizeof(buf)));
1761 void *buf, size_t buf_sz,
1785 readn(fd, buf, hdr_sz) != (ssize_t)hdr_sz)
1788 event = (union perf_event *)buf;
1796 buf += hdr_sz;
1799 if (readn(fd, buf, rest) != (ssize_t)rest)
1820 char buf[PERF_SAMPLE_MAX_SIZE];
1825 err = perf_session__peek_event(session, offset, buf,
2039 void *buf = NULL;
2050 buf = malloc(cur_size);
2051 if (!buf)
2055 event = buf;
2076 void *new = realloc(buf, size);
2081 buf = new;
2083 event = buf;
2130 free(buf);
2139 prefetch_event(char *buf, u64 head, size_t mmap_size,
2152 event = (union perf_event *)(buf + head);
2164 /* Check if the event fits into the next mmapped buf. */
2166 /* Remap buf and fetch again. */
2178 fetch_mmaped_event(u64 head, size_t mmap_size, char *buf, bool needs_swap)
2180 return prefetch_event(buf, head, mmap_size, needs_swap, ERR_PTR(-EINVAL));
2184 fetch_decomp_event(u64 head, size_t mmap_size, char *buf, bool needs_swap)
2186 return prefetch_event(buf, head, mmap_size, needs_swap, NULL);
2299 char *buf, **mmaps = rd->mmaps;
2321 buf = mmap(NULL, rd->mmap_size, mmap_prot, mmap_flags, rd->fd,
2323 if (buf == MAP_FAILED) {
2327 mmaps[rd->mmap_idx] = rd->mmap_cur = buf;
2331 session->one_mmap_addr = buf;