OSDN Git Service

simpleperf: Use PMU's cpumask if available
authorNamhyung Kim <namhyung@google.com>
Tue, 3 Dec 2019 02:57:18 +0000 (11:57 +0900)
committerNamhyung Kim <namhyung@google.com>
Fri, 20 Dec 2019 08:32:49 +0000 (17:32 +0900)
commit26387c737d75478430ebb4d6401b06f1d68e85af
treece9fa23abed76d438d77bc59e2bd903abe264973
parenta5f1d42f8a0a4853425d021c273e8d0ee94d8d7d
simpleperf: Use PMU's cpumask if available

Some PMU events only support profiling from dedicated cpus.  For those
events there are cpumask files in the /sys/bus/event_source/devices/<PMU>
directory.  So override the cpu setting for them.

Test: manually tested with a PMU has the cpumask file
Change-Id: I5e50a7d6f88cb0bc80b45e774cf048116698b3de
Signed-off-by: Namhyung Kim <namhyung@google.com>
simpleperf/event_selection_set.cpp
simpleperf/event_selection_set.h
simpleperf/event_type.cpp
simpleperf/event_type.h