Re: [PATCH] perf top: Use evsel's cpus to replace user_requested_cpus

From: Arnaldo Carvalho de Melo
Date: Fri Dec 15 2023 - 13:27:01 EST


Em Fri, Dec 15, 2023 at 12:59:22PM -0500, Liang, Kan escreveu:
> On 2023-12-15 10:36 a.m., Arnaldo Carvalho de Melo wrote:
>
> #perf report --header-only | grep event
> # event : name = cpu_atom/cycles:P/, , id = { 7360, 7361, 7362, 7363,
> 7364, 7365, 7366, 7367, 7368, 7369 }, type = 0 (PERF_TYPE_HARDWARE),
> size = 136, config = 0xa00000000, { sample_period, sample_freq } = 3000,
> sample_type = IP|TID|TIME|PERIOD|IDENTIFIER, read_format = ID|LOST,
> disabled = 1, inherit = 1, freq = 1, enable_on_exec = 1, precise_ip = 3,
> sample_id_all = 1
> # event : name = cpu_core/cycles:P/, , id = { 7370, 7371, 7372, 7373,
> 7374, 7375, 7376, 7377, 7378, 7379, 7380, 7381 }, type = 0
> (PERF_TYPE_HARDWARE), size = 136, config = 0x400000000, { sample_period,
> sample_freq } = 3000, sample_type = IP|TID|TIME|PERIOD|IDENTIFIER,
> read_format = ID|LOST, disabled = 1, inherit = 1, freq = 1,
> enable_on_exec = 1, precise_ip = 3, sample_id_all = 1
>
> I think we should move all the modifiers after the "/". The below patch
> can fix it.
>
> https://lore.kernel.org/lkml/20231215175455.1300261-1-kan.liang@xxxxxxxxxxxxxxx/

Right, I implemented it in a slightly different way, but end result
should be the same: