Skip to content

Commit 201d442

Browse files
authored
Merge branch 'master' into byte-level-stress
2 parents 67ca98c + 6d210d6 commit 201d442

File tree

12 files changed

+68
-52
lines changed

12 files changed

+68
-52
lines changed

.github/scripts/ci-doc.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
set -xe
22

3-
cargo doc --features semispace --no-deps -Z crate-versions
3+
cargo doc --features semispace --no-deps

.github/workflows/micro-bm.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
uses: actions/checkout@v2
2323
with:
2424
repository: mmtk/mmtk-openjdk
25-
token: ${{ secrets.CI_ACCESS_TOKEN }}
25+
token: ${{ secrets.GITHUB_TOKEN }}
2626
path: mmtk-openjdk-trunk
2727
submodules: true
2828
ref: ${{ env.OPENJDK_BINDING_TRUNK_REF }}
@@ -38,7 +38,7 @@ jobs:
3838
uses: actions/checkout@v2
3939
with:
4040
repository: mmtk/mmtk-openjdk
41-
token: ${{ secrets.CI_ACCESS_TOKEN }}
41+
token: ${{ secrets.GITHUB_TOKEN }}
4242
path: mmtk-openjdk-branch
4343
submodules: true
4444
ref: ${{ env.OPENJDK_BINDING_BRANCH_REF }}
@@ -53,15 +53,18 @@ jobs:
5353
uses: actions/checkout@v2
5454
with:
5555
repository: mmtk/ci-perf-kit
56-
token: ${{ secrets.CI_ACCESS_TOKEN }}
56+
token: ${{ secrets.GITHUB_TOKEN }}
5757
ref: "0.4.3"
5858
path: ci-perf-kit
5959
submodules: true
60+
# Use rust-toolchain in the trunk (it doesnt matter much - if the toolchains defined in the trunk and the branch are different, we cant run anyway)
61+
- name: Setup Rust Toolchain
62+
run: echo "RUSTUP_TOOLCHAIN=`cat mmtk-core-trunk/rust-toolchain`" >> $GITHUB_ENV
6063
# run compare
6164
- name: Compare Performance
6265
id: run
6366
run: |
64-
RUSTUP_TOOLCHAIN=nightly-2020-07-08 ./ci-perf-kit/scripts/openjdk-micro-bm.sh mmtk-openjdk-trunk/ mmtk-core-trunk/ mmtk-openjdk-branch/ mmtk-core-branch/ openjdk-rebench-report.md
67+
./ci-perf-kit/scripts/openjdk-micro-bm.sh mmtk-openjdk-trunk/ mmtk-core-trunk/ mmtk-openjdk-branch/ mmtk-core-branch/ openjdk-rebench-report.md
6568
# set report.md to output
6669
- uses: pCYSl5EDgo/cat@master
6770
id: cat

.github/workflows/perf-regression-ci.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ jobs:
3434
# setup
3535
- name: Overwrite MMTk core in JikesRVM binding
3636
run: cp -r mmtk-core mmtk-jikesrvm/repos/
37+
- name: Setup Rust Toolchain
38+
run: echo "RUSTUP_TOOLCHAIN=`cat mmtk-core/rust-toolchain`" >> $GITHUB_ENV
3739
- name: Setup
3840
run: |
3941
./ci-perf-kit/scripts/history-run-setup.sh
@@ -47,7 +49,6 @@ jobs:
4749
# run
4850
- name: Performance Run
4951
run: |
50-
export RUSTUP_TOOLCHAIN=nightly-2020-07-08
5152
export RESULT_REPO=mmtk/ci-perf-result
5253
export RESULT_REPO_BRANCH=self-hosted
5354
export RESULT_REPO_ACCESS_TOKEN=${{ secrets.CI_ACCESS_TOKEN }}
@@ -90,6 +91,8 @@ jobs:
9091
# setup
9192
- name: Overwrite MMTk core in openjdk binding
9293
run: cp -r mmtk-core mmtk-openjdk/repos/
94+
- name: Setup Rust Toolchain
95+
run: echo "RUSTUP_TOOLCHAIN=`cat mmtk-core/rust-toolchain`" >> $GITHUB_ENV
9396
# cleanup previosu build
9497
- name: Cleanup previous build
9598
run: |
@@ -108,7 +111,6 @@ jobs:
108111
# run
109112
- name: Performance Run
110113
run: |
111-
export RUSTUP_TOOLCHAIN=nightly-2020-07-08
112114
export RESULT_REPO=mmtk/ci-perf-result
113115
export RESULT_REPO_BRANCH=self-hosted
114116
export RESULT_REPO_ACCESS_TOKEN=${{ secrets.CI_ACCESS_TOKEN }}
@@ -150,6 +152,8 @@ jobs:
150152
# setup
151153
- name: Overwrite MMTk core in openjdk binding
152154
run: cp -r mmtk-core mmtk-openjdk/repos/
155+
- name: Setup Rust Toolchain
156+
run: echo "RUSTUP_TOOLCHAIN=`cat mmtk-core/rust-toolchain`" >> $GITHUB_ENV
153157
# cleanup previosu build
154158
- name: Cleanup previous build
155159
run: |
@@ -168,7 +172,6 @@ jobs:
168172
# run
169173
- name: Performance Run
170174
run: |
171-
export RUSTUP_TOOLCHAIN=nightly-2020-07-08
172175
export RESULT_REPO=mmtk/ci-perf-result
173176
export RESULT_REPO_BRANCH=self-hosted
174177
export RESULT_REPO_ACCESS_TOKEN=${{ secrets.CI_ACCESS_TOKEN }}

