mirror of
https://xff.cz/git/u-boot/
synced 2025-11-01 19:05:51 +01:00
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>
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
#include <linux/list.h>
|
||||
#include <linux/types.h>
|
||||
|
||||
struct dm_stats;
|
||||
struct udevice;
|
||||
|
||||
enum dm_tag_t {
|
||||
@@ -118,4 +119,14 @@ int dev_tag_del(struct udevice *dev, enum dm_tag_t tag);
|
||||
*/
|
||||
int dev_tag_del_all(struct udevice *dev);
|
||||
|
||||
/**
|
||||
* dev_tag_collect_stats() - Collect information on driver model performance
|
||||
*
|
||||
* This collects information on how driver model is performing. For now it only
|
||||
* includes memory usage
|
||||
*
|
||||
* @stats: Place to put the collected information
|
||||
*/
|
||||
void dev_tag_collect_stats(struct dm_stats *stats);
|
||||
|
||||
#endif /* _DM_TAG_H */
|
||||
|
||||
Reference in New Issue
Block a user