Skip to content

Commit

Permalink
Merge branch 'druid' into compile-primitiveAt
Browse files Browse the repository at this point in the history
  • Loading branch information
PalumboN committed Feb 7, 2024
2 parents c5a4926 + f4c25e6 commit d8d35ae
Show file tree
Hide file tree
Showing 35 changed files with 945 additions and 359 deletions.
54 changes: 54 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,59 @@
# Change log

## v10.0.9

* Improves in PermSpace by @tesonep in https://github.com/pharo-project/pharo-vm/pull/684

**Full Changelog**: https://github.com/pharo-project/pharo-vm/compare/v10.0.8...v10.0.9

## v10.0.8

* Fixes #14768: File class>>primFileAttributes😷 answers corrupted result by @akgrant43 in https://github.com/pharo-project/pharo-vm/pull/697
* Fix/speed regression by @tesonep in https://github.com/pharo-project/pharo-vm/pull/705

**Full Changelog**: https://github.com/pharo-project/pharo-vm/compare/v10.0.7...v10.0.8

## v10.0.7

* Update README.md by @guillep in https://github.com/pharo-project/pharo-vm/pull/688
* Fix ephemeron scanning perf by @guillep in https://github.com/pharo-project/pharo-vm/pull/691

**Full Changelog**: https://github.com/pharo-project/pharo-vm/compare/v10.0.6...v10.0.7

## v10.0.6

Improvements in build environment
* Update build environment for Pharo 10 vm branch by @guillep in https://github.com/pharo-project/pharo-vm/pull/594
* Make tests run in parallel by @guillep in https://github.com/pharo-project/pharo-vm/pull/596
* Update Jenkins to use Pharo 110 for building by @PalumboN in https://github.com/pharo-project/pharo-vm/pull/661

Cleanups
* Cleanups/externalize internalize by @guillep in https://github.com/pharo-project/pharo-vm/pull/583
* Fix/warnings by @guillep in https://github.com/pharo-project/pharo-vm/pull/584
* fixing-categorization in P10 by @tesonep in https://github.com/pharo-project/pharo-vm/pull/625

Fixes
* Fix mnuMethodOrNilFor: for method wrappers by @guillep in https://github.com/pharo-project/pharo-vm/pull/578
* fix function signatures by @pavel-krivanek in https://github.com/pharo-project/pharo-vm/pull/582

Debugging improvements
* Gdbinit file and helpers v2 by @guillep in https://github.com/pharo-project/pharo-vm/pull/486
* VM Debugger improvement with IR by @QDucasse in https://github.com/pharo-project/pharo-vm/pull/342

VM Improvements
* improving-permSpace by @tesonep in https://github.com/pharo-project/pharo-vm/pull/614
* Changing the order of command-line processing and PList in OSX by @tesonep in https://github.com/pharo-project/pharo-vm/pull/609
* Adding parsing of image parameters from PList by @tesonep in https://github.com/pharo-project/pharo-vm/pull/636
* Change terminate handler to exit with 128+signal by @jvalteren in https://github.com/pharo-project/pharo-vm/pull/644
* Improvements in parameters handling in OSX by @tesonep in https://github.com/pharo-project/pharo-vm/pull/639
* Adding check to fix when the image is open with an older VM by @tesonep in https://github.com/pharo-project/pharo-vm/pull/642
* Fix/ephemeron list by @guillep in https://github.com/pharo-project/pharo-vm/pull/668

New Contributors
* @jvalteren made their first contribution in https://github.com/pharo-project/pharo-vm/pull/644

**Full Changelog**: https://github.com/pharo-project/pharo-vm/compare/v10.0.5...v10.0.6

## v10.0.5

* Testing scavenger tenuring by @PalumboN in https://github.com/pharo-project/pharo-vm/pull/588
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ extractVCSInformation(GIT_COMMIT_HASH GIT_DESCRIBE GIT_COMMIT_DATE)

set(VERSION_MAJOR 10)
set(VERSION_MINOR 0)
set(VERSION_PATCH_NUMBER 5)
set(VERSION_PATCH_NUMBER 9)

if(BUILD_IS_RELEASE)
set(VERSION_PATCH "${VERSION_PATCH_NUMBER}")
Expand Down
81 changes: 63 additions & 18 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,9 @@ def runBuildFromSources(platformName, configuration, headless = true){
//We take the source code from Linux version
//It is extracted and will create the pharo-vm subdirectory
unstash name: "packages-Linux-x86_64-${configuration}"
shell "unzip -d . build/build/packages/PharoVM-*-Linux-x86_64-c-src.zip"
shell "ls"
def expandedCSourceFileName = sh(returnStdout: true, script: "ls build/build/packages/PharoVM-*-${archiveName}-c-src.zip").trim()
shell "unzip -d . ${expandedCSourceFileName}"
shell "mv pharo-vm repository"
}

Expand Down Expand Up @@ -233,8 +235,8 @@ def runTests(platform, configuration, packages, withWorker, additionalParameters
shell "mkdir runTests"
dir("runTests"){
try{
shell "wget -O - get.pharo.org/64/100 | bash "
shell "echo 100 > pharo.version"
shell "wget -O - get.pharo.org/64/110 | bash "
shell "echo 110 > pharo.version"

if(isWindows()){
runInCygwin "cd runTests && unzip ../build/build/packages/PharoVM-*-${platform}-bin.zip -d ."
Expand Down Expand Up @@ -460,9 +462,10 @@ try{
properties([disableConcurrentBuilds()])

def parallelBuilderPlatforms = ['Linux-x86_64', 'Darwin-x86_64', 'Windows-x86_64', 'Darwin-arm64']
def platforms = parallelBuilderPlatforms + ['Linux-aarch64', 'Linux-armv7l']
def platforms = parallelBuilderPlatforms // + ['Linux-aarch64', 'Linux-armv7l']
def builders = [:]
def dockerBuilders = [:]
def testsOnMainBranch = [:]

node('Darwin-x86_64'){
runUnitTests('Darwin-x86_64')
Expand All @@ -474,55 +477,97 @@ try{

builders[platform] = {
node(platform){
timeout(30){
timeout(40){
runBuild(platform, "CoInterpreter")
}
timeout(30){
runBuild(platform, "StackVM")
}
timeout(45){
runTests(platform, "CoInterpreter", ".*", false)
// If we are not in the main branch we want to run the tests as fast as possible
if(!isMainBranch()){
timeout(45){
runTests(platform, "CoInterpreter", ".*", false)
}
timeout(45){
runTests(platform, "CoInterpreter", ".*", true)
}
}
timeout(45){
runTests(platform, "CoInterpreter", ".*", true)

timeout(40){
runBuild(platform, "StackVM")
}
timeout(30){
timeout(40){
runBuild("${platform}-ComposedFormat", "CoInterpreter", true, " -DIMAGE_FORMAT=ComposedFormat ")
}
timeout(30){
timeout(40){
// Only build the Stock replacement version in the main branch
if(isMainBranch()){
runBuild(platform, "CoInterpreter", false)
}
}
}
}
}

if(isMainBranch()){
testsOnMainBranch[platform] = {
node(platform){
timeout(45){
runTests(platform, "CoInterpreter", ".*", false)
}
timeout(45){
runTests(platform, "CoInterpreter", ".*", true)
}
}
}
}
}

/*
dockerBuilders['Linux-aarch64'] = {
buildUsingDocker('Linux-aarch64', 'ubuntu-arm64', "CoInterpreter")
runTestsUsingDocker('Linux-aarch64', 'ubuntu-arm64', "CoInterpreter", "Kernel.*|Zinc.*", false)
// If we are not in the main branch we want to run the tests as fast as possible
if(!isMainBranch()){
runTestsUsingDocker('Linux-aarch64', 'ubuntu-arm64', "CoInterpreter", "Kernel.*|Zinc.*", false)
}else{
testsOnMainBranch['Linux-aarch64'] = {
runTestsUsingDocker('Linux-aarch64', 'ubuntu-arm64', "CoInterpreter", "Kernel.*|Zinc.*", false)
}
}
if(isMainBranch()){
buildUsingDocker('Linux-aarch64', 'ubuntu-arm64', "CoInterpreter", false)
}
}
dockerBuilders['Linux-armv7l'] = {
buildUsingDocker('Linux-armv7l', 'debian10-armv7', "CoInterpreter")
runTestsUsingDocker('Linux-armv7l', 'debian10-armv7', "CoInterpreter", "Kernel.*|Zinc.*", false)
// If we are not in the main branch we want to run the tests as fast as possible
if(!isMainBranch()){
runTestsUsingDocker('Linux-armv7l', 'debian10-armv7', "CoInterpreter", "Kernel.*|Zinc.*", false)
}else{
testsOnMainBranch['Linux-armv7l'] = {
runTestsUsingDocker('Linux-armv7l', 'debian10-armv7', "CoInterpreter", "Kernel.*|Zinc.*", false)
}
}
if(isMainBranch()){
buildUsingDocker('Linux-armv7l', 'debian10-armv7', "CoInterpreter", false)
}
}
*/

parallel builders

parallel dockerBuilders

uploadPackages(platforms)

buildGTKBundle()

// If we are in the main branch, we run the tests at the end, after doing the release
if(isMainBranch()){
parallel testsOnMainBranch
}

} catch (e) {
throw e
}
17 changes: 12 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
# Pharo VM

This is the main branch of the Pharo VM.

For more details about the whole Pharo VM project refer to our [wiki](../../wiki).

This repository holds the code of the Pharo Virtual Machine.
This implementation started as a fork of [OpenSmalltalk-vm](https://github.com/OpenSmalltalk/opensmalltalk-vm).

The current project could not have been possible with all their previous work.

The current implementation presents the following core features:
- an indirect threaded bytecode compiler using GNU extensions
- a generational scavenger garbage collector: semi-space + nursery for the young generation, a mark-compact collecting for the old generation
- a space for permanent objects that need not to be scanned by the GC
- a baseline JIT compiler that
- translates primitive operations using IR templates
- translates bytecode methods using a simple abstract interpretation approach to reduce memory pressure (less loads/stores)
- FFI through the well-known [libFFI](https://github.com/libffi/libffi), and support for non-blocking FFI using worker threads

For more details about the whole Pharo VM project refer to our [wiki](../../wiki).

# Table of Contents

- Building the Virtual Machine
Expand Down
6 changes: 4 additions & 2 deletions extracted/plugins/FileAttributesPlugin/src/unix/faSupport.c
Original file line number Diff line number Diff line change
Expand Up @@ -478,8 +478,10 @@ char targetFile[FA_PATH_MAX];
if (S_ISLNK(statBuf.st_mode)) {
/* This is a symbolic link, provide the target filename */
status = readlink(faGetPlatPath(aFaPath), targetFile, FA_PATH_MAX);
if (status >= 0)
targetOop = pathNameToOop(targetFile); } }
if (status >= 0) {
targetFile[status] = 0;
targetOop = pathNameToOop(targetFile); } } }

else {
status = stat(faGetPlatPath(aFaPath), &statBuf);
if (status)
Expand Down
6 changes: 6 additions & 0 deletions smalltalksrc/Melchor/VMClass.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -557,6 +557,12 @@ VMClass >> druidFail [
self error
]

{ #category : #'miscellaneous bytecodes' }
VMClass >> druidForceIntepretation [
"Tell the compiler we should execute the code below this point compiled but interpreted"
"Ignore in the interpreter"
]

{ #category : #'druid support' }
VMClass >> druidIgnore: aBlock [

Expand Down
31 changes: 31 additions & 0 deletions smalltalksrc/VMMaker-Tools/SpurMemoryManager.extension.st
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,34 @@ SpurMemoryManager >> inspectorHiddenRootsIn: composite [
addColumn: (SpStringTableColumn title: 'Address' evaluated: [ :hiddenRoot | hiddenRoot oop ])

]

{ #category : #'*VMMaker-Tools' }
SpurMemoryManager >> inspectorOldSpaceEntities: composite [

<inspectorPresentationOrder: 3 title: 'Old Space Entities'>

| entities unscannedEphemeronList |
entities := self allOldSpaceEntities collect: [ :oop | self asVMOop: oop ].
unscannedEphemeronList := #().
unscannedEphemerons start ifNotNil: [ unscannedEphemeronList := (unscannedEphemerons start to: unscannedEphemerons top - self bytesPerOop by: self bytesPerOop) collect: [ :p | self longAt: p] ].

^ SpTreeTablePresenter new
" alternateRowsColor;"
enableSearch;
items: entities;
children: [ :oop | oop pointers ];
addColumn: (SpStringTableColumn title: 'Oop' evaluated: [ :oop | oop oop ]);
addColumn: (SpStringTableColumn title: 'Oop(hex)' evaluated: [ :oop | oop oop hex ]);
addColumn: (SpStringTableColumn title: 'Label' evaluated: [ :oop | oop label ]);
addColumn: (SpStringTableColumn title: 'Type' evaluated: [ :oop | oop type ]);
addColumn: (SpStringTableColumn title: 'classIndex' evaluated: [ :oop | oop classIndex ]);
addColumn: (SpStringTableColumn title: 'rawNumSlots' evaluated: [ :oop | oop rawNumSlots ]);
addColumn: (SpStringTableColumn title: 'numSlots' evaluated: [ :oop | oop numSlots ]);
addColumn: (SpStringTableColumn title: 'bytes' evaluated: [ :oop | oop bytes ]);
addColumn: (SpStringTableColumn title: '1st pointer' evaluated: [ :oop | oop pointer: 0 ]);
addColumn: (SpStringTableColumn title: 'Format' evaluated: [ :oop | oop format ]);
addColumn: (SpStringTableColumn title: 'Flags&Misc' evaluated: [ :oop | oop flags,
((unscannedEphemeronList includes: oop oop) ifTrue: ['U'] ifFalse: ['.'])]);
yourself

]

0 comments on commit d8d35ae

Please sign in to comment.