Re: [PATCH V3 02/12] perf mmap: factor out function to find ringbuffer position

2018-01-12 Thread Jiri Olsa
On Thu, Jan 11, 2018 at 09:26:28PM +, Liang, Kan wrote: > > > On Thu, Dec 21, 2017 at 10:08:44AM -0800, kan.li...@intel.com wrote: > > > > SNIP > > > > > +/* > > > + * Report the start and end of the available data in ringbuffer > > > + */ > > > +int perf_mmap__read_init(struct perf_mmap

Re: [PATCH V3 02/12] perf mmap: factor out function to find ringbuffer position

2018-01-12 Thread Jiri Olsa
On Thu, Jan 11, 2018 at 09:26:28PM +, Liang, Kan wrote: > > > On Thu, Dec 21, 2017 at 10:08:44AM -0800, kan.li...@intel.com wrote: > > > > SNIP > > > > > +/* > > > + * Report the start and end of the available data in ringbuffer > > > + */ > > > +int perf_mmap__read_init(struct perf_mmap

RE: [PATCH V3 02/12] perf mmap: factor out function to find ringbuffer position

2018-01-11 Thread Liang, Kan
> On Thu, Dec 21, 2017 at 10:08:44AM -0800, kan.li...@intel.com wrote: > > SNIP > > > +/* > > + * Report the start and end of the available data in ringbuffer > > + */ > > +int perf_mmap__read_init(struct perf_mmap *map, bool overwrite, > > +u64 *start, u64 *end) > > { > >

RE: [PATCH V3 02/12] perf mmap: factor out function to find ringbuffer position

2018-01-11 Thread Liang, Kan
> On Thu, Dec 21, 2017 at 10:08:44AM -0800, kan.li...@intel.com wrote: > > SNIP > > > +/* > > + * Report the start and end of the available data in ringbuffer > > + */ > > +int perf_mmap__read_init(struct perf_mmap *map, bool overwrite, > > +u64 *start, u64 *end) > > { > >

Re: [PATCH V3 02/12] perf mmap: factor out function to find ringbuffer position

2018-01-11 Thread Jiri Olsa
On Thu, Dec 21, 2017 at 10:08:44AM -0800, kan.li...@intel.com wrote: SNIP > +/* > + * Report the start and end of the available data in ringbuffer > + */ > +int perf_mmap__read_init(struct perf_mmap *map, bool overwrite, > + u64 *start, u64 *end) > { > - u64 head =

Re: [PATCH V3 02/12] perf mmap: factor out function to find ringbuffer position

2018-01-11 Thread Jiri Olsa
On Thu, Dec 21, 2017 at 10:08:44AM -0800, kan.li...@intel.com wrote: SNIP > +/* > + * Report the start and end of the available data in ringbuffer > + */ > +int perf_mmap__read_init(struct perf_mmap *map, bool overwrite, > + u64 *start, u64 *end) > { > - u64 head =

RE: [PATCH V3 02/12] perf mmap: factor out function to find ringbuffer position

2018-01-10 Thread Liang, Kan
> On Thu, Dec 21, 2017 at 10:08:44AM -0800, kan.li...@intel.com wrote: > > From: Kan Liang > > > > The perf record has specific codes to calculate the ringbuffer > > position for both overwrite and non-overwrite mode. > > The perf top will support both modes later. > > It is

RE: [PATCH V3 02/12] perf mmap: factor out function to find ringbuffer position

2018-01-10 Thread Liang, Kan
> On Thu, Dec 21, 2017 at 10:08:44AM -0800, kan.li...@intel.com wrote: > > From: Kan Liang > > > > The perf record has specific codes to calculate the ringbuffer > > position for both overwrite and non-overwrite mode. > > The perf top will support both modes later. > > It is useful to make the

Re: [PATCH V3 02/12] perf mmap: factor out function to find ringbuffer position

2018-01-10 Thread Jiri Olsa
On Thu, Dec 21, 2017 at 10:08:44AM -0800, kan.li...@intel.com wrote: > From: Kan Liang > > The perf record has specific codes to calculate the ringbuffer position > for both overwrite and non-overwrite mode. > The perf top will support both modes later. > It is useful to

Re: [PATCH V3 02/12] perf mmap: factor out function to find ringbuffer position

2018-01-10 Thread Jiri Olsa
On Thu, Dec 21, 2017 at 10:08:44AM -0800, kan.li...@intel.com wrote: > From: Kan Liang > > The perf record has specific codes to calculate the ringbuffer position > for both overwrite and non-overwrite mode. > The perf top will support both modes later. > It is useful to make the specific codes