[PATCH 03/12] perf arm_spe: Correct setting remote access
Leo Yan
leo.yan at arm.com
Thu Jun 19 09:45:03 PDT 2025
On Thu, Jun 19, 2025 at 02:53:37PM +0100, James Clark wrote:
>
>
> On 13/06/2025 4:53 pm, Leo Yan wrote:
> > Set the mem_remote field for a remote access to appropriately represent
> > the event.
> >
> > Fixes: a89dbc9b988f ("perf arm-spe: Set sample's data source field")
> > Signed-off-by: Leo Yan <leo.yan at arm.com>
> > ---
> > tools/perf/util/arm-spe.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/tools/perf/util/arm-spe.c b/tools/perf/util/arm-spe.c
> > index d46e0cccac99a36148b4daa37f2bf2342e6b47ef..fdef6f743cf3c76b1dcdd57f5a2c297642fdd21a 100644
> > --- a/tools/perf/util/arm-spe.c
> > +++ b/tools/perf/util/arm-spe.c
> > @@ -839,7 +839,7 @@ static void arm_spe__synth_memory_level(const struct arm_spe_record *record,
> > }
> > if (record->type & ARM_SPE_REMOTE_ACCESS)
> > - data_src->mem_lvl |= PERF_MEM_LVL_REM_CCE1;
> > + data_src->mem_remote = PERF_MEM_REMOTE_REMOTE;
>
> Should this not avoid overwriting mem_remote if it's already set by
> arm_spe__synth_ds()? We do that for mem_lvl above.
Here it does not overwrite to zeros if the 'mem_remote' field has been
set. It is harmless to overwrite 1 if it has been set.
I will add a condition for consistency.
> We also still set mem_lvl = PERF_MEM_LVL_REM_CCE1 in
> arm_spe__synth_data_source_common(), if it's not right it should probably be
> changed there too.
I will change to PERF_MEM_LVL_NA / PERF_MEM_LVLNUM_NA in
arm_spe__synth_data_source_common() for remote socket access.
Thanks!
More information about the linux-arm-kernel
mailing list