Lines Matching refs:entry
70 static int read_entry_from_ldc_file(struct ldc_entry *entry, uint32_t log_entry_address);
110 uint32_t get_uuid_key(const struct sof_uuid_entry *entry) in get_uuid_key() argument
120 return (uintptr_t)entry - (uintptr_t)uids_dict - in get_uuid_key()
187 struct ldc_entry entry; in asprintf_entry_text() local
190 ret = read_entry_from_ldc_file(&entry, entry_address); in asprintf_entry_text()
194 free(entry.file_name); in asprintf_entry_text()
196 return entry.text; in asprintf_entry_text()
466 const struct ldc_entry *entry, uint64_t last_timestamp) in print_entry_params() argument
527 entry->header.level == use_colors ? in print_entry_params()
530 entry->header.level, in print_entry_params()
531 get_component_name(entry->header.component_class, dma_log->uid), in print_entry_params()
539 format_file_name(entry->file_name, raw_output), in print_entry_params()
540 entry->header.line_idx); in print_entry_params()
561 get_component_name(entry->header.component_class, dma_log->uid), in print_entry_params()
568 format_file_name(entry->file_name, raw_output), in print_entry_params()
569 entry->header.line_idx); in print_entry_params()
573 use_colors ? get_level_color(entry->header.level) : "", in print_entry_params()
574 get_level_name(entry->header.level)); in print_entry_params()
578 process_params(&proc_entry, entry, use_colors); in print_entry_params()
612 static int read_entry_from_ldc_file(struct ldc_entry *entry, uint32_t log_entry_address) in read_entry_from_ldc_file() argument
622 entry->file_name = NULL; in read_entry_from_ldc_file()
623 entry->text = NULL; in read_entry_from_ldc_file()
624 entry->params = NULL; in read_entry_from_ldc_file()
630 ret = fread(&entry->header, sizeof(entry->header), 1, global_config->ldc_fd); in read_entry_from_ldc_file()
637 if (entry->header.file_name_len > TRACE_MAX_FILENAME_LEN) { in read_entry_from_ldc_file()
639 entry->header.file_name_len); in read_entry_from_ldc_file()
643 entry->file_name = (char *)malloc(entry->header.file_name_len); in read_entry_from_ldc_file()
645 if (!entry->file_name) { in read_entry_from_ldc_file()
647 entry->header.file_name_len); in read_entry_from_ldc_file()
652 ret = fread(entry->file_name, sizeof(char), entry->header.file_name_len, in read_entry_from_ldc_file()
654 if (ret != entry->header.file_name_len) { in read_entry_from_ldc_file()
662 if (entry->header.text_len > TRACE_MAX_TEXT_LEN) { in read_entry_from_ldc_file()
667 entry->text = (char *)malloc(entry->header.text_len); in read_entry_from_ldc_file()
668 if (!entry->text) { in read_entry_from_ldc_file()
669 log_err("can't allocate %d byte for entry.text\n", entry->header.text_len); in read_entry_from_ldc_file()
673 ret = fread(entry->text, sizeof(char), entry->header.text_len, global_config->ldc_fd); in read_entry_from_ldc_file()
674 if (ret != entry->header.text_len) { in read_entry_from_ldc_file()
684 free(entry->text); in read_entry_from_ldc_file()
685 entry->text = NULL; in read_entry_from_ldc_file()
686 free(entry->file_name); in read_entry_from_ldc_file()
687 entry->file_name = NULL; in read_entry_from_ldc_file()
703 struct ldc_entry entry; in fetch_entry() local
706 ret = read_entry_from_ldc_file(&entry, dma_log->log_entry_address); in fetch_entry()
714 if (entry.header.params_num > TRACE_MAX_PARAMS_COUNT) { in fetch_entry()
719 entry.params = (uint32_t *)malloc(sizeof(uint32_t) * entry.header.params_num); in fetch_entry()
720 if (!entry.params) { in fetch_entry()
722 (int)(sizeof(uint32_t) * entry.header.params_num)); in fetch_entry()
728 ret = fread(entry.params, sizeof(uint32_t), entry.header.params_num, in fetch_entry()
730 if (ret != entry.header.params_num) { in fetch_entry()
733 entry.header.params_num, in fetch_entry()
734 entry.file_name, entry.header.line_idx); in fetch_entry()
745 size_t size = sizeof(uint32_t) * entry.header.params_num; in fetch_entry()
752 for (n = (uint8_t *)entry.params; size; n += ret, size -= ret) { in fetch_entry()
757 entry.header.params_num, strerror(errno)); in fetch_entry()
767 print_entry_params(dma_log, &entry, *last_timestamp); in fetch_entry()
776 free(entry.params); in fetch_entry()
777 free(entry.text); in fetch_entry()
778 free(entry.file_name); in fetch_entry()