diff options
author | Ian Rogers <[email protected]> | 2021-11-23 16:12:31 -0800 |
---|---|---|
committer | Arnaldo Carvalho de Melo <[email protected]> | 2022-01-12 14:43:34 -0300 |
commit | 6dd8646939a770e4ec0220c1c19d6af25c5877b7 (patch) | |
tree | ff7042130778ad2b8e0fb7d7fcbf3009811a1c53 | |
parent | 0ce05781f4905fcfbbb489519e36be71c7b0bbcc (diff) |
perf tools: Probe non-deprecated sysfs path 1st
Following Documentation/ABI/stable/sysfs-devices-system-cpu the
/sys/devices/system/cpu/cpuX/topology/core_cpus is deprecated in favor
of thread_siblings, so probe thread_siblings before falling back on
core_cpus.
Signed-off-by: Ian Rogers <[email protected]>
Cc: Alexander Shishkin <[email protected]>
Cc: Andi Kleen <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: John Garry <[email protected]>
Cc: Kajol Jain <[email protected]>
Cc: Kan Liang <[email protected]>
Cc: Konstantin Khlebnikov <[email protected]>
Cc: Mark Rutland <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Paul Clarke <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Stephane Eranian <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
-rw-r--r-- | tools/perf/util/smt.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tools/perf/util/smt.c b/tools/perf/util/smt.c index 2636be65305a..2b0a36ebf27a 100644 --- a/tools/perf/util/smt.c +++ b/tools/perf/util/smt.c @@ -79,11 +79,10 @@ int smt_on(void) char fn[256]; snprintf(fn, sizeof fn, - "devices/system/cpu/cpu%d/topology/core_cpus", cpu); + "devices/system/cpu/cpu%d/topology/thread_siblings", cpu); if (sysfs__read_str(fn, &str, &strlen) < 0) { snprintf(fn, sizeof fn, - "devices/system/cpu/cpu%d/topology/thread_siblings", - cpu); + "devices/system/cpu/cpu%d/topology/core_cpus", cpu); if (sysfs__read_str(fn, &str, &strlen) < 0) continue; } |