Lines Matching refs:auxtrace_index
609 struct auxtrace_index *auxtrace_index; in auxtrace_index__alloc() local
611 auxtrace_index = malloc(sizeof(struct auxtrace_index)); in auxtrace_index__alloc()
612 if (!auxtrace_index) in auxtrace_index__alloc()
615 auxtrace_index->nr = 0; in auxtrace_index__alloc()
616 INIT_LIST_HEAD(&auxtrace_index->list); in auxtrace_index__alloc()
618 list_add_tail(&auxtrace_index->list, head); in auxtrace_index__alloc()
625 struct auxtrace_index *auxtrace_index, *n; in auxtrace_index__free() local
627 list_for_each_entry_safe(auxtrace_index, n, head, list) { in auxtrace_index__free()
628 list_del_init(&auxtrace_index->list); in auxtrace_index__free()
629 free(auxtrace_index); in auxtrace_index__free()
633 static struct auxtrace_index *auxtrace_index__last(struct list_head *head) in auxtrace_index__last()
635 struct auxtrace_index *auxtrace_index; in auxtrace_index__last() local
644 auxtrace_index = list_entry(head->prev, struct auxtrace_index, list); in auxtrace_index__last()
646 if (auxtrace_index->nr >= PERF_AUXTRACE_INDEX_ENTRY_COUNT) { in auxtrace_index__last()
650 auxtrace_index = list_entry(head->prev, struct auxtrace_index, in auxtrace_index__last()
654 return auxtrace_index; in auxtrace_index__last()
660 struct auxtrace_index *auxtrace_index; in auxtrace_index__auxtrace_event() local
663 auxtrace_index = auxtrace_index__last(head); in auxtrace_index__auxtrace_event()
664 if (!auxtrace_index) in auxtrace_index__auxtrace_event()
667 nr = auxtrace_index->nr; in auxtrace_index__auxtrace_event()
668 auxtrace_index->entries[nr].file_offset = file_offset; in auxtrace_index__auxtrace_event()
669 auxtrace_index->entries[nr].sz = event->header.size; in auxtrace_index__auxtrace_event()
670 auxtrace_index->nr += 1; in auxtrace_index__auxtrace_event()
676 struct auxtrace_index *auxtrace_index) in auxtrace_index__do_write() argument
681 for (i = 0; i < auxtrace_index->nr; i++) { in auxtrace_index__do_write()
682 ent.file_offset = auxtrace_index->entries[i].file_offset; in auxtrace_index__do_write()
683 ent.sz = auxtrace_index->entries[i].sz; in auxtrace_index__do_write()
692 struct auxtrace_index *auxtrace_index; in auxtrace_index__write() local
696 list_for_each_entry(auxtrace_index, head, list) in auxtrace_index__write()
697 total += auxtrace_index->nr; in auxtrace_index__write()
702 list_for_each_entry(auxtrace_index, head, list) { in auxtrace_index__write()
703 err = auxtrace_index__do_write(fd, auxtrace_index); in auxtrace_index__write()
714 struct auxtrace_index *auxtrace_index; in auxtrace_index__process_entry() local
721 auxtrace_index = auxtrace_index__last(head); in auxtrace_index__process_entry()
722 if (!auxtrace_index) in auxtrace_index__process_entry()
725 nr = auxtrace_index->nr; in auxtrace_index__process_entry()
727 auxtrace_index->entries[nr].file_offset = in auxtrace_index__process_entry()
729 auxtrace_index->entries[nr].sz = bswap_64(ent.sz); in auxtrace_index__process_entry()
731 auxtrace_index->entries[nr].file_offset = ent.file_offset; in auxtrace_index__process_entry()
732 auxtrace_index->entries[nr].sz = ent.sz; in auxtrace_index__process_entry()
735 auxtrace_index->nr = nr + 1; in auxtrace_index__process_entry()
743 struct list_head *head = &session->auxtrace_index; in auxtrace_index__process()
777 struct auxtrace_index *auxtrace_index; in auxtrace_queues__process_index() local
785 list_for_each_entry(auxtrace_index, &session->auxtrace_index, list) { in auxtrace_queues__process_index()
786 for (i = 0; i < auxtrace_index->nr; i++) { in auxtrace_queues__process_index()
787 ent = &auxtrace_index->entries[i]; in auxtrace_queues__process_index()