Hi All,
I've started to get curious about how squeak is changing as it's growing.
So I genned up some things to look at and then ran them In three different "releases" of squeak.
I am poking around to increase my understanding so if you know of better things to look at please chime in.
The big one is compiled method. My current interpretation of that is that it tells me how many total class>>methods there are in squeak.
I thought that method dictionary would be one per class but there seem to be more than two for each class. So I've reguessed that each class has two method dictionaries. I am just puzzled by the extra.
Method context grew the most between 3.8 . Now I wonder what accounts for that?
The gatherer:
{CompiledMethod . MethodDictionary . MethodContext . Class } collect: [ :class | class printString , ' ' , class allSubInstances size printString , String cr ]
And the results:
Sq7054 #('CompiledMethod 44834 ' 'MethodDictionary 4108 ' 'MethodContext 4170 ' 'Class 2037 ')
sq6665 (3.8) #('CompiledMethod 47792 ' 'MethodDictionary 3612 ' 'MethodContext 1352 ' 'Class 1668 ')
Sq5976 (3.7) #('CompiledMethod 41206 ' 'MethodDictionary 3140 ' 'MethodContext 874 ' 'Class 1546 ')
__________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
On Sat, 26 Aug 2006 06:53:23 +0200, Peace Jerome wrote:
Hi All,
I've started to get curious about how squeak is changing as it's growing.
So I genned up some things to look at and then ran them In three different "releases" of squeak.
I am poking around to increase my understanding so if you know of better things to look at please chime in.
The big one is compiled method. My current interpretation of that is that it tells me how many total class>>methods there are in squeak.
There's a huge change which happened with intro of traits: I'd count methods of traits separately and subtract them from the total.
Into the other direction, more classes means that more species are (can be) out there in the wild, giving more diversity and strengthening the "gene pool".
/Klaus
Sq7054 #('CompiledMethod 44834 ' 'MethodDictionary 4108 ' 'MethodContext 4170 ' 'Class 2037 ')
sq6665 (3.8) #('CompiledMethod 47792 ' 'MethodDictionary 3612 ' 'MethodContext 1352 ' 'Class 1668 ')
Anyone has an explanation for the huge increase of MethodContext instances?
Cheers, Alexandre
Decrease you mean?
On 26 août 06, at 12:50, Alexandre Bergel wrote:
Sq7054 #('CompiledMethod 44834 ' 'MethodDictionary 4108 ' 'MethodContext 4170 ' 'Class 2037 ')
sq6665 (3.8) #('CompiledMethod 47792 ' 'MethodDictionary 3612 ' 'MethodContext 1352 ' 'Class 1668 ')
Anyone has an explanation for the huge increase of MethodContext instances?
Cheers, Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.cs.tcd.ie/Alexandre.Bergel ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
Hi Peace--
Each non-meta class has a method dictionary and a metaclass, which has its own method dictionary. So there are supposed to be two method dictionaries for each non-meta class.
Why do you want to count MethodContexts? The number of them varies significantly from moment to moment as the system runs, so any static count isn't very meaningful. It corresponds very roughly to the number of existing processes in the system, but not so well that I'd even bother comparing that figure between different versions of Squeak.
-C
Hi guys (especially Peace Jerome) -
I'm very late to see this message, but it looks like it never got fully answered. If you care about truly exact instance counts, you must be very careful, especially about, eg, MethodContexts (which if everything is running right are being created by the millions every second).
Being "very careful" here means doing a garbageCollect before you start, and possibly doing more garbageCollects ( or garbageCollectMost) during the process if you are going through a number of classes as, for instance, allSubinstances does. instanceCount and allinstances were carefully written so as not to allocate any contexts while they run, but more elaborate tallies may well allocate some objects that are not reclaimed until the next collection. Actually the only one causing real confusion here is MethodContext, and for that, I believe you will find that printing the result of 'Smalltalk garbageCollect. MethodContext instanceCount' should give you results that are close to the number of contexts in the basic image, and that are reasonably comparable from one image to the next. In 3.8, I get 119, and in 3.9, I get 115(*), but note that frequently the results are a bit higher, presumably because of processes that run at a higher priority during the enumeration. You could have fun running this at the highest priority to check, but you probably know things that are even more fun to do.
Hope this helps
- Dan
(*) If you're wondering what these hundred or so contexts are about, looking at the suspended processes in the ProcessBrowser should be illuminating.
The gatherer:
{CompiledMethod . MethodDictionary . MethodContext . Class } collect: [ :class | class printString , ' ' , class allSubInstances size printString , String cr ]
And the results:
Sq7054 #('CompiledMethod 44834 ' 'MethodDictionary 4108 ' 'MethodContext 4170 ' 'Class 2037 ')
sq6665 (3.8) #('CompiledMethod 47792 ' 'MethodDictionary 3612 ' 'MethodContext 1352 ' 'Class 1668 ')
Sq5976 (3.7) #('CompiledMethod 41206 ' 'MethodDictionary 3140 ' 'MethodContext 874 ' 'Class 1546 ')
Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
squeak-dev@lists.squeakfoundation.org