Skip to content

Commit c1bc366

Browse files
authored
Add some documentation about using alloc bit (#111)
1 parent 37e4376 commit c1bc366

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,14 @@ building OpenJDK, we can change its location to be in the object's header:
9393
$ MARK_IN_HEADER=1 make CONF=linux-x86_64-normal-server-$DEBUG_LEVEL THIRD_PARTY_HEAP=$PWD/../../openjdk
9494
```
9595

96+
### Alloc bit
97+
To support the `global_alloc_bit` feature in mmtk-core, you can set the environment variable `GLOBAL_ALLOC_BIT=1` when
98+
building OpenJDK. This will set the feature for mmtk-core, as well as compiling the fastpath for the alloc bit.
99+
100+
```console
101+
$ GLOBAL_ALLOC_BIT=1 make CONF=linux-x86_64-normal-server-$DEBUG_LEVEL THIRD_PARTY_HEAP=$PWD/../../openjdk
102+
```
103+
96104
## Test
97105

98106
### Run HelloWorld (without MMTk)

mmtk/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ default = []
2929
mmtk_extreme_assertions = ["mmtk/extreme_assertions"]
3030
nogc_lock_free = ["mmtk/nogc_lock_free"]
3131
nogc_no_zeroing = ["mmtk/nogc_no_zeroing"]
32+
# Use the env var GLOBAL_ALLOC_BIT=1 when building OpenJDK so the fastpath for setting the alloc bit will be compiled in.
33+
# See README.
3234
global_alloc_bit = ["mmtk/global_alloc_bit"]
3335

3436
# This compile time constant places the mark bit in the header of the object instead of on the side.

0 commit comments

Comments
 (0)