From: Tom Rini Date: Mon, 5 Jun 2017 20:21:43 -0400 Subject: [U-Boot] [U-Boot, 06/15] bootstage: Use rec_count as the array index In-Reply-To: <20170522110536.6231-7-sjg@chromium.org> References: <20170522110536.6231-7-sjg@chromium.org> Message-ID: <20170606002143.GV10782@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Mon, May 22, 2017 at 05:05:27AM -0600, Simon Glass wrote: > 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 Applied to u-boot/master, thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: