diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2012-10-06 14:43:20 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2012-10-06 15:33:22 -0400 |
commit | 9d2f8e22fc965bcdd5561d000d234fe2d23657ba (patch) | |
tree | b0f328b99b87e904c3222ab815e8599e0fe7c29e /tools/perf/util/thread.h | |
parent | 0c1fe6b2f30fa275d939071293b6e28771283f6d (diff) |
perf machine: Introduce find_thread method
There are cases where we want just to find a thread if it exists
already, so provide a method for that.
While doing that start moving 'machine' methods to a separate file.
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Namhyung Kim <namhyung@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-8wpzqs9kfupng6xq8hx6lnxa@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/thread.h')
-rw-r--r-- | tools/perf/util/thread.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/perf/util/thread.h b/tools/perf/util/thread.h index f66610b7bacf..f2fa17caa7d5 100644 --- a/tools/perf/util/thread.h +++ b/tools/perf/util/thread.h | |||
@@ -3,6 +3,7 @@ | |||
3 | 3 | ||
4 | #include <linux/rbtree.h> | 4 | #include <linux/rbtree.h> |
5 | #include <unistd.h> | 5 | #include <unistd.h> |
6 | #include <sys/types.h> | ||
6 | #include "symbol.h" | 7 | #include "symbol.h" |
7 | 8 | ||
8 | struct thread { | 9 | struct thread { |
@@ -22,6 +23,7 @@ struct thread { | |||
22 | 23 | ||
23 | struct machine; | 24 | struct machine; |
24 | 25 | ||
26 | struct thread *thread__new(pid_t pid); | ||
25 | void thread__delete(struct thread *self); | 27 | void thread__delete(struct thread *self); |
26 | 28 | ||
27 | int thread__set_comm(struct thread *self, const char *comm); | 29 | int thread__set_comm(struct thread *self, const char *comm); |