FS#11161 - Bootchart mode, to measure speed of various tasks during boot

Attached to Project: Rockbox
Opened by Torne Wuff (torne) - Wednesday, 31 March 2010, 23:52 GMT
Last edited by Torne Wuff (torne) - Thursday, 01 April 2010, 16:41 GMT
Task Type Patches
Category Operating System/Drivers
Status Closed
Assigned To No-one
Operating System All players
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


Attached patch adds a bootchart mode (selectable during configure) which uses logf to record various timings during boot: specifically for all the points in boot that involve loading from storage or otherwise may take some time.

I'm looking to put this in svn so that people can compare measurements easily, but the use of the CHART_CALL macro may be considered objectionable (it does make the code a little ahrder to read if you don't know what the macro does). There are only 28 uses of this macro, all in main.c and settings.c, though, so it's not a general pollution of the codebase :)

All opinions and alternative suggestions solicited, as well as comments on useful chart points which have been omitted.
This task depends upon

Closed by  Torne Wuff (torne)
Thursday, 01 April 2010, 16:41 GMT
Reason for closing:  Fixed
Additional comments about closing:  Committed in r25426, without CHART_CALL, just explicit string messages.
Comment by Maurus Cuelenaere (mcuelenaere) - Thursday, 01 April 2010, 11:48 GMT
I'm wondering if you could add a call to logf_function() (or similar) at the beginning of each/some function(s) using the profiling infrastructure, that way you could avoid CHART_CALL() macro's and you'd only have to keep a list of functions/function addresses in memory which should be logged.