The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.


Devel::MAT::Tool::Count - count the various kinds of SV


This Devel::MAT tool counts the different kinds of SV in the heap.



   pmat> count
     Kind       Count (blessed)        Bytes (blessed)
     ARRAY        170         0     15.1 KiB          
     CODE         166         0     20.8 KiB          

Prints a summary of the count of each type of object.

Takes the following named options:

--blessed, -b

Additionally classify blessed references per package

--scalars, -S

Additionally classify SCALAR SVs according to which fields they have present


Use the structural size to sum byte counts


Use the owned size to sum byte counts


Paul Evans <>