perf tools: Fix SMT detection fast read path
authorIan Rogers <irogers@google.com>
Wed, 24 Nov 2021 00:12:29 +0000 (16:12 -0800)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 7 Dec 2021 00:57:53 +0000 (21:57 -0300)
commit4ffbe87e2d5b53bcb0213d8650bbe70bf942de6a
treec8174f3d060de93c0b61b5f497cd19c136d9ced8
parentcba43fcf7aaf8369f80aac26cc2c50232c065a9e
perf tools: Fix SMT detection fast read path

sysfs__read_int() returns 0 on success, and so the fast read path was
always failing.

Fixes: bb629484d924118e ("perf tools: Simplify checking if SMT is active.")
Signed-off-by: Ian Rogers <irogers@google.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: John Garry <john.garry@huawei.com>
Cc: Kajol Jain <kjain@linux.ibm.com>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Konstantin Khlebnikov <koct9i@gmail.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Clarke <pc@us.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lore.kernel.org/lkml/20211124001231.3277836-2-irogers@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/smt.c