aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tools/perf/util/smt.h
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/util/smt.h')
-rw-r--r--tools/perf/util/smt.h19
1 files changed, 15 insertions, 4 deletions
diff --git a/tools/perf/util/smt.h b/tools/perf/util/smt.h
index b8414b7bcbc8..01441fd2c0a2 100644
--- a/tools/perf/util/smt.h
+++ b/tools/perf/util/smt.h
@@ -1,6 +1,17 @@
-#ifndef SMT_H
-#define SMT_H 1
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef __SMT_H
+#define __SMT_H 1
-int smt_on(void);
+/*
+ * Returns true if SMT (aka hyperthreading) is enabled. Determined via sysfs or
+ * the online topology.
+ */
+bool smt_on(void);
-#endif
+/*
+ * Returns true when system wide and all SMT threads for a core are in the
+ * user_requested_cpus map.
+ */
+bool core_wide(bool system_wide, const char *user_requested_cpu_list);
+
+#endif /* __SMT_H */