-
Notifications
You must be signed in to change notification settings - Fork 79
Open
Labels
A-interfaceArea: Interface/APIArea: Interface/APIC-cleanupCategory: CleanupCategory: CleanupP-normalPriority: Normal.Priority: Normal.
Description
I am talking about cargo features, our runtime options, and const boolean
s in the code. They all change MMTk's behaviours. But they have obvious differences, and I think we should be careful about this.
The following is what I propose:
- Adding
const boolean
s is a trivial change, as they are not public to the users. We should feel free to add as long as they are useful to developers in the future. - We have to use cargo features if
- we need conditional compilation (e.g. optional base spaces, alloc bit).
- our users (bindings) want something out of box for every build (e.g. non-moving immix).
- We have to use runtime options if we want to configure something at runtime.
- If we can freely choose between cargo features and runtime options, we should prefer using runtime options as they do not require a rebuild.
With this proposal, we may consider making the following changes:
sanity
: feature -> runtime option. It just involves scheduling sanity work. There is a check in everyProcessEdgesWork
, we need to make sure this does not introduce overhead.perf_counter
: feature -> (removed).perf_counter
only works on linux, we can usecfg(target_os = "linux")
instead. We also have runtime options to set perf events, which should be sufficient.object_pining
: feature -> (removed). We can just include all the methods about object pinning.nogc_no_zeroing
: feature ->const boolean
.single_worker
: feature -> (removed). We can just use the optionsthreads
to set worker threads.immix_zero_on_release
: feature ->const boolean
. This is just an option for developing and debugging.
k-sareen
Metadata
Metadata
Assignees
Labels
A-interfaceArea: Interface/APIArea: Interface/APIC-cleanupCategory: CleanupCategory: CleanupP-normalPriority: Normal.Priority: Normal.