Re: [PATCH v3 2/2] coresight: Update comments for removing cs_etm_find_snapshot()

From: Leo Yan
Date: Mon Sep 06 2021 - 06:28:57 EST


Hi Suzuki,

On Mon, Sep 06, 2021 at 10:51:02AM +0100, Suzuki Kuruppassery Poulose wrote:
> Hi Leo
>
>
> On 05/09/2021 14:12, Leo Yan wrote:
> > Commit 2f01c200d440 ("perf cs-etm: Remove callback cs_etm_find_snapshot()")
> > has removed the function cs_etm_find_snapshot() from the perf tool in the
> > user space, now CoreSight trace directly uses the perf common function
> > __auxtrace_mmap__read() to calcualte the head and size for AUX trace data
> > in snapshot mode.
> >
> > Updates the comments in drivers to reflect the changes.
>
> As such I would avoid referencing "userspace" function names in the
> kernel driver. Please could we remove it or make it generic ?

Okay, I'd like to remove the specific function name from the comment so
can make the comment generic as:

"User space will figure out how many bytes to get from the AUX buffer
based on the position of the head."

This info can remind us how the userspace and kernel co-work for
snapshot mode if later we read the code.

If no objection, I will respin with this way.

> Also, remember, perf is not the only userspace tool driving the kernel
> perf.

Good point.

Thanks for review,
Leo