[Vm-dev] pic stats

Eliot Miranda eliot.miranda at gmail.com
Thu Apr 9 18:59:45 UTC 2015


Hi All,

    Clément and I are mucking about, happy as clams, working on SIsta, the
Spur paper (accepted at ISMM 2015) and had occasion to collect some stats.
Since they may be interesting I thought I'd post them.  Clément has read
some paper on perfect method hashing in a dynamic context and was curious
to know how much space is taken up by methods vs PICs and how many
different selectors there are for the populations.  So heres the script and
the data collected at four points during execution for the simulator
running a Spur test image running a REPL loop:

| used nMethods methodBytes nPICs picBytes nOpenPICs openPICBytes
mSelectors cpicSelectors opicSelectors |
used := methodZone zoneEnd - methodZone freeStart.
nMethods := methodBytes := nPICs := picBytes := nOpenPICs := openPICBytes
:= 0.
mSelectors := Set new.
cpicSelectors := Set new.
opicSelectors := Set new.
methodZone methodsDo:
[:m|
m cmType = CMMethod ifTrue:
[nMethods := nMethods + 1.
 methodBytes := methodBytes + m blockSize.
 mSelectors add: m selector].
m cmType = CMClosedPIC ifTrue:
[nPICs := nPICs + 1.
 picBytes := picBytes + m blockSize.
 cpicSelectors add: m selector].
m cmType = CMOpenPIC ifTrue:
[nOpenPICs := nOpenPICs + 1.
 openPICBytes := openPICBytes + m blockSize.
 opicSelectors add: m selector]].
{used. nMethods. mSelectors size. methodBytes. methodBytes asFloat /
nMethods. nPICs. cpicSelectors size. picBytes. picBytes asFloat / nPICs.
nOpenPICs. opicSelectors size. openPICBytes. openPICBytes asFloat /
nOpenPICs. (cpicSelectors intersection: opicSelectors) size }

startup to REPL:
used byes: 587888
  n n sels     size avg size
methods: 1334 973 404328 303.1
cpics: 256 155 43008 168.0
opics: 37 37 9768 264.0
both: 36

evaluate 3+4:
used bytes: 588800
 n n sels    size avg size
methods: 1332 973 403416 302.9
cpics: 256 155 43008 168.0
opics: 37 37 9768 264.0
both: 36

evaluate 3+4 again:
used bytes: 498008
   n n sels    size avg size
methods: 1574 1147 483696 307.3
cpics: 306 177 51408 168.0
opics: 45 45 11880 264.0
both: 44

evaluate 3.0 + 4.0:
used bytes: 461360
   n n sels   size avg size
methods: 1667 1221 517056 310.2
cpics: 324 188 54432 168.0
opics: 46 46 12144 264.0
both: 45
-- 
best,
Eliot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20150409/f9f10bf6/attachment-0001.htm


More information about the Vm-dev mailing list