| 1 | # You may distribute under the terms of either the GNU General Public License | ||||||||||
| 2 | # or the Artistic License (the same terms as Perl itself) | ||||||||||
| 3 | # | ||||||||||
| 4 | # (C) Paul Evans, 2018-2026 -- leonerd@leonerd.org.uk | ||||||||||
| 5 | |||||||||||
| 6 | package Devel::MAT::Tool::Summary 0.56; | ||||||||||
| 7 | |||||||||||
| 8 | 5 | ▶ | use v5.20; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 9 | 5 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 10 | 5 | ▶ | use base qw( Devel::MAT::Tool ); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 11 | |||||||||||
| 12 | 5 | ▶ | use feature qw( postderef signatures ); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 13 | 5 | ▶ | no warnings qw( experimental::postderef experimental::signatures ); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 14 | |||||||||||
| 15 | 5 | ▶ | use constant CMD => "summary"; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 16 | 5 | ▶ | use constant CMD_DESC => "Print basic information about the loaded dumpfile"; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 17 | |||||||||||
| 18 | =head1 NAME | ||||||||||
| 19 | |||||||||||
| 20 | C<Devel::MAT::Tool::Summary> - show basic information about the dumpfile | ||||||||||
| 21 | |||||||||||
| 22 | =head1 DESCRIPTION | ||||||||||
| 23 | |||||||||||
| 24 | This C<Devel::MAT> tool displays a summary of the overall contents of the | ||||||||||
| 25 | dumpfile. | ||||||||||
| 26 | |||||||||||
| 27 | =head1 COMANDS | ||||||||||
| 28 | |||||||||||
| 29 | =for highlighter | ||||||||||
| 30 | |||||||||||
| 31 | =cut | ||||||||||
| 32 | |||||||||||
| 33 | =head2 summary | ||||||||||
| 34 | |||||||||||
| 35 | pmat> summary | ||||||||||
| 36 | Perl memory dumpfile from perl 5.26.1 threaded | ||||||||||
| 37 | Heap contains 3315 objects | ||||||||||
| 38 | |||||||||||
| 39 | Prints basic information about the dumpfile - the version of perl that created | ||||||||||
| 40 | it, and the number of SVs it contains. | ||||||||||
| 41 | |||||||||||
| 42 | =cut | ||||||||||
| 43 | |||||||||||
| 44 | 0 | ▶ | sub run ( $self ) | ||||||||
|
Subroutine
run: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||
| 45 | { | ||||||||||
| 46 | 0 | my $df = $self->df; | |||||||||
| 47 | |||||||||||
| 48 | 0 | ▶ | Devel::MAT::Cmd->printf( "Perl memory dumpfile from perl %s %s\n", | ||||||||
|
Branch: 1 branch
| |||||||||||
| 49 | $df->perlversion, $df->ithreads ? "threaded" : "non-threaded" ); | ||||||||||
| 50 | |||||||||||
| 51 | 0 | Devel::MAT::Cmd->printf( "Heap contains %d objects\n", scalar $df->heap ); | |||||||||
| 52 | } | ||||||||||
| 53 | |||||||||||
| 54 | =head1 AUTHOR | ||||||||||
| 55 | |||||||||||
| 56 | Paul Evans <leonerd@leonerd.org.uk> | ||||||||||
| 57 | |||||||||||
| 58 | =cut | ||||||||||
| 59 | |||||||||||
| 60 | 5 | 0x55AA; | |||||||||