Skip to content

Commit

Permalink
mempool:Fix seqnumber statistics error in memdump
Browse files Browse the repository at this point in the history
The judgment of seqmin and seqmax is ignored

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
  • Loading branch information
anjiahao1 committed May 31, 2023
1 parent 37cdfee commit c4684e0
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions mm/mempool/mempool.c
Expand Up @@ -416,19 +416,15 @@ mempool_info_task(FAR struct mempool_s *pool,
info.aordblks += count;
info.uordblks += count * pool->blocksize;
}
#if CONFIG_MM_BACKTRACE < 0
else if (dump->pid == MM_BACKTRACE_ALLOC_PID)
{
#if CONFIG_MM_BACKTRACE >= 0
size_t count = list_length(&pool->alist);
#else
size_t count = pool->nalloc;
#endif

info.aordblks += count;
info.uordblks += count * pool->blocksize;
info.aordblks -= pool->nexpend;
info.uordblks -= pool->totalsize;
}
#endif
#if CONFIG_MM_BACKTRACE >= 0
else
{
Expand All @@ -437,7 +433,7 @@ mempool_info_task(FAR struct mempool_s *pool,
list_for_every_entry(&pool->alist, buf, struct mempool_backtrace_s,
node)
{
if (buf->pid == dump->pid ||
if (buf->pid == dump->pid || dump->pid == MM_BACKTRACE_ALLOC_PID ||
(dump->pid == MM_BACKTRACE_INVALID_PID &&
nxsched_get_tcb(buf->pid) == NULL))
{
Expand Down

0 comments on commit c4684e0

Please sign in to comment.