diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/perf/util/machine.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c index b7d477fbda02..34fc7c8672e4 100644 --- a/tools/perf/util/machine.c +++ b/tools/perf/util/machine.c | |||
@@ -13,12 +13,18 @@ | |||
13 | #include <symbol/kallsyms.h> | 13 | #include <symbol/kallsyms.h> |
14 | #include "unwind.h" | 14 | #include "unwind.h" |
15 | 15 | ||
16 | static void dsos__init(struct dsos *dsos) | ||
17 | { | ||
18 | INIT_LIST_HEAD(&dsos->head); | ||
19 | dsos->root = RB_ROOT; | ||
20 | } | ||
21 | |||
16 | int machine__init(struct machine *machine, const char *root_dir, pid_t pid) | 22 | int machine__init(struct machine *machine, const char *root_dir, pid_t pid) |
17 | { | 23 | { |
18 | map_groups__init(&machine->kmaps); | 24 | map_groups__init(&machine->kmaps); |
19 | RB_CLEAR_NODE(&machine->rb_node); | 25 | RB_CLEAR_NODE(&machine->rb_node); |
20 | INIT_LIST_HEAD(&machine->user_dsos.head); | 26 | dsos__init(&machine->user_dsos); |
21 | INIT_LIST_HEAD(&machine->kernel_dsos.head); | 27 | dsos__init(&machine->kernel_dsos); |
22 | 28 | ||
23 | machine->threads = RB_ROOT; | 29 | machine->threads = RB_ROOT; |
24 | INIT_LIST_HEAD(&machine->dead_threads); | 30 | INIT_LIST_HEAD(&machine->dead_threads); |