Lines Matching refs:atom

201 	struct kwork_atom *atom = NULL;  in atom_new()  local
207 atom = &page->atoms[i]; in atom_new()
222 atom = &page->atoms[0]; in atom_new()
227 atom->time = sample->time; in atom_new()
228 atom->prev = NULL; in atom_new()
229 atom->page_addr = page; in atom_new()
230 atom->bit_inpage = i; in atom_new()
231 return atom; in atom_new()
234 static void atom_free(struct kwork_atom *atom) in atom_free() argument
236 if (atom->prev != NULL) in atom_free()
237 atom_free(atom->prev); in atom_free()
239 __clear_bit(atom->bit_inpage, in atom_free()
240 ((struct kwork_atom_page *)atom->page_addr)->bitmap); in atom_free()
243 static void atom_del(struct kwork_atom *atom) in atom_del() argument
245 list_del(&atom->list); in atom_del()
246 atom_free(atom); in atom_del()
397 struct kwork_atom *atom, *dst_atom; in work_push_atom() local
403 atom = atom_new(kwork, sample); in work_push_atom()
404 if (atom == NULL) in work_push_atom()
409 free(atom); in work_push_atom()
420 atom->prev = dst_atom; in work_push_atom()
428 list_add_tail(&atom->list, &work->atom_list[src_type]); in work_push_atom()
442 struct kwork_atom *atom, *src_atom; in work_pop_atom() local
458 atom = list_last_entry_or_null(&work->atom_list[dst_type], in work_pop_atom()
460 if (atom != NULL) in work_pop_atom()
461 return atom; in work_pop_atom()
475 struct kwork_atom *atom, in report_update_exit_event() argument
480 u64 entry_time = atom->time; in report_update_exit_event()
512 struct kwork_atom *atom = NULL; in report_exit_event() local
515 atom = work_pop_atom(kwork, class, KWORK_TRACE_EXIT, in report_exit_event()
521 if (atom != NULL) { in report_exit_event()
522 report_update_exit_event(work, atom, sample); in report_exit_event()
523 atom_del(atom); in report_exit_event()
530 struct kwork_atom *atom, in latency_update_entry_event() argument
535 u64 raise_time = atom->time; in latency_update_entry_event()
567 struct kwork_atom *atom = NULL; in latency_entry_event() local
570 atom = work_pop_atom(kwork, class, KWORK_TRACE_ENTRY, in latency_entry_event()
576 if (atom != NULL) { in latency_entry_event()
577 latency_update_entry_event(work, atom, sample); in latency_entry_event()
578 atom_del(atom); in latency_entry_event()
633 struct kwork_atom *atom, in timehist_print_event() argument
643 timestamp__scnprintf_usec(atom->time, in timehist_print_event()
674 (double)(sample->time - atom->time) / NSEC_PER_MSEC); in timehist_print_event()
679 if (atom->prev != NULL) in timehist_print_event()
681 (double)(atom->time - atom->prev->time) / NSEC_PER_MSEC); in timehist_print_event()
739 struct kwork_atom *atom = NULL; in timehist_exit_event() local
748 atom = work_pop_atom(kwork, class, KWORK_TRACE_EXIT, in timehist_exit_event()
754 if (atom != NULL) { in timehist_exit_event()
756 timehist_print_event(kwork, work, atom, sample, &al); in timehist_exit_event()
757 atom_del(atom); in timehist_exit_event()