-
Notifications
You must be signed in to change notification settings - Fork 69
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
Cyclic mark states #391
Comments
1 bit is |
See: #994 |
We should look further into this. MMTk panics if we try use header mark bit for Immix. [2024-01-15T04:42:30Z INFO mmtk::memory_manager] Initialized MMTk with Immix (FixedHeapSize(20971520))
===== DaCapo antlr starting =====
Running antlr on grammar antlr/cpp/calc.g
ANTLR Parser Generator Version 2.7.2 1989-2003 jGuru.com
Running antlr on grammar antlr/cpp/column.g
ANTLR Parser Generator Version 2.7.2 1989-2003 jGuru.com
Running antlr on grammar antlr/cpp/data.g
ANTLR Parser Generator Version 2.7.2 1989-2003 jGuru.com
Running antlr on grammar antlr/cpp/expr.g
ANTLR Parser Generator Version 2.7.2 1989-2003 jGuru.com
Running antlr on grammar antlr/cpp/html.g
ANTLR Parser Generator Version 2.7.2 1989-2003 jGuru.com
[2024-01-15T04:42:31Z INFO mmtk::util::heap::gc_trigger] [POLL] immix: Triggering collection (5123/5120 pages)
thread '<unnamed>' panicked at 'not implemented: cyclic mark bits is not supported at the moment', /home/runner/.cargo/git/checkouts/mmtk-core-3306bdeb8eb4322b/79fb0bb/src/policy/immix/immixspace.rs:370:17
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
fatal runtime error: failed to initiate panic, error 5 |
In Java MMTk, immix space and mark sweep space use cyclic mark state. It uses the remaining GC bits (3 or 4 bits) for the mark state, and does not require metadata initialization in post alloc. Other policies uses 1 bit mark state. A write for the mark bit is needed to initialize the object metadata in post alloc. |
Looks like at the moment, we use
VMLocalMarkBitSpec
to define per-object mark metadata, and it only allows one bit of metadata for each object. This prevents from the implementation of cyclic mark bits.Normally the cyclic mark state will take up more than one bits in the header or on the side, act as a N-bit integer
IntN
. At the start of each GC the mark state is increased by one, and all existing objects in the heap will automatically become "unmarked" states. So the GC does not need to zero all the mark bits at the start of each GC. When the mark state overflows the max value ofIntN
, it will cyclic back to the minimum valid value ofIntN
(usually 0 or 1).The text was updated successfully, but these errors were encountered: