Skip to content

Commit 4cc1342

Browse files
committed
Merge remote-tracking branch 'upstream/master' into jdk-20+20-mmtk
2 parents 56b1db3 + 747b42e commit 4cc1342

13 files changed

+68
-70
lines changed

.github/scripts/ci-test-assertions.sh

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,6 @@ export MMTK_PLAN=NoGC
3939
build/linux-x86_64-normal-server-$DEBUG_LEVEL/jdk/bin/java -XX:+UseThirdPartyHeap -server -XX:MetaspaceSize=100M -Xms1G -Xmx1G -jar $DACAPO_PATH/dacapo-2006-10-MR2.jar fop
4040
build/linux-x86_64-normal-server-$DEBUG_LEVEL/jdk/bin/java -XX:+UseThirdPartyHeap -server -XX:MetaspaceSize=100M -Xms1G -Xmx1G -jar $DACAPO_PATH/dacapo-2006-10-MR2.jar luindex
4141

42-
# -- MarkSweep --
43-
export MMTK_PLAN=MarkSweep
44-
45-
build/linux-x86_64-normal-server-$DEBUG_LEVEL/jdk/bin/java -XX:+UseThirdPartyHeap -server -XX:MetaspaceSize=100M -Xms500M -Xmx500M -jar $DACAPO_PATH/dacapo-2006-10-MR2.jar fop
46-
build/linux-x86_64-normal-server-$DEBUG_LEVEL/jdk/bin/java -XX:+UseThirdPartyHeap -server -XX:MetaspaceSize=100M -Xms500M -Xmx500M -jar $DACAPO_PATH/dacapo-2006-10-MR2.jar luindex
47-
4842
# -- PageProtect --
4943
sudo sysctl -w vm.max_map_count=655300
5044
export MMTK_PLAN=PageProtect

.github/scripts/ci-test-global-alloc-bit.sh

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,3 @@ export MMTK_PLAN=NoGC
4747
build/linux-x86_64-normal-server-$DEBUG_LEVEL/jdk/bin/java -XX:+UseThirdPartyHeap -server -XX:MetaspaceSize=100M -Xms1G -Xmx1G -jar $DACAPO_PATH/dacapo-2006-10-MR2.jar antlr
4848
build/linux-x86_64-normal-server-$DEBUG_LEVEL/jdk/bin/java -XX:+UseThirdPartyHeap -server -XX:MetaspaceSize=100M -Xms1G -Xmx1G -jar $DACAPO_PATH/dacapo-2006-10-MR2.jar fop
4949
build/linux-x86_64-normal-server-$DEBUG_LEVEL/jdk/bin/java -XX:+UseThirdPartyHeap -server -XX:MetaspaceSize=100M -Xms1G -Xmx1G -jar $DACAPO_PATH/dacapo-2006-10-MR2.jar luindex
50-
51-
52-
# --- MarkSweep ---
53-
export MMTK_PLAN=MarkSweep
54-
55-
build/linux-x86_64-normal-server-$DEBUG_LEVEL/jdk/bin/java -XX:+UseThirdPartyHeap -server -XX:MetaspaceSize=100M -Xms500M -Xmx500M -jar $DACAPO_PATH/dacapo-2006-10-MR2.jar antlr
56-
build/linux-x86_64-normal-server-$DEBUG_LEVEL/jdk/bin/java -XX:+UseThirdPartyHeap -server -XX:MetaspaceSize=100M -Xms500M -Xmx500M -jar $DACAPO_PATH/dacapo-2006-10-MR2.jar fop
57-
build/linux-x86_64-normal-server-$DEBUG_LEVEL/jdk/bin/java -XX:+UseThirdPartyHeap -server -XX:MetaspaceSize=100M -Xms500M -Xmx500M -jar $DACAPO_PATH/dacapo-2006-10-MR2.jar luindex
58-

.github/scripts/ci-test-header-mark-bit.sh

