Skip to content

Edge trait #160

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 29, 2022
Merged

Edge trait #160

merged 2 commits into from
Aug 29, 2022

Conversation

wks
Copy link
Contributor

@wks wks commented Jun 2, 2022

Note that this commit does not add support for compressed OOPs.

See also: mmtk/mmtk-core#606

@wks
Copy link
Contributor Author

wks commented Aug 17, 2022

At this stage, I simply set OpenJDK::VMEdge to Address so that it does not change the behaviour.

Microbenchmark shows the performance impact is negligible.

Benchmark: Create a 22-level binary search tree, run System.gc() 10 times for warmup, and run System.gc() 100 times to record the GC time. Repeat the experiment for 5 times, alternating between two builds (master and this PR) and two plans (SemiSpace and Immix). Collect all 500 GC times for each build+plan combination and see their distributions. The code is available at https://github.com/wks/tracetest

It is run on elk.moma. The command is: MMTK_THREADS=1 RUST_BACKTRACE=1 MMTK_PLAN=$plan /path/to/java -XX:+UseThirdPartyHeap -server -XX:-TieredCompilation -Xcomp -XX:MetaspaceSize=100M -Xm{s,x}500M TraceTest $depth $gcs $warmups.

plan GC mean:1 mean:2 +- median:1 median:2 +- sd:1 sd:2
SemiSpace 500 130.850331838ms 130.49742917ms 99.73030051735986% 130.25169ms 129.9837085ms 99.79425871556829% 1.9529565621904863ms 1.7784804514583266ms
Immix 500 183.50406285ms 185.00186711199999ms 100.81622403272037% 182.564638ms 183.971054ms 100.77036605522697% 4.910330121951998ms 4.992484211050324ms

Distribution:
image

Given that there is no performance degradation, I'll continue with other bindings. I'll also confirm the performance results by running DaCapo benchmarks.

@wks
Copy link
Contributor Author

wks commented Aug 22, 2022

And the results on DaCapo Chopin. Run on elk.moma, 20 iterations.

Results for SemiSpace (on squirrel.moma)

image

Results for Immix (on squirrel.moma)

image

The mean STW times of most benchmarks are less than 1% different from master. Batik has huge error bars because GC only happened on average 3 times for SemiSpace and 1.6 times for Immix. H2 is a bit strange because in the 20 invocations, only 4 has results for SemiSpace and 2 has results for Immix, and I think the rest of the invocations failed silently for some reasons.

STW time distribution:

image

@wks wks force-pushed the edge-shape branch 2 times, most recently from 50cf7e0 to bb4bcfe Compare August 25, 2022 10:38
This commit aims to be a minimal change.  We add the Edge trait to API
functions, but we still implement Edge with Address so that it still
behaves like before.
@wks wks marked this pull request as ready for review August 25, 2022 15:42
@wks wks requested a review from qinsoon August 25, 2022 15:50
Copy link
Member

@qinsoon qinsoon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@wks wks requested a review from wenyuzhao August 26, 2022 03:34
Copy link
Member

@wenyuzhao wenyuzhao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Sorry I haven't fully addressed my compressed pointer performance issue, so I haven't try using this change to support compressed pointers. I'll probably do that later after this PR is merged.

@wks wks merged commit 72c9b56 into mmtk:master Aug 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants