summaryrefslogtreecommitdiff
path: root/common/Kconfig
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2017-05-22 05:05:27 -0600
committerTom Rini <trini@konsulko.com>2017-06-05 14:13:05 -0400
commit03ecac314988c01c3df0c935afaacc8fce229224 (patch)
tree4affe3e2698cce4a4248b0867980b202be752049 /common/Kconfig
parentcbcd6970ad802b8b6c5acf79d42a870256b62fbb (diff)
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: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common/Kconfig')
-rw-r--r--common/Kconfig7
1 files changed, 7 insertions, 0 deletions
diff --git a/common/Kconfig b/common/Kconfig
index 3b85bf49a8..a3094d984f 100644
--- a/common/Kconfig
+++ b/common/Kconfig
@@ -46,6 +46,13 @@ config BOOTSTAGE_USER_COUNT
a new ID will be allocated from this stash. If you exceed
the limit, recording will stop.
+config BOOTSTAGE_RECORD_COUNT
+ int "Number of boot stage records to store"
+ default 30
+ help
+ This is the size of the bootstage record list and is the maximum
+ number of bootstage records that can be recorded.
+
config BOOTSTAGE_FDT
bool "Store boot timing information in the OS device tree"
depends on BOOTSTAGE