summaryrefslogtreecommitdiff
path: root/tools/perf/util/machine.h
diff options
context:
space:
mode:
authorAdrian Hunter <adrian.hunter@intel.com>2021-02-18 11:57:56 +0200
committerArnaldo Carvalho de Melo <acme@redhat.com>2021-02-18 16:14:33 -0300
commit3035cb6cbd2d62a764fa451ed9534eafdd0b446c (patch)
tree4b7fc4f6d8eee83223cd9214909d6bab7d422459 /tools/perf/util/machine.h
parentfcda5ff711d9ddb7a92fff38b2cc153be8123c0e (diff)
perf machine: Factor out machine__idle_thread()
Factor out machine__idle_thread() so it can be re-used for guest machines. A thread is needed to find executable code, even for the guest kernel. To avoid possible future pid number conflicts, the idle thread can be used. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Acked-by: Andi Kleen <ak@linux.intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Jiri Olsa <jolsa@redhat.com> Link: https://lore.kernel.org/r/20210218095801.19576-7-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/machine.h')
-rw-r--r--tools/perf/util/machine.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/perf/util/machine.h b/tools/perf/util/machine.h
index 022c19ecd287..7377ed6efdf1 100644
--- a/tools/perf/util/machine.h
+++ b/tools/perf/util/machine.h
@@ -106,6 +106,7 @@ u8 machine__addr_cpumode(struct machine *machine, u8 cpumode, u64 addr);
struct thread *machine__find_thread(struct machine *machine, pid_t pid,
pid_t tid);
+struct thread *machine__idle_thread(struct machine *machine);
struct comm *machine__thread_exec_comm(struct machine *machine,
struct thread *thread);