logging: Add strdup current use to shell cmd
Add the number of strdup buffers currently in use to the `log strdup_utilization` shell command. Signed-off-by: Andrew Hedin <andrew.hedin@lairdconnect.com>
This commit is contained in:
parent
185545e9f4
commit
b52ad8f3e1
3 changed files with 16 additions and 0 deletions
|
@ -904,6 +904,13 @@ char *z_log_strdup(const char *str)
|
|||
return dup->buf;
|
||||
}
|
||||
|
||||
uint32_t log_get_strdup_pool_current_utilization(void)
|
||||
{
|
||||
return IS_ENABLED(CONFIG_LOG_STRDUP_POOL_PROFILING) ?
|
||||
log_strdup_in_use : 0;
|
||||
|
||||
}
|
||||
|
||||
uint32_t log_get_strdup_pool_utilization(void)
|
||||
{
|
||||
return IS_ENABLED(CONFIG_LOG_STRDUP_POOL_PROFILING) ?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue