mmtk / mmtk-openjdk

OpenJDK binding for MMTk
Other
31 stars 33 forks source link

Fix ignored env var options #244

Closed wks closed 1 year ago

wks commented 1 year ago

This PR lets MMTk-side Options read environment variables for options after OpenJDK-side options are applied. By doing this, environment variables like MMTK_THREADS are no longer ignored.

Fixes: https://github.com/mmtk/mmtk-openjdk/issues/242

This PR makes use of the change introduced in https://github.com/mmtk/mmtk-core/pull/955

wks commented 1 year ago

I figured out that we can use FLAG_IS_DEFAULT(ParallelGCThreads) to detect if the user explicitly set the ParallelGCThreads option. I have adjusted this PR so that command line options (-XX:ParallelGCThreads=xxxxx) take priority over environment variables (MMTK_THREADS=yyyyy).