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 |
In reply to this post by Jerome Peace
> 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 ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. |
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 > ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. > > > > |
In reply to this post by Jerome Peace
> From: stéphane ducasse
> Decrease you mean? Increase - the more recent image is at the top. - Peter > 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? |
In reply to this post by Jerome Peace
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 -- Craig Latta http://netjam.org/resume |
In reply to this post by Jerome Peace
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 |
In reply to this post by Jerome Peace
[Newbie Perspective]
Dan, this is your first post I've seen since I've been on the list which is only a few months, but have seen your very illuminating video.Tthe post feels like a great 'homework assignment' to a newbie. Please post more as your time permits. Thanks a lot, That said... On 9/12/06, Dan Ingalls <[hidden email]> wrote: MethodContext, and for that, I believe you will find that printing the result of > 'Smalltalk garbageCollect. MethodContext instanceCount' When I print this is the workspace of a newly launched Squeak I am getting something like 20,873. In what circumstance do you see 115 contexts? How come I have so many more? > 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. I had not even opened the proecess browser till now! My process browser says: (80) 3400: the timer interrrupt watcher (60) 3253: the event tickler (60) 3837: the user interrupt watcher (60) 2532: the low sapce watcher (50) 1497: the WeakArray finalization process (40) 3184: the UI process (10) 53: the idle process Can some one please explain to me what the numbers mean? Thank you, bakki |
I'm new to smalltalk of course, but the numbers are pretty standard for any scheduler afaik. The first numbers in parens are the priority (e.g. (50) is priority 50). The lower that number the more likely the scheduler is to pick you to run. The next number would be the process ID. This is just an arbitrary counter type number given by the scheduler to identify processes. Idle is a very low number because it gets started early on (I would guess). >From: "Bakki Kudva" <[hidden email]> >Reply-To: The general-purpose Squeak developers >list<[hidden email]> >To: "The general-purpose Squeak developers >list"<[hidden email]> >Subject: Re: Some camparisons between squeak versions. >Date: Tue, 12 Sep 2006 10:42:35 -0400 > >[Newbie Perspective] > >Dan, this is your first post I've seen since I've been on the list >which is only a few months, but have seen your very illuminating >video.Tthe post feels like a great 'homework assignment' to a newbie. >Please post more as your time permits. Thanks a lot, > >That said... > >On 9/12/06, Dan Ingalls <[hidden email]> wrote: >MethodContext, and for that, I believe you will find that printing the >result of >> 'Smalltalk garbageCollect. MethodContext instanceCount' > >When I print this is the workspace of a newly launched Squeak I am >getting something like 20,873. In what circumstance do you see 115 >contexts? How come I have so many more? > >>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. > >I had not even opened the proecess browser till now! >My process browser says: >(80) 3400: the timer interrrupt watcher >(60) 3253: the event tickler >(60) 3837: the user interrupt watcher >(60) 2532: the low sapce watcher >(50) 1497: the WeakArray finalization process >(40) 3184: the UI process >(10) 53: the idle process > >Can some one please explain to me what the numbers mean? Thank you, > >bakki > |
J J wrote:
> > I'm new to smalltalk of course, but the numbers are pretty standard for > any scheduler afaik. The first numbers in parens are the priority (e.g. > (50) is priority 50). The lower that number the more > likely the scheduler is to pick you to run. The next number would be > the process ID. This is just > an arbitrary counter type number given by the scheduler to identify > processes. Idle is a very low > number because it gets started early on (I would guess). > >> My process browser says: >> (80) 3400: the timer interrrupt watcher >> (60) 3253: the event tickler >> (60) 3837: the user interrupt watcher >> (60) 2532: the low sapce watcher >> (50) 1497: the WeakArray finalization process >> (40) 3184: the UI process >> (10) 53: the idle process Actually, the numbers are not based on a counter assigned by the scheduler, but are just a hash value to identify the process. And, please remember to adjust the subject when switching topics. - Bert - |
Free forum by Nabble | Edit this page |