Lines Matching defs:atoms

67 	struct sched_atom	**atoms;
354 task->atoms = realloc(task->atoms, size);
355 BUG_ON(!task->atoms);
357 task->atoms[idx] = event;
367 return task->atoms[task->nr_events - 1];
630 perf_sched__process_event(sched, this_task->atoms[i]);
975 struct work_atoms *atoms;
978 atoms = container_of(node, struct work_atoms, node);
980 cmp = thread_lat_cmp(sort_list, &key, atoms);
986 BUG_ON(thread != atoms->thread);
987 return atoms;
1023 struct work_atoms *atoms = zalloc(sizeof(*atoms));
1024 if (!atoms) {
1029 atoms->thread = thread__get(thread);
1030 INIT_LIST_HEAD(&atoms->work_list);
1031 __thread_latency_insert(&sched->atom_root, atoms, &sched->cmp_pid);
1036 add_sched_out_event(struct work_atoms *atoms,
1053 list_add_tail(&atom->list, &atoms->work_list);
1058 add_runtime_event(struct work_atoms *atoms, u64 delta,
1063 BUG_ON(list_empty(&atoms->work_list));
1065 atom = list_entry(atoms->work_list.prev, struct work_atom, list);
1068 atoms->total_runtime += delta;
1072 add_sched_in_event(struct work_atoms *atoms, u64 timestamp)
1077 if (list_empty(&atoms->work_list))
1080 atom = list_entry(atoms->work_list.prev, struct work_atom, list);
1094 atoms->total_lat += delta;
1095 if (delta > atoms->max_lat) {
1096 atoms->max_lat = delta;
1097 atoms->max_lat_start = atom->wake_up_time;
1098 atoms->max_lat_end = timestamp;
1100 atoms->nb_atoms++;
1181 struct work_atoms *atoms = thread_atoms_search(&sched->atom_root, thread, &sched->cmp_pid);
1189 if (!atoms) {
1192 atoms = thread_atoms_search(&sched->atom_root, thread, &sched->cmp_pid);
1193 if (!atoms) {
1197 if (add_sched_out_event(atoms, 'R', timestamp))
1201 add_runtime_event(atoms, runtime, timestamp);
1214 struct work_atoms *atoms;
1223 atoms = thread_atoms_search(&sched->atom_root, wakee, &sched->cmp_pid);
1224 if (!atoms) {
1227 atoms = thread_atoms_search(&sched->atom_root, wakee, &sched->cmp_pid);
1228 if (!atoms) {
1232 if (add_sched_out_event(atoms, 'S', timestamp))
1236 BUG_ON(list_empty(&atoms->work_list));
1238 atom = list_entry(atoms->work_list.prev, struct work_atom, list);
1276 struct work_atoms *atoms;
1290 atoms = thread_atoms_search(&sched->atom_root, migrant, &sched->cmp_pid);
1291 if (!atoms) {
1295 atoms = thread_atoms_search(&sched->atom_root, migrant, &sched->cmp_pid);
1296 if (!atoms) {
1300 if (add_sched_out_event(atoms, 'R', timestamp))
1304 BUG_ON(list_empty(&atoms->work_list));
1306 atom = list_entry(atoms->work_list.prev, struct work_atom, list);
3374 printf("run atoms optimized: %ld\n",