Lines changed: 0 additions & 26 deletions
This file was deleted.
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
set -xe
2+
3+
. $(dirname "$0")/common.sh
4+
5+
build() {
6+
cd $OPENJDK_PATH
7+
export MMTK_MALLOC_MARK_SWEEP=1
8+
sh configure --disable-warnings-as-errors --with-debug-level=$DEBUG_LEVEL
9+
make CONF=linux-x86_64-normal-server-$DEBUG_LEVEL THIRD_PARTY_HEAP=$BINDING_PATH/openjdk
10+
unset MMTK_MALLOC_MARK_SWEEP
11+
}
12+
13+
run_test() {
14+
export MMTK_PLAN=MarkSweep
15+
16+
# Malloc marksweep is horribly slow. We just run fop.
17+
18+
# build/linux-x86_64-normal-server-$DEBUG_LEVEL/jdk/bin/java -XX:+UseThirdPartyHeap -server -XX:MetaspaceSize=100M -Xms500M -Xmx500M -jar $DACAPO_PATH/dacapo-2006-10-MR2.jar antlr
19+
build/linux-x86_64-normal-server-$DEBUG_LEVEL/jdk/bin/java -XX:+UseThirdPartyHeap -server -XX:MetaspaceSize=100M -Xms50M -Xmx50M -jar $DACAPO_PATH/dacapo-2006-10-MR2.jar fop
20+
# build/linux-x86_64-normal-server-$DEBUG_LEVEL/jdk/bin/java -XX:+UseThirdPartyHeap -server -XX:MetaspaceSize=100M -Xms500M -Xmx500M -jar $DACAPO_PATH/dacapo-2006-10-MR2.jar luindex
21+
# build/linux-x86_64-normal-server-$DEBUG_LEVEL/jdk/bin/java -XX:+UseThirdPartyHeap -server -XX:MetaspaceSize=100M -Xms500M -Xmx500M -jar $DACAPO_PATH/dacapo-2006-10-MR2.jar pmd
22+
# build/linux-x86_64-normal-server-$DEBUG_LEVEL/jdk/bin/java -XX:+UseThirdPartyHeap -server -XX:MetaspaceSize=100M -Xms500M -Xmx500M -jar $DACAPO_PATH/dacapo-2006-10-MR2.jar hsqldb
23+
# build/linux-x86_64-normal-server-$DEBUG_LEVEL/jdk/bin/java -XX:+UseThirdPartyHeap -server -XX:MetaspaceSize=100M -Xms500M -Xmx500M -jar $DACAPO_PATH/dacapo-2006-10-MR2.jar eclipse
24+
25+
unset MMTK_PLAN
26+
}
27+
28+
unset JAVA_TOOL_OPTIONS
29+
unset MMTK_PLAN
30+
31+
# --- Normal test ---
32+
build
33+
run_test
34+
35+
# --- Header mark bit ---
36+
export MARK_IN_HEADER=1
37+
build
38+
run_test
39+
unset MARK_IN_HEADER
40+
41+
# --- Test assertions ---
42+
export MMTK_EXTREME_ASSERTIONS=1
43+
build
44+
run_test
45+
unset MMTK_EXTREME_ASSERTIONS

.github/scripts/ci-test-only-normal.sh

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -110,25 +110,6 @@ build/linux-x86_64-normal-server-$DEBUG_LEVEL/jdk/bin/java -XX:+UseThirdPartyHea
110110
build/linux-x86_64-normal-server-$DEBUG_LEVEL/jdk/bin/java -XX:+UseThirdPartyHeap -server -XX:MetaspaceSize=100M -XX:TieredStopAtLevel=1 -Xms500M -Xmx500M -jar $DACAPO_PATH/dacapo-2006-10-MR2.jar hsqldb
111111
build/linux-x86_64-normal-server-$DEBUG_LEVEL/jdk/bin/java -XX:+UseThirdPartyHeap -server -XX:MetaspaceSize=100M -XX:TieredStopAtLevel=1 -Xms500M -Xmx500M -jar $DACAPO_PATH/dacapo-2006-10-MR2.jar eclipse
112112

