Skip to content

Instantly share code, notes, and snippets.

@dogbert17
Last active February 7, 2017 22:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dogbert17/d6015aa9d051af86f4bd9d631b0bf2bc to your computer and use it in GitHub Desktop.
Save dogbert17/d6015aa9d051af86f4bd9d631b0bf2bc to your computer and use it in GitHub Desktop.
Heap profile of spectest HARNESS_TYPE=6 TEST_JOBS=2 and 50 files in spectest.data
dogbert@dogbert-VirtualBox ~/repos/rakudo $ ./perl6 -I /home/dogbert/repos/rakudo/install/share/perl6/site/lib /home/dogbert/repos/rakudo/install/share/perl6/site/bin/moar-ha heap-snapshot-1486499969.01023
Considering the snapshot...looks reasonable!
This file contains 11 heap snapshots. To select one to look
at, type something like `snapshot 3`.
Type `help` for available commands, or `exit` to exit.
> snapshot 0
Loading that snapshot. Carry on...
> top objects
Wait a moment, while I finish loading the snapshot...
Name Total Bytes
===================================== ===============
NQPArray 5,513,044 bytes
BOOTStaticFrame 4,224,405 bytes
BOOTInt 3,608,256 bytes
NFAType 2,644,272 bytes
BOOTHash 1,877,232 bytes
VMString 1,820,832 bytes
SCRef 961,932 bytes
BOOTCode 888,720 bytes
Parameter 700,872 bytes
BOOTNum 662,832 bytes
BOOTStr 359,860 bytes
Perl6::Metamodel::ContainerDescriptor 334,224 bytes
BOOTCompUnit 315,444 bytes
Method 262,752 bytes
BOOTIntArray 216,748 bytes
> summary
Total heap size: 27,015,345 bytes
Total objects: 423,641
Total type objects: 2,377
Total STables (type tables): 2,375
Total frames: 3,720
Total references: 1,616,372
> snapshot 9
Loading that snapshot. Carry on...
> top objects
Wait a moment, while I finish loading the snapshot...
Name Total Bytes
===================================== ===============
NQPArray 5,690,516 bytes
BOOTStaticFrame 4,700,879 bytes
Buf[uint8] 3,805,840 bytes
BOOTInt 3,608,472 bytes
NFAType 2,647,980 bytes
BOOTHash 2,320,452 bytes
VMString 1,976,562 bytes
BOOTCode 997,400 bytes
SCRef 961,932 bytes
Parameter 831,440 bytes
BOOTNum 663,960 bytes
Scalar 428,672 bytes
Perl6::Metamodel::ContainerDescriptor 385,536 bytes
BOOTStr 378,260 bytes
Method 343,712 bytes
> summary
Total heap size: 34,092,661 bytes
Total objects: 457,885
Total type objects: 2,498
Total STables (type tables): 2,496
Total frames: 6,879
Total references: 1,806,174
>
while running the above I typed 'ps' several times and got stuff like this:
dogbert@dogbert-VirtualBox ~/repos/rakudo $ ps auxww
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
dogbert 29220 97.0 25.9 976792 805160 pts/2 Sl+ 21:37 1:24 /home/dogbert/repos/rakudo/install/bin/moar --execname=./perl6-m --libpath=/home/dogbert/repos/rakudo/install/share/nqp/lib --libpath=/home/dogbert/repos/rakudo/install/share/nqp/lib --libpath=. /home/dogbert/repos/rakudo/perl6.moarvm --nqp-lib=blib --profile=heap -Ilib t/harness6 --fudge --tests-from-file=t/spectest.data
dogbert 29415 73.4 2.4 81820 75132 pts/2 R+ 21:38 0:13 /home/dogbert/repos/rakudo/install/bin/moar --execname=./perl6-m --libpath=/home/dogbert/repos/rakudo/install/share/nqp/lib --libpath=/home/dogbert/repos/rakudo/install/share/nqp/lib --libpath=. /home/dogbert/repos/rakudo/perl6.moarvm --nqp-lib=blib -Ilib t/spec/S02-literals/string-interpolation.t
the below is what ps looks like if I run the same spectest file without --profile=heap, seems as if that option disprupt the readings quit a bit
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
dogbert 30271 18.9 7.7 430800 239100 pts/2 Sl+ 22:58 0:10 /home/dogbert/repos/rakudo/install/bin/moar --execname=./perl6-m --libpath=/home/dogbert/repos/rakudo/install/share/nqp/lib --libpath=/home/dogbert/repos/rakudo/install/share/nqp/lib --libpath=. /home/dogbert/repos/rakudo/perl6.moarvm --nqp-lib=blib -Ilib t/harness6 --fudge --tests-from-file=t/spectest.data
dogbert 30460 96.6 2.4 84092 76864 pts/2 R+ 22:58 0:22 /home/dogbert/repos/rakudo/install/bin/moar --execname=./perl6-m --libpath=/home/dogbert/repos/rakudo/install/share/nqp/lib --libpath=/home/dogbert/repos/rakudo/install/share/nqp/lib --libpath=. /home/dogbert/repos/rakudo/perl6.moarvm --nqp-lib=blib -Ilib t/spec/S02-literals/string-interpolation.t
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment