Lines Matching refs:auxtrace_index

806 	struct auxtrace_index *auxtrace_index;  in auxtrace_index__alloc()  local
808 auxtrace_index = malloc(sizeof(struct auxtrace_index)); in auxtrace_index__alloc()
809 if (!auxtrace_index) in auxtrace_index__alloc()
812 auxtrace_index->nr = 0; in auxtrace_index__alloc()
813 INIT_LIST_HEAD(&auxtrace_index->list); in auxtrace_index__alloc()
815 list_add_tail(&auxtrace_index->list, head); in auxtrace_index__alloc()
822 struct auxtrace_index *auxtrace_index, *n; in auxtrace_index__free() local
824 list_for_each_entry_safe(auxtrace_index, n, head, list) { in auxtrace_index__free()
825 list_del_init(&auxtrace_index->list); in auxtrace_index__free()
826 free(auxtrace_index); in auxtrace_index__free()
830 static struct auxtrace_index *auxtrace_index__last(struct list_head *head) in auxtrace_index__last()
832 struct auxtrace_index *auxtrace_index; in auxtrace_index__last() local
841 auxtrace_index = list_entry(head->prev, struct auxtrace_index, list); in auxtrace_index__last()
843 if (auxtrace_index->nr >= PERF_AUXTRACE_INDEX_ENTRY_COUNT) { in auxtrace_index__last()
847 auxtrace_index = list_entry(head->prev, struct auxtrace_index, in auxtrace_index__last()
851 return auxtrace_index; in auxtrace_index__last()
857 struct auxtrace_index *auxtrace_index; in auxtrace_index__auxtrace_event() local
860 auxtrace_index = auxtrace_index__last(head); in auxtrace_index__auxtrace_event()
861 if (!auxtrace_index) in auxtrace_index__auxtrace_event()
864 nr = auxtrace_index->nr; in auxtrace_index__auxtrace_event()
865 auxtrace_index->entries[nr].file_offset = file_offset; in auxtrace_index__auxtrace_event()
866 auxtrace_index->entries[nr].sz = event->header.size; in auxtrace_index__auxtrace_event()
867 auxtrace_index->nr += 1; in auxtrace_index__auxtrace_event()
873 struct auxtrace_index *auxtrace_index) in auxtrace_index__do_write() argument
878 for (i = 0; i < auxtrace_index->nr; i++) { in auxtrace_index__do_write()
879 ent.file_offset = auxtrace_index->entries[i].file_offset; in auxtrace_index__do_write()
880 ent.sz = auxtrace_index->entries[i].sz; in auxtrace_index__do_write()
889 struct auxtrace_index *auxtrace_index; in auxtrace_index__write() local
893 list_for_each_entry(auxtrace_index, head, list) in auxtrace_index__write()
894 total += auxtrace_index->nr; in auxtrace_index__write()
899 list_for_each_entry(auxtrace_index, head, list) { in auxtrace_index__write()
900 err = auxtrace_index__do_write(fd, auxtrace_index); in auxtrace_index__write()
911 struct auxtrace_index *auxtrace_index; in auxtrace_index__process_entry() local
918 auxtrace_index = auxtrace_index__last(head); in auxtrace_index__process_entry()
919 if (!auxtrace_index) in auxtrace_index__process_entry()
922 nr = auxtrace_index->nr; in auxtrace_index__process_entry()
924 auxtrace_index->entries[nr].file_offset = in auxtrace_index__process_entry()
926 auxtrace_index->entries[nr].sz = bswap_64(ent.sz); in auxtrace_index__process_entry()
928 auxtrace_index->entries[nr].file_offset = ent.file_offset; in auxtrace_index__process_entry()
929 auxtrace_index->entries[nr].sz = ent.sz; in auxtrace_index__process_entry()
932 auxtrace_index->nr = nr + 1; in auxtrace_index__process_entry()
940 struct list_head *head = &session->auxtrace_index; in auxtrace_index__process()
974 struct auxtrace_index *auxtrace_index; in auxtrace_queues__process_index() local
982 list_for_each_entry(auxtrace_index, &session->auxtrace_index, list) { in auxtrace_queues__process_index()
983 for (i = 0; i < auxtrace_index->nr; i++) { in auxtrace_queues__process_index()
984 ent = &auxtrace_index->entries[i]; in auxtrace_queues__process_index()