113-
# --- MarkSweep ---
114-
export MMTK_PLAN=MarkSweep
115-
116-
# Test - the benchmarks that are commented out do not work yet
117-
# Note: the command line options are necessary for now to ensure the benchmarks work. We may later change the options if we do not have these many constraints.
118-
build/linux-x86_64-normal-server-$DEBUG_LEVEL/jdk/bin/java -XX:+UseThirdPartyHeap -server -XX:MetaspaceSize=100M -Xms500M -Xmx500M -jar $DACAPO_PATH/dacapo-2006-10-MR2.jar antlr
119-
#build/linux-x86_64-normal-server-$DEBUG_LEVEL/jdk/bin/java -XX:+UseThirdPartyHeap -server -XX:MetaspaceSize=100M -Xms500M -Xmx500M -jar $DACAPO_PATH/dacapo-2006-10-MR2.jar bloat - does not work for stock build
120-
build/linux-x86_64-normal-server-$DEBUG_LEVEL/jdk/bin/java -XX:+UseThirdPartyHeap -server -XX:MetaspaceSize=100M -Xms500M -Xmx500M -jar $DACAPO_PATH/dacapo-2006-10-MR2.jar fop
121-
#build/linux-x86_64-normal-server-$DEBUG_LEVEL/jdk/bin/java -XX:+UseThirdPartyHeap -server -XX:MetaspaceSize=100M -Xms500M -Xmx500M -jar $DACAPO_PATH/dacapo-2006-10-MR2.jar jython - does not work for stock build
122-
build/linux-x86_64-normal-server-$DEBUG_LEVEL/jdk/bin/java -XX:+UseThirdPartyHeap -server -XX:MetaspaceSize=100M -Xms500M -Xmx500M -jar $DACAPO_PATH/dacapo-2006-10-MR2.jar luindex
123-
# build/linux-x86_64-normal-server-$DEBUG_LEVEL/jdk/bin/java -XX:+UseThirdPartyHeap -server -XX:MetaspaceSize=100M -Xms500M -Xmx500M -jar $DACAPO_PATH/dacapo-2006-10-MR2.jar lusearch
124-
#- validation failed
125-
build/linux-x86_64-normal-server-$DEBUG_LEVEL/jdk/bin/java -XX:+UseThirdPartyHeap -server -XX:MetaspaceSize=100M -Xms500M -Xmx500M -jar $DACAPO_PATH/dacapo-2006-10-MR2.jar pmd
126-
#build/linux-x86_64-normal-server-$DEBUG_LEVEL/jdk/bin/java -XX:+UseThirdPartyHeap -server -XX:MetaspaceSize=100M -Xms500M -Xmx500M -jar $DACAPO_PATH/dacapo-2006-10-MR2.jar xalan - mmtk-core gets stuck in slowdebug build
127-
128-
# These benchmarks take 40s+ for slowdebug build, we may consider removing them from the CI
129-
build/linux-x86_64-normal-server-$DEBUG_LEVEL/jdk/bin/java -XX:+UseThirdPartyHeap -server -XX:MetaspaceSize=100M -Xms500M -Xmx500M -jar $DACAPO_PATH/dacapo-2006-10-MR2.jar hsqldb
130-
build/linux-x86_64-normal-server-$DEBUG_LEVEL/jdk/bin/java -XX:+UseThirdPartyHeap -server -XX:MetaspaceSize=100M -Xms500M -Xmx500M -jar $DACAPO_PATH/dacapo-2006-10-MR2.jar eclipse
131-
132113
# --- PageProtect ---
133114
# Make sure this runs last in our tests unless we want to set it back to the default limit.
134115
sudo sysctl -w vm.max_map_count=655300

.github/scripts/ci-test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ cd $cur
1212
cd $cur
1313
./ci-test-global-alloc-bit.sh
1414
cd $cur
15-
./ci-test-header-mark-bit.sh
15+
./ci-test-malloc-mark-sweep.sh

.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ jobs:
2222
./.github/scripts/ci-test-only-normal.sh
2323
- name: DaCapo Tests for Global Allocation Bit
2424
run: ./.github/scripts/ci-test-global-alloc-bit.sh
25+
- name: DaCapo Tests for malloc mark sweep
26+
run: ./.github/scripts/ci-test-malloc-mark-sweep.sh
2527

2628
# Style check
2729
- name: Style checks

mmtk/Cargo.lock

Lines changed: 3 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

mmtk/Cargo.toml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ once_cell = "1.10.0"
2929
# - change branch
3030
# - change repo name
3131
# But other changes including adding/removing whitespaces in commented lines may break the CI.
32-
mmtk = { git = "https://github.com/mmtk/mmtk-core.git", rev = "c5d62c4354fe091b7bc4d3bc39d570b7986b93de" }
32+
mmtk = { git = "https://github.com/mmtk/mmtk-core.git", rev = "f82848847a6392537fec6b914d7ad95fbf28b0a2" }
3333
# Uncomment the following to build locally
3434
# mmtk = { path = "../repos/mmtk-core" }
3535

@@ -48,14 +48,17 @@ global_alloc_bit = ["mmtk/global_alloc_bit"]
4848
# This compile time constant places the mark bit in the header of the object instead of on the side.
4949
mark_bit_in_header = []
5050

51+
# Use malloc mark sweep - we should only run marksweep with this feature turned on.
52+
malloc_mark_sweep = ["mmtk/malloc_mark_sweep"]
53+
5154
# We can select plan at runtime. So no need to use any of these features.
5255
# However, if any of these is provided during build-time, we will ignore any runtime flag and
5356
# always run this plan. Performance-wise there is no difference. The main reason for these features
5457
# is to temporarily allow running performance tests without changing performance scripts.
5558
nogc = []
5659
semispace = []
5760
gencopy = []
58-
marksweep = []
61+
marksweep = ["mmtk/malloc_mark_sweep"]
5962
pageprotect = []
6063
immix = []
6164

openjdk/CompileThirdPartyHeap.gmk

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,14 @@ ifeq ($(call check-jvm-feature, jfr), true)
4646
endif
4747
endif
4848

49+
ifeq ($(MMTK_MALLOC_MARK_SWEEP), 1)
50+
ifndef GC_FEATURES
51+
GC_FEATURES=--features malloc_mark_sweep
52+
else
53+
GC_FEATURES:=$(strip $(GC_FEATURES))",malloc_mark_sweep"
54+
endif
55+
endif
56+
4957
LIB_MMTK := $(JVM_LIB_OUTPUTDIR)/libmmtk_openjdk.so
5058

5159
ifeq ($(DEBUG_LEVEL), release)

0 commit comments

Comments
 (0)