Skip to content
Snippets Groups Projects
Commit 03ecac31 authored by Simon Glass's avatar Simon Glass Committed by Tom Rini
Browse files

bootstage: Use rec_count as the array index


At present bootstage has a large array with all possible bootstage IDs
recorded. It adds times to the array element indexed by the ID. This is
inefficient because many IDs are not used during boot. We can save space
by only recording those IDs which actually have timestamps.

Update the array to use a record count, which increments with each
addition of a new timestamp. This takes longer to record a time, since it
may involve an array search. Such a search may be particularly expensive
before relocation when the CPU is running slowly or the cache is off. But
at that stage there should be very few records.

Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
parent cbcd6970
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment