Lines Matching defs:atoms

66 	struct sched_atom	**atoms;
370 task->atoms = realloc(task->atoms, size);
371 BUG_ON(!task->atoms);
373 task->atoms[idx] = event;
383 return task->atoms[task->nr_events - 1];
647 perf_sched__process_event(sched, this_task->atoms[i]);
971 struct work_atoms *atoms;
974 atoms = container_of(node, struct work_atoms, node);
976 cmp = thread_lat_cmp(sort_list, &key, atoms);
982 BUG_ON(thread != atoms->thread);
983 return atoms;
1019 struct work_atoms *atoms = zalloc(sizeof(*atoms));
1020 if (!atoms) {
1025 atoms->thread = thread__get(thread);
1026 INIT_LIST_HEAD(&atoms->work_list);
1027 __thread_latency_insert(&sched->atom_root, atoms, &sched->cmp_pid);
1039 add_sched_out_event(struct work_atoms *atoms,
1056 list_add_tail(&atom->list, &atoms->work_list);
1061 add_runtime_event(struct work_atoms *atoms, u64 delta,
1066 BUG_ON(list_empty(&atoms->work_list));
1068 atom = list_entry(atoms->work_list.prev, struct work_atom, list);
1071 atoms->total_runtime += delta;
1075 add_sched_in_event(struct work_atoms *atoms, u64 timestamp)
1080 if (list_empty(&atoms->work_list))
1083 atom = list_entry(atoms->work_list.prev, struct work_atom, list);
1097 atoms->total_lat += delta;
1098 if (delta > atoms->max_lat) {
1099 atoms->max_lat = delta;
1100 atoms->max_lat_start = atom->wake_up_time;
1101 atoms->max_lat_end = timestamp;
1103 atoms->nb_atoms++;
1184 struct work_atoms *atoms = thread_atoms_search(&sched->atom_root, thread, &sched->cmp_pid);
1192 if (!atoms) {
1195 atoms = thread_atoms_search(&sched->atom_root, thread, &sched->cmp_pid);
1196 if (!atoms) {
1200 if (add_sched_out_event(atoms, 'R', timestamp))
1204 add_runtime_event(atoms, runtime, timestamp);
1217 struct work_atoms *atoms;
1226 atoms = thread_atoms_search(&sched->atom_root, wakee, &sched->cmp_pid);
1227 if (!atoms) {
1230 atoms = thread_atoms_search(&sched->atom_root, wakee, &sched->cmp_pid);
1231 if (!atoms) {
1235 if (add_sched_out_event(atoms, 'S', timestamp))
1239 BUG_ON(list_empty(&atoms->work_list));
1241 atom = list_entry(atoms->work_list.prev, struct work_atom, list);
1279 struct work_atoms *atoms;
1293 atoms = thread_atoms_search(&sched->atom_root, migrant, &sched->cmp_pid);
1294 if (!atoms) {
1298 atoms = thread_atoms_search(&sched->atom_root, migrant, &sched->cmp_pid);
1299 if (!atoms) {
1303 if (add_sched_out_event(atoms, 'R', timestamp))
1307 BUG_ON(list_empty(&atoms->work_list));
1309 atom = list_entry(atoms->work_list.prev, struct work_atom, list);
3308 printf("run atoms optimized: %ld\n",