[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NIC info



   > Just off the top of my head: running a fairly standard ui2-based image
   > containing 300Kb of bytecodes

   I counted about 180K bytecodes (not KB of bytecodes) in the methods
   in the image distributed with Self 4.0, but I skipped all the block
   methods so I guess your memory is in perfect working order :-) 

I did a lot of space engineering for the 4.0 release and I'm pretty
sure of this number.

   > you need a code cache of 8-10Mb, of

   Wow!!! I would have thought 1MB or something like that (maybe I
   am reading too much into the spy's sizing of the different memory
   regions, or I am vastly underestimating the size of the old region).

Alas, no.  We had a default code cache size of 4Mb in 3.0, but we
found that unworkable for ui2.  Due to overcustomization, even bigger
code caches eventually fill (I recall Randy using 20 and 30Mb code
caches at one time!), but 10 seems sufficient for the working set,
with something like 80% occupancy.

The scales in the spy are the same for old space as for the code
cache, debug and other areas (all are proportional to area).  Each
tick mark under the old space bar represents 1Mb.

   Dean, Grove and Chambers claimed a code expansion os 2.5 to 3.5 times
   in their ECOOP95 paper. Of course, since they compiled statically they
   must have generated many cases that didn't happen at runtime. So the
   figure for Self must be somewhat lower (as you guessed). I will try
   to find the exact number next week. I tried to use the profiler for
   this, but it only knows method names, not receiver "types".

I think you'll find _PrintNMethodHistogram: useful.  Unfortunately the
documentation string says nothing useful.  But try it with arguments
or say 20, 10, and 5, and read the source to see what it does...I'm
sure it's fairly obvious.

   All of these calculations suppose that a large part of the 300KB of
   bytecodes are represented in the cache at any one time. How close
   is this to the truth?

A good point, and one I had missed.  I'd guess only half the bytecodes
are represented.  Not sure how you can determine this without doing
some VM hacking, though.

-Mario