summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/machine.h
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2016-05-04 10:09:33 -0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2016-05-05 21:03:55 -0300
commitd2c11034406733374d1cdc588c53bb076d95a4e2 (patch)
tree02982c3afd746b12a094f306a7c84a7494dd1861 /tools/perf/util/machine.h
parent1b6de5917172967acd8db4d222df4225d23a8a60 (diff)
downloadlinux-d2c11034406733374d1cdc588c53bb076d95a4e2.tar.gz
linux-d2c11034406733374d1cdc588c53bb076d95a4e2.tar.bz2
linux-d2c11034406733374d1cdc588c53bb076d95a4e2.zip
perf machine: Introduce number of threads member
To be used, for instance, for pre-allocating an rb_tree array for sorting by other keys besides the current pid one. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Milian Wolff <milian.wolff@kdab.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Wang Nan <wangnan0@huawei.com> Link: http://lkml.kernel.org/n/tip-ja0ifkwue7ttjhbwijn6g6eu@git.kernel.org 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 4822de5e4544..83f46790c52f 100644
--- a/tools/perf/util/machine.h
+++ b/tools/perf/util/machine.h
@@ -31,6 +31,7 @@ struct machine {
char *root_dir;
struct rb_root threads;
pthread_rwlock_t threads_lock;
+ unsigned int nr_threads;
struct list_head dead_threads;
struct thread *last_match;
struct vdso_info *vdso_info;