dm: core: Add a way to collect memory usage
authorSimon Glass <sjg@chromium.org>
Sun, 8 May 2022 10:39:25 +0000 (04:39 -0600)
committerSimon Glass <sjg@chromium.org>
Tue, 28 Jun 2022 02:09:52 +0000 (03:09 +0100)
commit0dfda34ca594c701955cfcb71711a7599f97bae3
treebc1741d705ae3a62c98477e510535d3193c97802
parent930a3ddadebf3660cc3163081671de189300afdd
dm: core: Add a way to collect memory usage

Add a function for collecting the amount of memory used by driver model,
including devices, uclasses and attached data and tags.

This information can provide insights into how to reduce the memory
required by driver model. Future work may look at execution speed also.

Signed-off-by: Simon Glass <sjg@chromium.org>
drivers/core/root.c
drivers/core/tag.c
include/dm/root.h
include/dm/tag.h
test/dm/core.c