[PATCH] driver: add CONFIG_DEBUG_PROBES

Ahmad Fatoum a.fatoum at pengutronix.de
Mon Jun 28 23:39:09 PDT 2021


On 28.06.21 22:37, Sascha Hauer wrote:
> On Mon, Jun 28, 2021 at 09:03:45AM +0200, Ahmad Fatoum wrote:
>> CONFIG_DEBUG_INITCALLS can be very useful to roughly pinpoint what
>> causes barebox to hang. With deep probe, most probes run at the same
>> initcall level making the debug option much less useful.
>>
>> Add a new CONFIG_DEBUG_PROBES that will instead log whenever a probe is
>> invoked. The text's horizontal alignment is increased with each
>> recursive probe making the option suitable for debugging some deep probe
>> issues as well.
>>
>> Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
>> ---
>>  common/Kconfig        |  4 ++++
>>  drivers/base/driver.c | 17 +++++++++++++++--
>>  2 files changed, 19 insertions(+), 2 deletions(-)
> 
> Nice. I applied with one change I hope you're ok with:
> 
>> +	depth++;
>> +
>> +	pr_report_probe("%*sprobe-> %s\n", depth, "", dev_name(dev));
> 
> I changed the indentation to 4 here.

Fine by me.

Cheers,
Ahmad

> 
> Sascha
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



More information about the barebox mailing list