Re: [PATCH] perf evlist: Fix id index for heterogeneous systems

From: Adrian Hunter
Date: Thu Jan 21 2021 - 08:46:27 EST


On 21/01/21 3:19 pm, Arnaldo Carvalho de Melo wrote:
> Em Thu, Jan 21, 2021 at 02:54:46PM +0200, Adrian Hunter escreveu:
>> perf_evlist__set_sid_idx() updates perf_sample_id with the evlist map
>> index, cpu number and tid. It is passed indexes to the evsel's cpu and
>> thread maps, but references the evlist's maps instead. That results in
>> using incorrect cpu numbers on heterogeneous systems. Fix by using evsel
>> maps.
>>
>> The id index (PERF_RECORD_ID_INDEX) is used by AUX area tracing when in
>> sampling mode. Having an incorrect cpu number causes the trace data to
>> be attributed to the wrong cpu, and can result in decoder errors because
>> the trace data is then associated with the wrong process.
>
> Can you please provide a Fixes: tag so that the stable@xxxxxxxxxx guys
> can apply where appropriate?

Oops sorry missed that. Here it is:

Fixes: 3c659eedada2 ("perf tools: Add id index")