Re: [PATCH 4/4] perf record: mmap output file - v3

2013-11-11 Thread Ingo Molnar
* David Ahern wrote: > >>+do_mmap: > >>+ offset = rec->session->header.data_offset + rec->bytes_written; > >>+ if (offset < (ssize_t) rec->mmap_out_size) { > >>+ rec->mmap_offset = offset; > >>+ offset = 0; > >>+ } else > >>+

Re: [PATCH 4/4] perf record: mmap output file - v3

2013-11-07 Thread David Ahern
On 11/7/13, 1:03 AM, Ingo Molnar wrote: * David Ahern wrote: +--out-pages=:: + Number of pages to mmap while writing data to file (must be a power of two). + Specification can be appended with unit character - B/K/M/G. The + size is rounded up to have nearest pages power of

Re: [PATCH 4/4] perf record: mmap output file - v3

2013-11-07 Thread Ingo Molnar
* David Ahern wrote: > +--out-pages=:: > + Number of pages to mmap while writing data to file (must be a power of > two). > + Specification can be appended with unit character - B/K/M/G. The > + size is rounded up to have nearest pages power of two value. So why doesn't the code au

[PATCH 4/4] perf record: mmap output file - v3

2013-11-06 Thread David Ahern
When recording raw_syscalls for the entire system, e.g., perf record -e raw_syscalls:*,sched:sched_switch -a -- sleep 1 you end up with a negative feedback loop as perf itself calls write() fairly often. This patch handles the problem by mmap'ing the file in chunks of 64M at a time and copies