Re: [PATCH v1 3/3] perf cs-etm: Remove callback cs_etm_find_snapshot()
From: James Clark <hidden>
Date: 2021-06-24 16:46:41
Also in:
linux-perf-users, lkml
From: James Clark <hidden>
Date: 2021-06-24 16:46:41
Also in:
linux-perf-users, lkml
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.quoted
cs_etm_find_snapshot() should be removed with below reasons:- The first thing in cs_etm_find_snapshot() is to check if the head has wrapped around, if it is not, directly bails out. The checking is pointless, this is because the "head" and "old" pointers both are monotonical increasing so they never wrap around.
For patch 3: Reviewed-by: James Clark <redacted> Tested-by: James Clark <redacted> I think it's a good simplification and it also fixes the duplicate buffers issue. And I agree with the reasoning about the pointer increasing monotonically. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel