[U-Boot] [RFC PATCH 0/15] RFC: Add tracing functionality to U-Boot
Simon Glass
sjg at chromium.org
Tue May 14 00:09:06 CEST 2013
Hi Tom,
On Mon, May 13, 2013 at 2:36 PM, Tom Rini <trini at ti.com> wrote:
> On Sat, Apr 27, 2013 at 07:17:37PM -0700, Simon Glass wrote:
>
>> This series adds a tracing feature to U-Boot which is useful for
>> profiling boot time and other purposes.
>>
>> The core trace library relies on standard gcc function instrumentation
>> and a microsecond timer which should work correctly on almost any
>> architecture. Generic board is used to avoid the need to add the same
>> code in multiple places (CONFIG_SYS_GENERIC_BOARD).
>>
>> Tracing must be built into the U-Boot image at build time, but can be
>> paused and resumed while running. A trace buffer is used to collect
>> trace information. This buffer can then be transmitted to a host for
>> processing. A host-based processing tool is provided which converts the
>> data to the same format used by Linux, and that can be read by the
>> pytimechart GUI tool.
>>
>> A U-Boot 'trace' command provides access to the trace information,
>> including support for writing it to memory in a few forms.
>>
>> Support is provided for stopping tracing at the last possible moment in
>> the bootm process (just before U-Boot jumps to the OS). This is done with
>> a new 'fake go' command, which allows bootm to go through the motions of
>> an OS boot without actually committing to it. Once the 'fake go' is
>> complete, U-Boot can stop tracing and continue execution to transmit the
>> trace information to the host, before jumping to the OS for real.
>>
>> The system is tested on sandbox and has previously worked on ARM Tegra
>> and Exynos machines. A simple test script is provided for sandbox, along
>> with documentation on how to use the feature.
>>
>> This feature has been successfully used alongside bootstage to locate
>> bottlenecks and reduce overall boot time.
>>
>> Because of the bootm changes this series sits on top of the image
>> improvements that were done for verified boot. This series is available
>> at:
>>
>> http://git.denx.de/u-boot-x86.git
>>
>> in branch 'trace'.
>
> I like the concept, implementations seems reasonable. How far back does
> gcc support -finstrument-functions? Any chance of getting tegra support
> at least resurrected (since it uses the generic board framework)?
OK thanks, I will take a look at these points in the next week or two,
and make sure it works on Tegra, Exynos and x86 (as well as the
current sandbox). There might be a few problems but it should not be
too far away.
> Thanks!
>
> --
> Tom
Regards,
Simon
More information about the U-Boot
mailing list