Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0007473 [Squeak] VM feature always 03-08-10 20:29 10-10-10 14:18
Reporter sig View Status public  
Assigned To lewis
Priority normal Resolution fixed  
Status resolved   Product Version
Summary 0007473: VM changes for better finalization support
Description
The VMMaker changes using a new special object (found in special objects array)
to identify a special kind of objects which having weak references and should be added to the list, once one of its weak refs become garbage.
Additional Information
Attached Files  VMMaker-finalizers.1.cs [^] (9,889 bytes) 03-08-10 20:29
 Weak-finalizers-classes.1.cs [^] (4,365 bytes) 03-08-10 20:39
 weak-finalizers-test.2.cs [^] (714 bytes) 03-08-10 20:39
 Weak-finalizers-specialobjects.1.cs [^] (4,161 bytes) 03-08-10 20:40
 Weak-finalizers-classes.2.cs [^] (6,301 bytes) 03-08-10 21:26
 weak-finalizers-VM.1.cs [^] (4,453 bytes) 05-12-10 02:04
 VMMaker-finalizers.2.cs.gz [^] (2,876 bytes) 05-20-10 14:43
 new-finalization-auto.2.cs [^] (11,969 bytes) 05-28-10 02:46
 Cog-weakfinalizers.1.cs [^] (10,530 bytes) 09-22-10 16:58
 new-finalization-pharo&squeak.zip [^] (12,019 bytes) 09-23-10 17:55

- Relationships

- Notes
(0013525 - 159 - 189 - 189 - 189 - 189 - 189)
sig
03-08-10 20:41

Load order:
- Weak-finalizers-classes.1.cs
- Weak-finalizers-specialobjects.1.cs

Then, you can load and run tests, found in
- weak-finalizers-test.2.cs
 
(0013526 - 91 - 97 - 97 - 97 - 97 - 97)
sig
03-08-10 21:26

- updated Weak-finalizers-classes.2.cs ,
use this instead of Weak-finalizers-classes.1.cs
 
(0013527 - 104 - 104 - 104 - 104 - 104 - 104)
lewis
03-08-10 21:30

Great! Andreas has the expertise to review I think. Better finalization performance would be a huge win.
 
(0013768 - 317 - 353 - 353 - 353 - 353 - 353)
sig
05-12-10 02:04
edited on: 05-12-10 02:06

- added a weak-finalizers-VM.1.cs changeset,
to replace old VMMaker-finalizers.1.cs

which declares a ClassWeakFinalizer in preabmle, to avoid having a full
ObjectMemory class declaration and potential conflicts when applying a changeset to a different ObjectMemory class than used when created this changeset.

 
(0013788 - 606 - 618 - 618 - 618 - 618 - 618)
chris
05-20-10 14:53

I have done quite a bit of testing on this, the results are striking. Squeak applications using large Weak-collections deteriorate to a point of unusability without this fix because Squeak spends 95% of its time in the finalization process, leaving no time for application processing. With this fix installed, CPU utilization is 0% when the application is idle, providing excellent responsiveness.

All of the change-sets originally attached to this ticket have been merged into the appropriate Monticello packages and submitted to the Inbox. The VMMaker change is in the file weak-finalizers-VM.1.cs.
 
(0013789 - 240 - 240 - 240 - 240 - 240 - 240)
chris
05-20-10 14:56

VMMaker-finalizers.2.cs.gz is was intended to replace VMMaker-finalizers.1.cs, but I didn't notice Igor had already uploaded weak-finalizers-VM.1.cs. They should be the exact same, but I don't know how to remove an uploaded file in Mantis.
 
(0013795 - 240 - 264 - 264 - 264 - 264 - 264)
sig
05-28-10 02:46

The
new-finalization-auto.2.cs

introducing an auto-detection of VM support of new finalization.
In case if VM does not supports it, then WeakFinalizationRegistry behaves same as WeakRegistry and scanning all entries of its dictionary.
 
(0013878 - 806 - 1092 - 1092 - 1092 - 1092 - 1092)
lewis
09-21-10 02:20

VM changes were added to SqS/VMMaker in version 4.2.2 VMMaker:

