Skip to content

Commit

Permalink
core: pta: stats: Explicit when nexus heap stats is not applicable
Browse files Browse the repository at this point in the history
Explicitly mention in the nexus heap statistics info when the
nexus heap is disabled. With this change, the information displayed
by `xtest --stats --alloc` better show why the printed values are all
0s for this pool.

Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
  • Loading branch information
etienne-lms committed Jan 20, 2025
1 parent fe0d2f2 commit 6531027
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions core/pta/stats.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,17 @@ static TEE_Result get_alloc_stats(uint32_t type, TEE_Param p[TEE_NUM_PARAMS])
sizeof(stats->desc));
break;

#ifdef CFG_NS_VIRTUALIZATION
case ALLOC_ID_NEXUS_HEAP:
#ifdef CFG_NS_VIRTUALIZATION
nex_malloc_get_stats(stats);
strlcpy(stats->desc, "KHeap", sizeof(stats->desc));
if (p[0].value.b)
nex_malloc_reset_stats();
break;
#else
strlcpy(stats->desc, "KHeap (disabled)",
sizeof(stats->desc));
#endif
break;
case ALLOC_ID_RPMB:
if (rpmb_mem_stats(stats, p[0].value.b))
strlcpy(stats->desc,
Expand Down

0 comments on commit 6531027

Please sign in to comment.