lkml.org 
[lkml]   [2021]   [Jun]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v1 3/3] perf cs-etm: Remove callback cs_etm_find_snapshot()
Hi James,

On Tue, Jun 22, 2021 at 03:29:35PM +0100, James Clark wrote:
>
>
> On 28/05/2021 17:15, Leo Yan wrote:
> > The callback cs_etm_find_snapshot() is invoked for snapshot mode, its
> > main purpose is to find the correct AUX trace data and returns "head"
> > and "old" (we can call "old" as "old head") to the caller, the caller
> > __auxtrace_mmap__read() uses these two pointers to decide the AUX trace
> > data size.
> >
> > cs_etm_find_snapshot() should be removed with below reasons:
>
> Hi Leo,
>
> I came across this other comment in coresight-tmc-etr.c that should probably
> be fixed up if we remove cs_etm_find_snapshot(). The same is duplicated in a
> few other files:
>
> /*
> * In snapshot mode we simply increment the head by the number of byte
> * that were written. User space function cs_etm_find_snapshot() will
> * figure out how many bytes to get from the AUX buffer based on the
> * position of the head.
> */
> if (etr_perf->snapshot)
> handle->head += size;

Good finding! I will fix the comments in next version.

Thanks a lot for the reviewing and testing!

Leo

\
 
 \ /
  Last update: 2021-06-28 03:32    [W:0.081 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site