Lines Matching full:machines
192 void machines__init(struct machines *machines) in machines__init() argument
194 machine__init(&machines->host, "", HOST_KERNEL_ID); in machines__init()
195 machines->guests = RB_ROOT_CACHED; in machines__init()
198 void machines__exit(struct machines *machines) in machines__exit() argument
200 machine__exit(&machines->host); in machines__exit()
204 struct machine *machines__add(struct machines *machines, pid_t pid, in machines__add() argument
207 struct rb_node **p = &machines->guests.rb_root.rb_node; in machines__add()
232 rb_insert_color_cached(&machine->rb_node, &machines->guests, leftmost); in machines__add()
234 machine->machines = machines; in machines__add()
239 void machines__set_comm_exec(struct machines *machines, bool comm_exec) in machines__set_comm_exec() argument
243 machines->host.comm_exec = comm_exec; in machines__set_comm_exec()
245 for (nd = rb_first_cached(&machines->guests); nd; nd = rb_next(nd)) { in machines__set_comm_exec()
252 struct machine *machines__find(struct machines *machines, pid_t pid) in machines__find() argument
254 struct rb_node **p = &machines->guests.rb_root.rb_node; in machines__find()
260 return &machines->host; in machines__find()
278 struct machine *machines__findnew(struct machines *machines, pid_t pid) in machines__findnew() argument
282 struct machine *machine = machines__find(machines, pid); in machines__findnew()
307 machine = machines__add(machines, pid, root_dir); in machines__findnew()
312 struct machine *machines__find_guest(struct machines *machines, pid_t pid) in machines__find_guest() argument
314 struct machine *machine = machines__find(machines, pid); in machines__find_guest()
317 machine = machines__findnew(machines, DEFAULT_GUEST_KERNEL_ID); in machines__find_guest()
387 struct thread *machines__findnew_guest_code(struct machines *machines, pid_t pid) in machines__findnew_guest_code() argument
389 struct machine *host_machine = machines__find(machines, HOST_KERNEL_ID); in machines__findnew_guest_code()
390 struct machine *machine = machines__findnew(machines, pid); in machines__findnew_guest_code()
397 struct machines *machines = machine->machines; in machine__findnew_guest_code() local
400 if (!machines) in machine__findnew_guest_code()
403 host_machine = machines__find(machines, HOST_KERNEL_ID); in machine__findnew_guest_code()
408 void machines__process_guests(struct machines *machines, in machines__process_guests() argument
413 for (nd = rb_first_cached(&machines->guests); nd; nd = rb_next(nd)) { in machines__process_guests()
419 void machines__set_id_hdr_size(struct machines *machines, u16 id_hdr_size) in machines__set_id_hdr_size() argument
424 machines->host.id_hdr_size = id_hdr_size; in machines__set_id_hdr_size()
426 for (node = rb_first_cached(&machines->guests); node; in machines__set_id_hdr_size()
855 size_t machines__fprintf_dsos(struct machines *machines, FILE *fp) in machines__fprintf_dsos() argument
858 size_t ret = dsos__fprintf(&machines->host.dsos, fp); in machines__fprintf_dsos()
860 for (nd = rb_first_cached(&machines->guests); nd; nd = rb_next(nd)) { in machines__fprintf_dsos()
874 size_t machines__fprintf_dsos_buildid(struct machines *machines, FILE *fp, in machines__fprintf_dsos_buildid() argument
878 size_t ret = machine__fprintf_dsos_buildid(&machines->host, fp, skip, parm); in machines__fprintf_dsos_buildid()
880 for (nd = rb_first_cached(&machines->guests); nd; nd = rb_next(nd)) { in machines__fprintf_dsos_buildid()
1183 int machines__create_guest_kernel_maps(struct machines *machines) in machines__create_guest_kernel_maps() argument
1195 machines__create_kernel_maps(machines, DEFAULT_GUEST_KERNEL_ID); in machines__create_guest_kernel_maps()
1223 machines__create_kernel_maps(machines, pid); in machines__create_guest_kernel_maps()
1232 void machines__destroy_kernel_maps(struct machines *machines) in machines__destroy_kernel_maps() argument
1234 struct rb_node *next = rb_first_cached(&machines->guests); in machines__destroy_kernel_maps()
1236 machine__destroy_kernel_maps(&machines->host); in machines__destroy_kernel_maps()
1242 rb_erase_cached(&pos->rb_node, &machines->guests); in machines__destroy_kernel_maps()
1247 int machines__create_kernel_maps(struct machines *machines, pid_t pid) in machines__create_kernel_maps() argument
1249 struct machine *machine = machines__findnew(machines, pid); in machines__create_kernel_maps()
2987 int machines__for_each_thread(struct machines *machines, in machines__for_each_thread() argument
2994 rc = machine__for_each_thread(&machines->host, fn, priv); in machines__for_each_thread()
2998 for (nd = rb_first_cached(&machines->guests); nd; nd = rb_next(nd)) { in machines__for_each_thread()