.github/workflows/post-review-ci.yml

Lines changed: 29 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -25,24 +25,26 @@ jobs:
2525
uses: actions/checkout@v2
2626
with:
2727
repository: mmtk/mmtk-v8
28-
token: ${{ secrets.CI_ACCESS_TOKEN }}
28+
token: ${{ secrets.GITHUB_TOKEN }}
2929
path: mmtk-v8
3030
ref: ${{ env.V8_BINDING_REF }}
3131
- name: Overwrite MMTk core in V8 binding
3232
run: |
3333
rm -rf mmtk-v8/repos/*
3434
mkdir -p mmtk-v8/repos/mmtk-core
3535
cp -r mmtk-core/* mmtk-v8/repos/mmtk-core
36+
- name: Setup Rust Toolchain
37+
run: echo "RUSTUP_TOOLCHAIN=`cat mmtk-core/rust-toolchain`" >> $GITHUB_ENV
3638
- name: Setup
3739
run: |
3840
cd mmtk-v8
39-
RUSTUP_TOOLCHAIN=nightly-2020-07-08 ./.github/scripts/ci-setup.sh
41+
./.github/scripts/ci-setup.sh
4042
sed -i 's/^mmtk[[:space:]]=/#ci:mmtk=/g' mmtk/Cargo.toml
4143
sed -i 's/^#[[:space:]]mmtk/mmtk/g' mmtk/Cargo.toml
4244
- name: Test
4345
run: |
4446
cd mmtk-v8
45-
RUSTUP_TOOLCHAIN=nightly-2020-07-08 V8_ROOT=$GITHUB_WORKSPACE/v8_deps .github/scripts/ci-test.sh
47+
V8_ROOT=$GITHUB_WORKSPACE/v8_deps .github/scripts/ci-test.sh
4648
4749
# JikesRVM
4850
jikesrvm-binding-test:
@@ -63,23 +65,25 @@ jobs:
6365
uses: actions/checkout@v2
6466
with:
6567
repository: mmtk/mmtk-jikesrvm
66-
token: ${{ secrets.CI_ACCESS_TOKEN }}
68+
token: ${{ secrets.GITHUB_TOKEN }}
6769
path: mmtk-jikesrvm
6870
submodules: true
6971
ref: ${{ env.JIKESRVM_BINDING_REF }}
7072
- name: Overwrite MMTk core in JikesRVM binding
7173
run: |
7274
cp -r mmtk-core mmtk-jikesrvm/repos
75+
- name: Setup Rust Toolchain
76+
run: echo "RUSTUP_TOOLCHAIN=`cat mmtk-core/rust-toolchain`" >> $GITHUB_ENV
7377
- name: Setup
7478
run: |
7579
cd mmtk-jikesrvm
76-
RUSTUP_TOOLCHAIN=nightly-2020-07-08 ./.github/scripts/ci-setup.sh
80+
./.github/scripts/ci-setup.sh
7781
sed -i 's/^mmtk[[:space:]]=/#ci:mmtk=/g' mmtk/Cargo.toml
7882
sed -i 's/^#[[:space:]]mmtk/mmtk/g' mmtk/Cargo.toml
7983
- name: Test
8084
run: |
8185
cd mmtk-jikesrvm
82-
RUSTUP_TOOLCHAIN=nightly-2020-07-08 ./.github/scripts/ci-test.sh
86+
./.github/scripts/ci-test.sh
8387
jikesrvm-perf-compare:
8488
runs-on: [self-hosted, Linux, freq-scaling-off]
8589
if: contains(github.event.pull_request.labels.*.name, 'PR-benchmarking')
@@ -95,7 +99,7 @@ jobs:
9599
uses: actions/checkout@v2
96100
with:
97101
repository: mmtk/mmtk-jikesrvm
98-
token: ${{ secrets.CI_ACCESS_TOKEN }}
102+
token: ${{ secrets.GITHUB_TOKEN }}
99103
path: mmtk-jikesrvm-trunk
100104
submodules: true
101105
ref: ${{ env.JIKESRVM_BINDING_TRUNK_REF }}
@@ -111,7 +115,7 @@ jobs:
111115
uses: actions/checkout@v2
112116
with:
113117
repository: mmtk/mmtk-jikesrvm
114-
token: ${{ secrets.CI_ACCESS_TOKEN }}
118+
token: ${{ secrets.GITHUB_TOKEN }}
115119
path: mmtk-jikesrvm-branch
116120
submodules: true
117121
ref: ${{ env.JIKESRVM_BINDING_BRANCH_REF }}
@@ -126,11 +130,14 @@ jobs:
126130
uses: actions/checkout@v2
127131
with:
128132
repository: mmtk/ci-perf-kit
129-
token: ${{ secrets.CI_ACCESS_TOKEN }}
133+
token: ${{ secrets.GITHUB_TOKEN }}
130134
ref: "0.4.3"
131135
path: ci-perf-kit
132136
submodules: true
133137
# setup
138+
# Use rust-toolchain in the trunk (it doesnt matter much - if the toolchains defined in the trunk and the branch are different, we cant run anyway)
139+
- name: Setup Rust Toolchain
140+
run: echo "RUSTUP_TOOLCHAIN=`cat mmtk-core-trunk/rust-toolchain`" >> $GITHUB_ENV
134141
- name: Setup
135142
run: |
136143
mkdir -p ci-perf-kit/running/benchmarks/dacapo
@@ -139,7 +146,7 @@ jobs:
139146
- name: Compare Performance
140147
id: run
141148
run: |
142-
JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-amd64 RUSTUP_TOOLCHAIN=nightly-2020-07-08 ./ci-perf-kit/scripts/jikesrvm-compare.sh mmtk-jikesrvm-trunk/ mmtk-core-trunk/ mmtk-jikesrvm-branch/ mmtk-core-branch/ jikesrvm-compare-report.md
149+
JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-amd64 ./ci-perf-kit/scripts/jikesrvm-compare.sh mmtk-jikesrvm-trunk/ mmtk-core-trunk/ mmtk-jikesrvm-branch/ mmtk-core-branch/ jikesrvm-compare-report.md
143150
# set report.md to output
144151
- uses: pCYSl5EDgo/cat@master
145152
id: cat
@@ -187,22 +194,24 @@ jobs:
187194
uses: actions/checkout@v2
188195
with:
189196
repository: mmtk/mmtk-openjdk
190-
token: ${{ secrets.CI_ACCESS_TOKEN }}
197+
token: ${{ secrets.GITHUB_TOKEN }}
191198
path: mmtk-openjdk
192199
submodules: true
193200
ref: ${{ env.OPENJDK_BINDING_REF }}
194201
- name: Overwrite MMTk core in openjdk binding
195202
run: cp -r mmtk-core mmtk-openjdk/repos/
203+
- name: Setup Rust Toolchain
204+
run: echo "RUSTUP_TOOLCHAIN=`cat mmtk-core/rust-toolchain`" >> $GITHUB_ENV
196205
- name: Setup
197206
run: |
198207
cd mmtk-openjdk
199-
RUSTUP_TOOLCHAIN=nightly-2020-07-08 ./.github/scripts/ci-setup.sh
208+
./.github/scripts/ci-setup.sh
200209
sed -i 's/^mmtk[[:space:]]=/#ci:mmtk=/g' mmtk/Cargo.toml
201210
sed -i 's/^#[[:space:]]mmtk/mmtk/g' mmtk/Cargo.toml
202211
- name: Test
203212
run: |
204213
cd mmtk-openjdk
205-
RUSTUP_TOOLCHAIN=nightly-2020-07-08 ./.github/scripts/ci-test.sh
214+
./.github/scripts/ci-test.sh
206215
openjdk-perf-compare:
207216
runs-on: [self-hosted, Linux, freq-scaling-off]
208217
if: contains(github.event.pull_request.labels.*.name, 'PR-benchmarking')
@@ -218,7 +227,7 @@ jobs:
218227
uses: actions/checkout@v2
219228
with:
220229
repository: mmtk/mmtk-openjdk
221-
token: ${{ secrets.CI_ACCESS_TOKEN }}
230+
token: ${{ secrets.GITHUB_TOKEN }}
222231
path: mmtk-openjdk-trunk
223232
submodules: true
224233
ref: ${{ env.OPENJDK_BINDING_TRUNK_REF }}
@@ -234,7 +243,7 @@ jobs:
234243
uses: actions/checkout@v2
235244
with:
236245
repository: mmtk/mmtk-openjdk
237-
token: ${{ secrets.CI_ACCESS_TOKEN }}
246+
token: ${{ secrets.GITHUB_TOKEN }}
238247
path: mmtk-openjdk-branch
239248
submodules: true
240249
ref: ${{ env.OPENJDK_BINDING_BRANCH_REF }}
@@ -249,11 +258,14 @@ jobs:
249258
uses: actions/checkout@v2
250259
with:
251260
repository: mmtk/ci-perf-kit
252-
token: ${{ secrets.CI_ACCESS_TOKEN }}
261+
token: ${{ secrets.GITHUB_TOKEN }}
253262
ref: "0.4.3"
254263
path: ci-perf-kit
255264
submodules: true
256265
# setup
266+
# Use rust-toolchain in the trunk (it doesnt matter much - if the toolchains defined in the trunk and the branch are different, we cant run anyway)
267+
- name: Setup Rust Toolchain
268+
run: echo "RUSTUP_TOOLCHAIN=`cat mmtk-core-trunk/rust-toolchain`" >> $GITHUB_ENV
257269
- name: Setup
258270
run: |
259271
mkdir -p ci-perf-kit/running/benchmarks/dacapo
@@ -262,7 +274,7 @@ jobs:
262274
- name: Compare Performance
263275
id: run
264276
run: |
265-
RUSTUP_TOOLCHAIN=nightly-2020-07-08 ./ci-perf-kit/scripts/openjdk-compare.sh mmtk-openjdk-trunk/ mmtk-core-trunk/ mmtk-openjdk-branch/ mmtk-core-branch/ openjdk-compare-report.md
277+
./ci-perf-kit/scripts/openjdk-compare.sh mmtk-openjdk-trunk/ mmtk-core-trunk/ mmtk-openjdk-branch/ mmtk-core-branch/ openjdk-compare-report.md
266278
# set report.md to output
267279
- uses: pCYSl5EDgo/cat@master
268280
id: cat

.github/workflows/pre-review-ci.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ jobs:
1414
- name: Install latest nightly
1515
uses: actions-rs/toolchain@v1
1616
with:
17-
toolchain: nightly-2020-07-08
1817
components: rustfmt, clippy
1918
target: i686-unknown-linux-gnu
2019
# This overwrites the default toolchain with the toolchain specified above.
@@ -33,7 +32,6 @@ jobs:
3332
run: |
3433
sudo apt-get update
3534
sudo apt-get install libc6-dev-i386
36-
export RUSTUP_TOOLCHAIN=nightly-2020-07-08
3735
./.github/scripts/ci-test.sh
3836
3937
# Style checks

.github/workflows/rustdoc.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,9 @@ jobs:
1111
runs-on: ubuntu-18.04
1212
steps:
1313
- uses: actions/checkout@v2
14-
- name: Install latest nightly
14+
- name: Install nightly
1515
uses: actions-rs/toolchain@v1
1616
with:
17-
toolchain: nightly-2020-07-08
1817
components: rustfmt, clippy
1918
target: i686-unknown-linux-gnu
2019
# This overwrites the default toolchain with the toolchain specified above.

.github/workflows/stress-ci.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ jobs:
2424
# setup
2525
- name: Overwrite MMTk core in JikesRVM binding
2626
run: cp -r mmtk-core mmtk-jikesrvm/repos/
27+
- name: Setup Rust Toolchain
28+
run: echo "RUSTUP_TOOLCHAIN=`cat mmtk-core/rust-toolchain`" >> $GITHUB_ENV
2729
- name: Setup
2830
run: |
2931
sed -i 's/^mmtk[[:space:]]=/#ci:mmtk=/g' mmtk-jikesrvm/mmtk/Cargo.toml
@@ -32,7 +34,7 @@ jobs:
3234
- name: Build SemiSpace
3335
run: |
3436
cd mmtk-jikesrvm/repos/jikesrvm
35-
RUSTUP_TOOLCHAIN=nightly-2020-07-08 python scripts/testMMTk.py -g RFastAdaptiveSemiSpace -j /usr/lib/jvm/java-1.8.0-openjdk-amd64 --build-only -- --answer-yes --quick --use-third-party-heap=../../ --use-third-party-build-configs=../../jikesrvm/build/configs --use-external-source=../../jikesrvm/rvm/src
37+
python scripts/testMMTk.py -g RFastAdaptiveSemiSpace -j /usr/lib/jvm/java-1.8.0-openjdk-amd64 --build-only -- --answer-yes --quick --use-third-party-heap=../../ --use-third-party-build-configs=../../jikesrvm/build/configs --use-external-source=../../jikesrvm/rvm/src
3638
# Set parameters
3739
- name: Set stress test parameters
3840
id: stress_test
@@ -106,6 +108,8 @@ jobs:
106108
# setup
107109
- name: Overwrite MMTk core in openjdk binding
108110
run: cp -r mmtk-core mmtk-openjdk/repos/
111+
- name: Setup Rust Toolchain
112+
run: echo "RUSTUP_TOOLCHAIN=`cat mmtk-core/rust-toolchain`" >> $GITHUB_ENV
109113
- name: Setup
110114
run: |
111115
sed -i 's/^mmtk[[:space:]]=/#ci:mmtk=/g' mmtk-openjdk/mmtk/Cargo.toml
@@ -116,7 +120,6 @@ jobs:
116120
cd mmtk-openjdk/repos/openjdk
117121
export DEBUG_LEVEL=release
118122
export MMTK_PLAN=semispace
119-
export RUSTUP_TOOLCHAIN=nightly-2020-07-08
120123
sh configure --disable-warnings-as-errors --with-debug-level=$DEBUG_LEVEL
121124
make CONF=linux-x86_64-normal-server-$DEBUG_LEVEL THIRD_PARTY_HEAP=$PWD/../../openjdk
122125
# Set parameters

examples/build.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,6 @@
66
import os
77
import sys
88

9-
# check RUSTUP_TOOLCHAIN
10-
if "RUSTUP_TOOLCHAIN" in os.environ:
11-
toolchain = "+" + os.environ["RUSTUP_TOOLCHAIN"]
12-
else:
13-
toolchain = "+nightly"
14-
159
MMTk_ROOT = os.path.join(__file__, "..", "..")
1610

1711
plan_dir = os.path.abspath(os.path.join(MMTk_ROOT, "src", "plan"))
@@ -53,8 +47,6 @@ def exec_and_redirect(args, env=None):
5347
for plan in PLANS:
5448
cmd = []
5549
cmd.append("cargo")
56-
if toolchain:
57-
cmd.append(toolchain)
5850
cmd.extend([
5951
"build",
6052
"--manifest-path",

rust-toolchain

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
nightly-2020-12-20

src/util/alloc/allocators.rs

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,12 @@ impl<VM: VMBinding> Allocators<VM> {
2525
/// The selector needs to be valid, and points to an allocator that has been initialized.
2626
pub unsafe fn get_allocator(&self, selector: AllocatorSelector) -> &dyn Allocator<VM> {
2727
match selector {
28-
AllocatorSelector::BumpPointer(index) => self.bump_pointer[index as usize].get_ref(),
29-
AllocatorSelector::LargeObject(index) => self.large_object[index as usize].get_ref(),
28+
AllocatorSelector::BumpPointer(index) => {
29+
self.bump_pointer[index as usize].assume_init_ref()
30+
}
31+
AllocatorSelector::LargeObject(index) => {
32+
self.large_object[index as usize].assume_init_ref()
33+
}
3034
}
3135
}
3236

@@ -37,8 +41,12 @@ impl<VM: VMBinding> Allocators<VM> {
3741
selector: AllocatorSelector,
3842
) -> &mut dyn Allocator<VM> {
3943
match selector {
40-
AllocatorSelector::BumpPointer(index) => self.bump_pointer[index as usize].get_mut(),
41-
AllocatorSelector::LargeObject(index) => self.large_object[index as usize].get_mut(),
44+
AllocatorSelector::BumpPointer(index) => {
45+
self.bump_pointer[index as usize].assume_init_mut()
46+
}
47+
AllocatorSelector::LargeObject(index) => {
48+
self.large_object[index as usize].assume_init_mut()
49+
}
4250
}
4351
}
4452

src/util/heap/vmrequest.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,7 @@ pub enum VMRequest {
2222

2323
impl VMRequest {
2424
pub fn is_discontiguous(&self) -> bool {
25-
match self {
26-
VMRequest::RequestDiscontiguous { .. } => true,
27-
_ => false,
28-
}
25+
matches!(self, VMRequest::RequestDiscontiguous { .. })
2926
}
3027

3128
pub fn common64bit(top: bool) -> Self {

0 commit comments

Comments
 (0)