Date: Wed, 19 Dec 2018 00:17:22 +0000 (UTC) From: Mark Johnston <markj@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342207 - head/sys/kern Message-ID: <201812190017.wBJ0HMfV059316@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: markj Date: Wed Dec 19 00:17:22 2018 New Revision: 342207 URL: https://svnweb.freebsd.org/changeset/base/342207 Log: Fix DDB's "show malloc" after r338899. MFC after: 3 days Sponsored by: The FreeBSD Foundation Modified: head/sys/kern/kern_malloc.c Modified: head/sys/kern/kern_malloc.c ============================================================================== --- head/sys/kern/kern_malloc.c Tue Dec 18 23:22:37 2018 (r342206) +++ head/sys/kern/kern_malloc.c Wed Dec 19 00:17:22 2018 (r342207) @@ -1205,7 +1205,7 @@ restart: DB_SHOW_COMMAND(malloc, db_show_malloc) { struct malloc_type_internal *mtip; - struct malloc_type_internal *mtsp; + struct malloc_type_stats *mtsp; struct malloc_type *mtp; uint64_t allocs, frees; uint64_t alloced, freed; @@ -1221,10 +1221,10 @@ DB_SHOW_COMMAND(malloc, db_show_malloc) freed = 0; for (i = 0; i <= mp_maxid; i++) { mtsp = zpcpu_get_cpu(mtip->mti_stats, i); - allocs += mtip->mti_stats[i].mts_numallocs; - frees += mtip->mti_stats[i].mts_numfrees; - alloced += mtip->mti_stats[i].mts_memalloced; - freed += mtip->mti_stats[i].mts_memfreed; + allocs += mtsp->mts_numallocs; + frees += mtsp->mts_numfrees; + alloced += mtsp->mts_memalloced; + freed += mtsp->mts_memfreed; } db_printf("%18s %12ju %12juK %12ju\n", mtp->ks_shortdesc, allocs - frees,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201812190017.wBJ0HMfV059316>