Zephyr shell module api resource container usage
Add shell command to track how many resource tracking containers each module instances uses in its lifetime.
This is now a draft PR as I have more important PRs to work on. Let's see late on if this is considered important enough to get it merged.
It looks like containers are never freed - free slots are just added to the list. Are you planning to change that? Right now the number of used slots will match their watermark.
It looks like containers are never freed - free slots are just added to the list. Are you planning to change that? Right now the number of used slots will match their watermark.
I do not think there is a point to free the containers in modules lifetime. If a module has needed certain amount of containers at one point, I would think it is quite likely that it would need them again later on. All the containers are of course freed at module unload time.
If you do not plan to release containers, counting container_high_water_mark is unnecessary.
If you do not plan to release containers, counting
container_high_water_markis unnecessary.
I do not intend to get this merged, but it would not be entirely unnecessary. The containers are allocated in 16-container chunks, and the amount of allocated cointainers is not the same as the maximum amount used. For instance SRC used max 5 containers, but it has allocated 16.