Lines Matching refs:atoms
51 struct sched_atom **atoms; member
229 task->atoms = realloc(task->atoms, size); in get_new_event()
230 BUG_ON(!task->atoms); in get_new_event()
232 task->atoms[idx] = event; in get_new_event()
242 return task->atoms[task->nr_events - 1]; in last_event()
462 process_sched_event(this_task, this_task->atoms[i]); in thread_func()
887 struct work_atoms *atoms; in thread_atoms_search() local
890 atoms = container_of(node, struct work_atoms, node); in thread_atoms_search()
892 cmp = thread_lat_cmp(sort_list, &key, atoms); in thread_atoms_search()
898 BUG_ON(thread != atoms->thread); in thread_atoms_search()
899 return atoms; in thread_atoms_search()
932 struct work_atoms *atoms = zalloc(sizeof(*atoms)); in thread_atoms_insert() local
933 if (!atoms) in thread_atoms_insert()
936 atoms->thread = thread; in thread_atoms_insert()
937 INIT_LIST_HEAD(&atoms->work_list); in thread_atoms_insert()
938 __thread_latency_insert(&atom_root, atoms, &cmp_pid); in thread_atoms_insert()
960 add_sched_out_event(struct work_atoms *atoms, in add_sched_out_event() argument
975 list_add_tail(&atom->list, &atoms->work_list); in add_sched_out_event()
979 add_runtime_event(struct work_atoms *atoms, u64 delta, u64 timestamp __used) in add_runtime_event() argument
983 BUG_ON(list_empty(&atoms->work_list)); in add_runtime_event()
985 atom = list_entry(atoms->work_list.prev, struct work_atom, list); in add_runtime_event()
988 atoms->total_runtime += delta; in add_runtime_event()
992 add_sched_in_event(struct work_atoms *atoms, u64 timestamp) in add_sched_in_event() argument
997 if (list_empty(&atoms->work_list)) in add_sched_in_event()
1000 atom = list_entry(atoms->work_list.prev, struct work_atom, list); in add_sched_in_event()
1014 atoms->total_lat += delta; in add_sched_in_event()
1015 if (delta > atoms->max_lat) { in add_sched_in_event()
1016 atoms->max_lat = delta; in add_sched_in_event()
1017 atoms->max_lat_at = timestamp; in add_sched_in_event()
1019 atoms->nb_atoms++; in add_sched_in_event()
1084 struct work_atoms *atoms = thread_atoms_search(&atom_root, thread, &cmp_pid); in latency_runtime_event() local
1087 if (!atoms) { in latency_runtime_event()
1089 atoms = thread_atoms_search(&atom_root, thread, &cmp_pid); in latency_runtime_event()
1090 if (!atoms) in latency_runtime_event()
1092 add_sched_out_event(atoms, 'R', timestamp); in latency_runtime_event()
1095 add_runtime_event(atoms, runtime_event->runtime, timestamp); in latency_runtime_event()
1106 struct work_atoms *atoms; in latency_wakeup_event() local
1115 atoms = thread_atoms_search(&atom_root, wakee, &cmp_pid); in latency_wakeup_event()
1116 if (!atoms) { in latency_wakeup_event()
1118 atoms = thread_atoms_search(&atom_root, wakee, &cmp_pid); in latency_wakeup_event()
1119 if (!atoms) in latency_wakeup_event()
1121 add_sched_out_event(atoms, 'S', timestamp); in latency_wakeup_event()
1124 BUG_ON(list_empty(&atoms->work_list)); in latency_wakeup_event()
1126 atom = list_entry(atoms->work_list.prev, struct work_atom, list); in latency_wakeup_event()
1154 struct work_atoms *atoms; in latency_migrate_task_event() local
1165 atoms = thread_atoms_search(&atom_root, migrant, &cmp_pid); in latency_migrate_task_event()
1166 if (!atoms) { in latency_migrate_task_event()
1169 atoms = thread_atoms_search(&atom_root, migrant, &cmp_pid); in latency_migrate_task_event()
1170 if (!atoms) in latency_migrate_task_event()
1172 add_sched_out_event(atoms, 'R', timestamp); in latency_migrate_task_event()
1175 BUG_ON(list_empty(&atoms->work_list)); in latency_migrate_task_event()
1177 atom = list_entry(atoms->work_list.prev, struct work_atom, list); in latency_migrate_task_event()