Lines Matching refs:atom

244 	struct kwork_atom *atom = NULL;  in atom_new()  local
250 atom = &page->atoms[i]; in atom_new()
265 atom = &page->atoms[0]; in atom_new()
270 atom->time = sample->time; in atom_new()
271 atom->prev = NULL; in atom_new()
272 atom->page_addr = page; in atom_new()
273 atom->bit_inpage = i; in atom_new()
274 return atom; in atom_new()
277 static void atom_free(struct kwork_atom *atom) in atom_free() argument
279 if (atom->prev != NULL) in atom_free()
280 atom_free(atom->prev); in atom_free()
282 __clear_bit(atom->bit_inpage, in atom_free()
283 ((struct kwork_atom_page *)atom->page_addr)->bitmap); in atom_free()
286 static void atom_del(struct kwork_atom *atom) in atom_del() argument
288 list_del(&atom->list); in atom_del()
289 atom_free(atom); in atom_del()
456 struct kwork_atom *atom, *dst_atom, *last_atom; in work_push_atom() local
462 atom = atom_new(kwork, sample); in work_push_atom()
463 if (atom == NULL) in work_push_atom()
468 atom_free(atom); in work_push_atom()
473 atom_free(atom); in work_push_atom()
481 atom->prev = dst_atom; in work_push_atom()
500 list_add_tail(&atom->list, &work->atom_list[src_type]); in work_push_atom()
514 struct kwork_atom *atom, *src_atom; in work_pop_atom() local
530 atom = list_last_entry_or_null(&work->atom_list[dst_type], in work_pop_atom()
532 if (atom != NULL) in work_pop_atom()
533 return atom; in work_pop_atom()
579 struct kwork_atom *atom, in report_update_exit_event() argument
584 u64 entry_time = atom->time; in report_update_exit_event()
616 struct kwork_atom *atom = NULL; in report_exit_event() local
619 atom = work_pop_atom(kwork, class, KWORK_TRACE_EXIT, in report_exit_event()
625 if (atom != NULL) { in report_exit_event()
626 report_update_exit_event(work, atom, sample); in report_exit_event()
627 atom_del(atom); in report_exit_event()
634 struct kwork_atom *atom, in latency_update_entry_event() argument
639 u64 raise_time = atom->time; in latency_update_entry_event()
671 struct kwork_atom *atom = NULL; in latency_entry_event() local
674 atom = work_pop_atom(kwork, class, KWORK_TRACE_ENTRY, in latency_entry_event()
680 if (atom != NULL) { in latency_entry_event()
681 latency_update_entry_event(work, atom, sample); in latency_entry_event()
682 atom_del(atom); in latency_entry_event()
739 struct kwork_atom *atom, in timehist_print_event() argument
749 timestamp__scnprintf_usec(atom->time, in timehist_print_event()
780 (double)(sample->time - atom->time) / NSEC_PER_MSEC); in timehist_print_event()
785 if (atom->prev != NULL) in timehist_print_event()
787 (double)(atom->time - atom->prev->time) / NSEC_PER_MSEC); in timehist_print_event()
851 struct kwork_atom *atom = NULL; in timehist_exit_event() local
863 atom = work_pop_atom(kwork, class, KWORK_TRACE_EXIT, in timehist_exit_event()
871 if (atom != NULL) { in timehist_exit_event()
873 timehist_print_event(kwork, work, atom, sample, &al); in timehist_exit_event()
874 atom_del(atom); in timehist_exit_event()
883 struct kwork_atom *atom, in top_update_runtime() argument
888 u64 entry_time = atom->time; in top_update_runtime()
915 struct kwork_atom *atom; in top_exit_event() local
917 atom = work_pop_atom(kwork, class, KWORK_TRACE_EXIT, in top_exit_event()
923 if (atom) { in top_exit_event()
929 top_update_runtime(work, atom, sample); in top_exit_event()
931 atom_del(atom); in top_exit_event()
943 struct kwork_atom *atom; in top_sched_switch_event() local
946 atom = work_pop_atom(kwork, class, KWORK_TRACE_EXIT, in top_sched_switch_event()
952 if (atom) { in top_sched_switch_event()
953 top_update_runtime(work, atom, sample); in top_sched_switch_event()
954 atom_del(atom); in top_sched_switch_event()