Author: markj
Date: Sat Dec 22 19:45:02 2018
New Revision: 342371
URL: https://svnweb.freebsd.org/changeset/base/342371

Log:
  MFC r342207:
  Fix DDB's "show malloc" after r338899.

Modified:
  stable/12/sys/kern/kern_malloc.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/kern/kern_malloc.c
==============================================================================
--- stable/12/sys/kern/kern_malloc.c    Sat Dec 22 19:44:06 2018        
(r342370)
+++ stable/12/sys/kern/kern_malloc.c    Sat Dec 22 19:45:02 2018        
(r342371)
@@ -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,
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to