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