Closed wks closed 7 months ago
Here are some preliminary benchmark results. Two builds:
lusearch
from DaCapo Chopin, 40 invocations, 5 iterations, 2.5x and 3x min heap size, ran on shrew.moma
(Coffee Lake) and vole.moma
(Ryzen 4).
I ran it with Immix
and GenCopy
. However GenCopy
overflowed the phase counter. As a result, the stats of subsequent GCs are discarded from the result. (See https://github.com/mmtk/mmtk-core/issues/1074) So I am only showing the results for Immix
.
From the data, the impact on total time is between -0.5% to +0.5%, and the error bar is large. Interestingly, it always shows slowdown on shrew, and always speed-up on vole. For STW time, "shrew 2.5x" has a slow-down of 1%, and "vole 3x" has a speed-up of 1.5%, but their error bars are too large.
I think the result of forcing ObjectReference
to be non-zero is insignificant for lusearch
with Immix.
More benchmark results. I ran the same binary on shrew.moma and mole.moma (identical to vole.moma), 20 invocations, 3x min heap size, using Immix and StickyImmix GC.
Total time: normalized to build1 of the corresponding machine-plan pair:
For each machine-plan pair, the geomean of total time of build2 is between 99.6% to 100.3% of that of build1.
Other time:
Geomeans are between 99.8% to 100.3% of build1.
STW time:
STW times are between 97.9% to 101.0% of build1. But given the noise level, it is hard to conclude there is any improvement. We can see significant speed-up for build2-shrew-StickyImmix for biojava, jython and pmd, but build2-mole-StickyImmix does not have the same speed-up for those benchmarks. This is a bit hard to explain.
binding-refs OPENJDK_BINDING_REPO=wks/mmtk-openjdk OPENJDK_BINDING_REF=fix/no-null-objref JIKESRVM_BINDING_REPO=wks/mmtk-jikesrvm JIKESRVM_BINDING_REF=fix/no-null-objref V8_BINDING_REPO=wks/mmtk-v8 V8_BINDING_REF=fix/no-null-objref RUBY_BINDING_REPO=wks/mmtk-ruby RUBY_BINDING_REF=fix/no-null-objref JULIA_BINDING_REPO=wks/mmtk-julia JULIA_BINDING_REF=fix/no-null-objref
This PR is now ready for review. Associated PRs for the bindings:
Also a quick check: is there any change that may affect performance for OpenJDK and MMTk since the evaluation in #1064 (comment)?
I don't think so, but I'll re-run the benchmarks just to be safe.
I re-ran the benchmarks with the same setting as in https://github.com/mmtk/mmtk-core/pull/1064#issuecomment-1903158498
Total time: (geomens of build2 are between 99.5% to 100.2% of build1, varying among plan * machine
pairs)
Other time: (99.6% to 100.1%)
STW time: (99.2% to 100.8%)
The differences are within 1%. This result is consistent with the last evaluation.
We changed
ObjectReference
so that it is backed byNonZeroUsize
, and can no longer represent a NULL reference. For cases where anObjectReferences
may or may not exist,Option<ObjectReference>
should be used instead.This is an API-breaking change.
ObjectReference::NULL
andObjectReference::is_null()
are removed.ObjectReference::from_raw_address()
now returnsOption<ObjectReference>
. The unsafe methodObjectReference::from_raw_address_unchecked()
assumes the address is not zero, and returnsObjectReference
.ObjectReference
now returnOption<ObjectReference>
. Examples includeEdge::load()
andReferenceGlue::get_referent()
.If a VM binding needs to expose
Option<ObjectReference>
to native (C/C++) programs, a convenient typecrate::util::api_util::NullableObjectReference
is provided.Fixes: https://github.com/mmtk/mmtk-core/issues/1043