[Vm-dev] #becomeUncompact not longer works in Cog/Stack VMs

Levente Uzonyi leves at elte.hu
Sat May 7 01:02:58 UTC 2011


On Sat, 7 May 2011, Igor Stasenko wrote:

>
> On 6 May 2011 21:51, Eliot Miranda <eliot.miranda at gmail.com> wrote:
>>
>>
>>
>> On Fri, May 6, 2011 at 12:47 PM, Igor Stasenko <siguctua at gmail.com> wrote:
>>>
>>> On 6 May 2011 20:04, Eliot Miranda <eliot.miranda at gmail.com> wrote:
>>>>
>>>> and your point would be?
>>>>
>>> it needs to be fixed.
>>
>> No.  It does /not/ need to be fixed.  As I said earlier it is *absurd* to throw away performance for the ability to change certain classes to become uncompact.
>
> No. its nothing to do with performance. It is about getting rid of
> them as a concept.

Why? What would be the benefit of keeping the image format, but getting 
rid of compact classes?

>
>>>
>>> Because if we can't do:
>>>
>>> Smalltalk compactClassesArray do: [:each | each ifNotNil: [each
>>> becomeUncompact]].
>>>
>>> then we cant:
>>>
>>> VM getRidOfCompactClassesNotion
>>>
>>> :)
>>
>>
>> That will be done by producing a new GC and a new image format, not by tinkering with compact classes in the current GC.  Right?
>>
>
> yes.. but small steps at a time.

It's good to follow this rule in most cases, but this is an exception, 
because once you change your image to not use the compact object 
representation, you won't be able to use it with current VMs. This kind of 
change should be avoided or it must bring real benefits that outweight the 
cost of incompatibility. At the moment I don't see the benefits other 
than five new free bits in the object header and a bit simpler code for 
the VM which is not enough IMHO. On the other hand larger objects will 
probably result in a slower VM (less objects can be cached, more objects 
will have to be moved around in the memory hierarchy).


Levente

>
> ˙˙˙˙˙˙˙˙˙˙˙˙ ˙˙˙˙˙˙˙˙˙˙˙˙˙˙ ˙˙˙˙˙˙˙˙˙˙˙˙.
>
> (its hard to me to translate this but if translate it literally, it means):
> 'road' 'overcome' 'walking one'
>
>>>
>>>> On Fri, May 6, 2011 at 9:38 AM, Igor Stasenko <siguctua at gmail.com> wrote:
>>>>>
>>>>> Hi, i tried to do a simple:
>>>>>
>>>>> Smalltalk compactClassesArray do: [:each | each ifNotNil: [each
>>>>> becomeUncompact]]
>>>>>
>>>>> and it crashing the image.
>>>>> I tried to do this for individual classes.
>>>>>
>>>>>
>>>>> CompiledMethod, ByteString, BlockClosure, BlockContext ,
>>>>>  seems working ok.
>>>>>
>>>>> MethodContext, LargePositiveInteger, LargeNegativeInteger, Float
>>>>> crashes the image.
>>>>>
>>>>> i also tried following:
>>>>>
>>>>> [Smalltalk compactClassesArray do: [:each | each ifNotNil: [each
>>>>> becomeUncompact]]
>>>>> ] forkAt: Processor highestPriority
>>>>>
>>>>> but it didn't helped much.
>>>>>
>>>>> Also, i saved image after couple successfull #becomeUncompact steps..
>>>>> and now VM cannot open image, most probably
>>>>> because it fails on 'assumptions check' defined in #checkAssumedCompactClasses
>>>>>
>>>>> --
>>>>> Best regards,
>>>>> Igor Stasenko AKA sig.
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> Best regards,
>>> Igor Stasenko AKA sig.
>>
>>
>>
>
>
>
> -- 
> Best regards,
> Igor Stasenko AKA sig.
>


More information about the Vm-dev mailing list