Lines Matching refs:atom
194 struct kwork_atom *atom = NULL; in atom_new() local
200 atom = &page->atoms[i]; in atom_new()
215 atom = &page->atoms[0]; in atom_new()
220 atom->time = sample->time; in atom_new()
221 atom->prev = NULL; in atom_new()
222 atom->page_addr = page; in atom_new()
223 atom->bit_inpage = i; in atom_new()
224 return atom; in atom_new()
227 static void atom_free(struct kwork_atom *atom) in atom_free() argument
229 if (atom->prev != NULL) in atom_free()
230 atom_free(atom->prev); in atom_free()
232 clear_bit(atom->bit_inpage, in atom_free()
233 ((struct kwork_atom_page *)atom->page_addr)->bitmap); in atom_free()
236 static void atom_del(struct kwork_atom *atom) in atom_del() argument
238 list_del(&atom->list); in atom_del()
239 atom_free(atom); in atom_del()
390 struct kwork_atom *atom, *dst_atom; in work_push_atom() local
396 atom = atom_new(kwork, sample); in work_push_atom()
397 if (atom == NULL) in work_push_atom()
402 free(atom); in work_push_atom()
413 atom->prev = dst_atom; in work_push_atom()
421 list_add_tail(&atom->list, &work->atom_list[src_type]); in work_push_atom()
435 struct kwork_atom *atom, *src_atom; in work_pop_atom() local
451 atom = list_last_entry_or_null(&work->atom_list[dst_type], in work_pop_atom()
453 if (atom != NULL) in work_pop_atom()
454 return atom; in work_pop_atom()
468 struct kwork_atom *atom, in report_update_exit_event() argument
473 u64 entry_time = atom->time; in report_update_exit_event()
505 struct kwork_atom *atom = NULL; in report_exit_event() local
508 atom = work_pop_atom(kwork, class, KWORK_TRACE_EXIT, in report_exit_event()
514 if (atom != NULL) { in report_exit_event()
515 report_update_exit_event(work, atom, sample); in report_exit_event()
516 atom_del(atom); in report_exit_event()
523 struct kwork_atom *atom, in latency_update_entry_event() argument
528 u64 raise_time = atom->time; in latency_update_entry_event()
560 struct kwork_atom *atom = NULL; in latency_entry_event() local
563 atom = work_pop_atom(kwork, class, KWORK_TRACE_ENTRY, in latency_entry_event()
569 if (atom != NULL) { in latency_entry_event()
570 latency_update_entry_event(work, atom, sample); in latency_entry_event()
571 atom_del(atom); in latency_entry_event()
626 struct kwork_atom *atom, in timehist_print_event() argument
636 timestamp__scnprintf_usec(atom->time, in timehist_print_event()
667 (double)(sample->time - atom->time) / NSEC_PER_MSEC); in timehist_print_event()
672 if (atom->prev != NULL) in timehist_print_event()
674 (double)(atom->time - atom->prev->time) / NSEC_PER_MSEC); in timehist_print_event()
732 struct kwork_atom *atom = NULL; in timehist_exit_event() local
741 atom = work_pop_atom(kwork, class, KWORK_TRACE_EXIT, in timehist_exit_event()
747 if (atom != NULL) { in timehist_exit_event()
749 timehist_print_event(kwork, work, atom, sample, &al); in timehist_exit_event()
750 atom_del(atom); in timehist_exit_event()