Lines Matching refs:nd
46 static void __machine__remove_thread(struct machine *machine, struct thread_rb_node *nd,
75 static int thread_rb_node__cmp_tid(const void *key, const struct rb_node *nd) in thread_rb_node__cmp_tid() argument
79 return to_find - (int)thread__tid(rb_entry(nd, struct thread_rb_node, rb_node)->thread); in thread_rb_node__cmp_tid()
86 struct rb_node *nd = rb_find(&to_find, tree, thread_rb_node__cmp_tid); in thread_rb_node__find() local
88 return rb_entry(nd, struct thread_rb_node, rb_node); in thread_rb_node__find()
225 struct rb_node *nd; in machine__delete_threads() local
231 nd = rb_first_cached(&threads->entries); in machine__delete_threads()
232 while (nd) { in machine__delete_threads()
233 struct thread_rb_node *trb = rb_entry(nd, struct thread_rb_node, rb_node); in machine__delete_threads()
235 nd = rb_next(nd); in machine__delete_threads()
323 struct rb_node *nd; in machines__set_comm_exec() local
327 for (nd = rb_first_cached(&machines->guests); nd; nd = rb_next(nd)) { in machines__set_comm_exec()
328 struct machine *machine = rb_entry(nd, struct machine, rb_node); in machines__set_comm_exec()
493 struct rb_node *nd; in machines__process_guests() local
495 for (nd = rb_first_cached(&machines->guests); nd; nd = rb_next(nd)) { in machines__process_guests()
496 struct machine *pos = rb_entry(nd, struct machine, rb_node); in machines__process_guests()
626 struct thread_rb_node *nd; in ____machine__findnew_thread() local
658 nd = malloc(sizeof(*nd)); in ____machine__findnew_thread()
659 if (nd == NULL) { in ____machine__findnew_thread()
663 nd->thread = th; in ____machine__findnew_thread()
665 rb_link_node(&nd->rb_node, parent, p); in ____machine__findnew_thread()
666 rb_insert_color_cached(&nd->rb_node, &threads->entries, leftmost); in ____machine__findnew_thread()
676 rb_erase_cached(&nd->rb_node, &threads->entries); in ____machine__findnew_thread()
677 RB_CLEAR_NODE(&nd->rb_node); in ____machine__findnew_thread()
678 free(nd); in ____machine__findnew_thread()
1074 struct rb_node *nd; in machines__fprintf_dsos() local
1077 for (nd = rb_first_cached(&machines->guests); nd; nd = rb_next(nd)) { in machines__fprintf_dsos()
1078 struct machine *pos = rb_entry(nd, struct machine, rb_node); in machines__fprintf_dsos()
1094 struct rb_node *nd; in machines__fprintf_dsos_buildid() local
1097 for (nd = rb_first_cached(&machines->guests); nd; nd = rb_next(nd)) { in machines__fprintf_dsos_buildid()
1098 struct machine *pos = rb_entry(nd, struct machine, rb_node); in machines__fprintf_dsos_buildid()
1126 struct rb_node *nd; in machine__fprintf() local
1137 for (nd = rb_first_cached(&threads->entries); nd; in machine__fprintf()
1138 nd = rb_next(nd)) { in machine__fprintf()
1139 struct thread *pos = rb_entry(nd, struct thread_rb_node, rb_node)->thread; in machine__fprintf()
2053 static void __machine__remove_thread(struct machine *machine, struct thread_rb_node *nd, in __machine__remove_thread() argument
2058 if (!nd) in __machine__remove_thread()
2059 nd = thread_rb_node__find(th, &threads->entries.rb_root); in __machine__remove_thread()
2069 thread__put(nd->thread); in __machine__remove_thread()
2070 rb_erase_cached(&nd->rb_node, &threads->entries); in __machine__remove_thread()
2071 RB_CLEAR_NODE(&nd->rb_node); in __machine__remove_thread()
2074 free(nd); in __machine__remove_thread()
3215 struct rb_node *nd; in machine__for_each_thread() local
3221 for (nd = rb_first_cached(&threads->entries); nd; in machine__for_each_thread()
3222 nd = rb_next(nd)) { in machine__for_each_thread()
3223 struct thread_rb_node *trb = rb_entry(nd, struct thread_rb_node, rb_node); in machine__for_each_thread()
3237 struct rb_node *nd; in machines__for_each_thread() local
3244 for (nd = rb_first_cached(&machines->guests); nd; nd = rb_next(nd)) { in machines__for_each_thread()
3245 struct machine *machine = rb_entry(nd, struct machine, rb_node); in machines__for_each_thread()