svn commit: r342207 - head/sys/kern
Mark Johnston
markj at FreeBSD.org
Wed Dec 19 00:17:23 UTC 2018
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,
More information about the svn-src-head
mailing list