mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-08 10:39:08 +00:00
malloc_simple: Add logging of allocations
It is sometimes useful to see what memory is being allocated early during boot. Add logging to support this, using a new LOGC_ALLOC category. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
e16c888fab
commit
7cbd2d2e32
3 changed files with 42 additions and 25 deletions
|
@ -114,7 +114,7 @@ int _log(enum log_category_t cat, enum log_level_t level, const char *file,
|
|||
/* Emit a log record if the level is less that the maximum */
|
||||
#define log(_cat, _level, _fmt, _args...) ({ \
|
||||
int _l = _level; \
|
||||
if (_l <= _LOG_MAX_LEVEL) \
|
||||
if (CONFIG_IS_ENABLED(LOG) && _l <= _LOG_MAX_LEVEL) \
|
||||
_log((enum log_category_t)(_cat), _l, __FILE__, __LINE__, \
|
||||
__func__, \
|
||||
pr_fmt(_fmt), ##_args); \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue