void bootstage_report(void) { struct bootstage_record *rec = record; int id; uint32_t prev; puts("Timer summary in microseconds:\n"); printf("%11s%11s %s\n", "Mark", "Elapsed", "Stage"); /* Fake the first record - we could get it from early boot */ rec->name = "reset"; rec->time_us = 0; prev = 0; /* Sort records by increasing time */ qsort(record, ARRAY_SIZE(record), sizeof(*rec), h_compare_record); for (id = 0; id < BOOTSTAGE_ID_COUNT; id++, rec++) { if ((rec->time_us != 0 && !rec->start_us) || rec->name) prev = print_time_record(rec->id, rec, prev); } if (next_id > BOOTSTAGE_ID_COUNT) printf("(Overflowed internal boot id table by %d entries\n" "- please increase CONFIG_BOOTSTAGE_USER_COUNT\n", next_id - BOOTSTAGE_ID_COUNT); puts("\nAccumulated time:\n"); for (id = 0, rec = record; id < BOOTSTAGE_ID_COUNT; id++, rec++) { if (rec->start_us) prev = print_time_record(id, rec, -1); } }
void bootstage_report(void) { struct bootstage_data *data = gd->bootstage; struct bootstage_record *rec = data->record; uint32_t prev; int i; printf("Timer summary in microseconds (%d records):\n", data->rec_count); printf("%11s%11s %s\n", "Mark", "Elapsed", "Stage"); prev = print_time_record(rec, 0); /* Sort records by increasing time */ qsort(data->record, data->rec_count, sizeof(*rec), h_compare_record); for (i = 1, rec++; i < data->rec_count; i++, rec++) { if (rec->id && !rec->start_us) prev = print_time_record(rec, prev); } if (data->rec_count > RECORD_COUNT) printf("Overflowed internal boot id table by %d entries\n" "Please increase CONFIG_(SPL_)BOOTSTAGE_RECORD_COUNT\n", data->rec_count - RECORD_COUNT); puts("\nAccumulated time:\n"); for (i = 0, rec = data->record; i < data->rec_count; i++, rec++) { if (rec->start_us) prev = print_time_record(rec, -1); } }