-
Notifications
You must be signed in to change notification settings - Fork 110
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CogVM source as per VMMaker.oscog-eem.3339
Now the MT vm is using C intrinsics there are no trampolines for the COGMTVM configuration. First mostly stable version of the Threaded FFI. Most important changes are: 1. Use C11 atomic instructions for the vmOwner. This simplifies the CPXCHG instruction and should make this a lot more resistant to breaking due to compiler optimizations. 2. Fix a critical bug when reentering the threadSchedulingLoop Previously this used the wrong jmp_buf, therefore a thread that tried to return to its threadSchedulingLoop might end up in the threadSchedulingLoop of ANOTHER thread! With these two changes in place, the VM runs mostly stable whilst switching between two threads in the spurreader image. There are still some bugs to fix, especially in the scheduler, as well as synchronizing access to the threads variable. But this is good progress for now. Rename CoInterpreterMT's processHasThreadId inst var to processHasThreadAffinity in the wake of Kernel-eem.1523. First commit of Leon Matthes' work to revive the threaded FFI (committed by eem on behalf of LM cuz of Monticello permissions on source.squeak.org). Fix simulation so that the current processor register state reflects the current Smalltalk process. Eliot's first attempt was a bit broken. This approach of manually switching register states in tryLockVMOwnerTo: preserves fast simulation because we're not changing register state on every send to the processor object as was the case with the original MultiProcessor wrapper. Check for a missing register state by setting the register state for stack, frame & pc pointers to zero. Label the processes spawned by the simulation so they show up nicely in the process browser. releaseVM was used several places where disownVM: should have been used. Simplify cedeToHigherPriorityThreads; the VM can't be unowned when invoked. Nuke some unneeded halts. minor clean-up/commentary. Help myself by documenting what the snapshotPrimitive answers (false for snapshot, true for resume). Simplify SpurMemoryManager>>#sufficientSpaceAfterGC:. Nuke an unused link reg related utility in the Cogit. Add the CogVMSimulator's fklush method to the STackInterpreterSimulator to ensure that GC progress is printed immediately while simulating. Build: upgrade the 64=bit macos Makefilews so they can build MT VMs. mvm in squeak.*.spur dirs now takes a -T arg and builds with -DCOGMTVM=1 in build??mt to SqueakMT*.app
- Loading branch information
1 parent
330d677
commit ec421b9
Showing
74 changed files
with
1,530 additions
and
2,822 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.