Lines Matching refs:md
313 int perf_mmap__push(struct mmap *md, void *to, in perf_mmap__push() argument
316 u64 head = perf_mmap__read_head(&md->core); in perf_mmap__push()
317 unsigned char *data = md->core.base + page_size; in perf_mmap__push()
322 rc = perf_mmap__read_init(&md->core); in perf_mmap__push()
326 size = md->core.end - md->core.start; in perf_mmap__push()
328 if ((md->core.start & md->core.mask) + size != (md->core.end & md->core.mask)) { in perf_mmap__push()
329 buf = &data[md->core.start & md->core.mask]; in perf_mmap__push()
330 size = md->core.mask + 1 - (md->core.start & md->core.mask); in perf_mmap__push()
331 md->core.start += size; in perf_mmap__push()
333 if (push(md, to, buf, size) < 0) { in perf_mmap__push()
339 buf = &data[md->core.start & md->core.mask]; in perf_mmap__push()
340 size = md->core.end - md->core.start; in perf_mmap__push()
341 md->core.start += size; in perf_mmap__push()
343 if (push(md, to, buf, size) < 0) { in perf_mmap__push()
348 md->core.prev = head; in perf_mmap__push()
349 perf_mmap__consume(&md->core); in perf_mmap__push()