Lines Matching refs:st

121 	struct thread_stat *st;  in thread_stat_find()  local
125 st = container_of(node, struct thread_stat, rb); in thread_stat_find()
126 if (st->tid == tid) in thread_stat_find()
127 return st; in thread_stat_find()
128 else if (tid < st->tid) in thread_stat_find()
161 struct thread_stat *st; in thread_stat_findnew_after_first() local
163 st = thread_stat_find(tid); in thread_stat_findnew_after_first()
164 if (st) in thread_stat_findnew_after_first()
165 return st; in thread_stat_findnew_after_first()
167 st = zalloc(sizeof(struct thread_stat)); in thread_stat_findnew_after_first()
168 if (!st) { in thread_stat_findnew_after_first()
173 st->tid = tid; in thread_stat_findnew_after_first()
174 INIT_LIST_HEAD(&st->seq_list); in thread_stat_findnew_after_first()
176 thread_stat_insert(st); in thread_stat_findnew_after_first()
178 return st; in thread_stat_findnew_after_first()
187 struct thread_stat *st; in thread_stat_findnew_first() local
189 st = zalloc(sizeof(struct thread_stat)); in thread_stat_findnew_first()
190 if (!st) { in thread_stat_findnew_first()
194 st->tid = tid; in thread_stat_findnew_first()
195 INIT_LIST_HEAD(&st->seq_list); in thread_stat_findnew_first()
197 rb_link_node(&st->rb, NULL, &thread_stats.rb_node); in thread_stat_findnew_first()
198 rb_insert_color(&st->rb, &thread_stats); in thread_stat_findnew_first()
201 return st; in thread_stat_findnew_first()
277 static void insert_to_result(struct lock_stat *st, in insert_to_result() argument
288 if (bigger(st, p)) in insert_to_result()
294 rb_link_node(&st->rb, parent, rb); in insert_to_result()
295 rb_insert_color(&st->rb, &result); in insert_to_result()
705 struct lock_stat *st; in print_result() local
721 while ((st = pop_from_result())) { in print_result()
723 if (st->discard) { in print_result()
729 if (strlen(st->name) < 16) { in print_result()
731 pr_info("%20s ", st->name); in print_result()
733 strncpy(cut_name, st->name, 16); in print_result()
742 pr_info("%10u ", st->nr_acquired); in print_result()
743 pr_info("%10u ", st->nr_contended); in print_result()
745 pr_info("%15" PRIu64 " ", st->avg_wait_time); in print_result()
746 pr_info("%15" PRIu64 " ", st->wait_time_total); in print_result()
747 pr_info("%15" PRIu64 " ", st->wait_time_max); in print_result()
748 pr_info("%15" PRIu64 " ", st->wait_time_min == ULLONG_MAX ? in print_result()
749 0 : st->wait_time_min); in print_result()
760 struct thread_stat *st; in dump_threads() local
768 st = container_of(node, struct thread_stat, rb); in dump_threads()
769 t = perf_session__findnew(session, st->tid); in dump_threads()
770 pr_info("%10d: %s\n", st->tid, thread__comm_str(t)); in dump_threads()
779 struct lock_stat *st; in dump_map() local
783 list_for_each_entry(st, &lockhash_table[i], hash_entry) { in dump_map()
784 pr_info(" %p: %s\n", st->addr, st->name); in dump_map()
837 struct lock_stat *st; in sort_result() local
840 list_for_each_entry(st, &lockhash_table[i], hash_entry) { in sort_result()
841 insert_to_result(st, compare); in sort_result()