Name: VMMaker-dtl.175
Author: dtl
Time: 25 May 2010, 8:01:19.991 pm
UUID: e948f35c-c90f-44e1-8f83-29db7c31d3b3
Ancestors: VMMaker-dtl.174

VMMaker 4.2.2

Reference Mantis 7473: VM changes for better finalization support

Add Igor's VM changes to support better finalization (weak-finalizers-VM.1.cs merged with Alien support updates).

Expand special object array with slots needed for Alien as well as for new finalization support. The new entries in ObjectMemory class>>initializeSpecialObjectIndices are:

    SelectorAttemptToAssign := 50.
    "PrimErrTableIndex := 51. in Interpreter class>>initializePrimitiveErrorCodes"
    ClassAlien := 52.
    InvokeCallbackSelector := 53.
    ClassUnsafeAlien := 54.
    ClassWeakFinalizer := 55
 
(0013879 - 233 - 262 - 262 - 262 - 262 - 262)
sig
09-22-10 16:59

- added a changeset (Cog-weakfinalizers.1.cs)
 for VM-side changes in Cog to support new finalization


In this changeset, classvar ClassWeakFinalizer is renamed to ClassWeakFinalizationList in order to avoid possible confusion.
 
(0013880 - 503 - 587 - 587 - 587 - 587 - 587)
sig
09-23-10 17:56

- a new zip file contains a final list of scripts , ready for integration in Squeak and Pharo images.
Install them in a following order
(all files with *pharo*, is for Pharo only).

0pharo-objectfinalizer.st
0pharo-objectfinalizercollection.st
0pharo-weakregistrytest.st
phase-0.cs
phase-1-weakfinalizationlist.st
phase-1-weakfinalizationregistry.st
phase-1-weakfinalizeritem.st
phase-2-finalizationprocess.1.cs
phase-2-pharo-only.3.cs
phase-3-migrating.1.cs
phase-4-weakfinalizerstest.st
 
(0013883 - 54 - 54 - 54 - 54 - 54 - 54)
lewis
10-10-10 14:18

Included in VMMaker-dtl.175 on SqueakSource (May 2010)
 

- Issue History
Date Modified Username Field Change
03-08-10 20:29 sig New Issue
03-08-10 20:29 sig Status new => assigned
03-08-10 20:29 sig Assigned To  => lewis
03-08-10 20:29 sig File Added: VMMaker-finalizers.1.cs
03-08-10 20:39 sig File Added: Weak-finalizers-classes.1.cs
03-08-10 20:39 sig File Added: weak-finalizers-test.2.cs
03-08-10 20:40 sig File Added: Weak-finalizers-specialobjects.1.cs
03-08-10 20:41 sig Note Added: 0013525
03-08-10 21:26 sig File Added: Weak-finalizers-classes.2.cs
03-08-10 21:26 sig Note Added: 0013526
03-08-10 21:30 lewis Note Added: 0013527
03-08-10 21:30 lewis Status assigned => acknowledged
05-12-10 02:04 sig Note Added: 0013768
05-12-10 02:04 sig File Added: weak-finalizers-VM.1.cs
05-12-10 02:05 sig Note Edited: 0013768
05-12-10 02:06 sig Note Edited: 0013768
05-20-10 14:43 chris File Added: VMMaker-finalizers.2.cs.gz
05-20-10 14:53 chris Note Added: 0013788
05-20-10 14:56 chris Note Added: 0013789
05-28-10 02:46 sig File Added: new-finalization-auto.2.cs
05-28-10 02:46 sig Note Added: 0013795
09-21-10 02:03 lewis Issue Monitored: lewis
09-21-10 02:20 lewis Note Added: 0013878
09-22-10 16:58 sig File Added: Cog-weakfinalizers.1.cs
09-22-10 16:59 sig Note Added: 0013879
09-23-10 17:55 sig File Added: new-finalization-pharo&squeak.zip
09-23-10 17:56 sig Note Added: 0013880
10-10-10 14:17 lewis Status acknowledged => resolved
10-10-10 14:17 lewis Resolution open => fixed
10-10-10 14:18 lewis Note Added: 0013883


Mantis 1.0.8[^]
Copyright © 2000 - 2007 Mantis Group
106 total queries executed.
51 unique queries executed.
Powered by Mantis Bugtracker