Lines Matching refs:atoms
67 struct sched_atom **atoms; member
372 task->atoms = realloc(task->atoms, size); in get_new_event()
373 BUG_ON(!task->atoms); in get_new_event()
375 task->atoms[idx] = event; in get_new_event()
385 return task->atoms[task->nr_events - 1]; in last_event()
648 perf_sched__process_event(sched, this_task->atoms[i]); in thread_func()
993 struct work_atoms *atoms; in thread_atoms_search() local
996 atoms = container_of(node, struct work_atoms, node); in thread_atoms_search()
998 cmp = thread_lat_cmp(sort_list, &key, atoms); in thread_atoms_search()
1004 BUG_ON(thread != atoms->thread); in thread_atoms_search()
1005 return atoms; in thread_atoms_search()
1041 struct work_atoms *atoms = zalloc(sizeof(*atoms)); in thread_atoms_insert() local
1042 if (!atoms) { in thread_atoms_insert()
1047 atoms->thread = thread__get(thread); in thread_atoms_insert()
1048 INIT_LIST_HEAD(&atoms->work_list); in thread_atoms_insert()
1049 __thread_latency_insert(&sched->atom_root, atoms, &sched->cmp_pid); in thread_atoms_insert()
1061 add_sched_out_event(struct work_atoms *atoms, in add_sched_out_event() argument
1078 list_add_tail(&atom->list, &atoms->work_list); in add_sched_out_event()
1083 add_runtime_event(struct work_atoms *atoms, u64 delta, in add_runtime_event() argument
1088 BUG_ON(list_empty(&atoms->work_list)); in add_runtime_event()
1090 atom = list_entry(atoms->work_list.prev, struct work_atom, list); in add_runtime_event()
1093 atoms->total_runtime += delta; in add_runtime_event()
1097 add_sched_in_event(struct work_atoms *atoms, u64 timestamp) in add_sched_in_event() argument
1102 if (list_empty(&atoms->work_list)) in add_sched_in_event()
1105 atom = list_entry(atoms->work_list.prev, struct work_atom, list); in add_sched_in_event()
1119 atoms->total_lat += delta; in add_sched_in_event()
1120 if (delta > atoms->max_lat) { in add_sched_in_event()
1121 atoms->max_lat = delta; in add_sched_in_event()
1122 atoms->max_lat_start = atom->wake_up_time; in add_sched_in_event()
1123 atoms->max_lat_end = timestamp; in add_sched_in_event()
1125 atoms->nb_atoms++; in add_sched_in_event()
1206 struct work_atoms *atoms = thread_atoms_search(&sched->atom_root, thread, &sched->cmp_pid); in latency_runtime_event() local
1214 if (!atoms) { in latency_runtime_event()
1217 atoms = thread_atoms_search(&sched->atom_root, thread, &sched->cmp_pid); in latency_runtime_event()
1218 if (!atoms) { in latency_runtime_event()
1222 if (add_sched_out_event(atoms, 'R', timestamp)) in latency_runtime_event()
1226 add_runtime_event(atoms, runtime, timestamp); in latency_runtime_event()
1239 struct work_atoms *atoms; in latency_wakeup_event() local
1248 atoms = thread_atoms_search(&sched->atom_root, wakee, &sched->cmp_pid); in latency_wakeup_event()
1249 if (!atoms) { in latency_wakeup_event()
1252 atoms = thread_atoms_search(&sched->atom_root, wakee, &sched->cmp_pid); in latency_wakeup_event()
1253 if (!atoms) { in latency_wakeup_event()
1257 if (add_sched_out_event(atoms, 'S', timestamp)) in latency_wakeup_event()
1261 BUG_ON(list_empty(&atoms->work_list)); in latency_wakeup_event()
1263 atom = list_entry(atoms->work_list.prev, struct work_atom, list); in latency_wakeup_event()
1301 struct work_atoms *atoms; in latency_migrate_task_event() local
1315 atoms = thread_atoms_search(&sched->atom_root, migrant, &sched->cmp_pid); in latency_migrate_task_event()
1316 if (!atoms) { in latency_migrate_task_event()
1320 atoms = thread_atoms_search(&sched->atom_root, migrant, &sched->cmp_pid); in latency_migrate_task_event()
1321 if (!atoms) { in latency_migrate_task_event()
1325 if (add_sched_out_event(atoms, 'R', timestamp)) in latency_migrate_task_event()
1329 BUG_ON(list_empty(&atoms->work_list)); in latency_migrate_task_event()
1331 atom = list_entry(atoms->work_list.prev, struct work_atom, list); in latency_migrate_task_event()