RFR: 8369685: RISC-V: refactor code related to RVFeatureValue::enabled [v4]

Fei Yang fyang at openjdk.org
Fri Oct 17 03:03:04 UTC 2025


On Thu, 16 Oct 2025 16:13:37 GMT, Hamlin Li <mli at openjdk.org> wrote:

>> Thank you.
>> Now value() behave the same regardless of implementation.
>
> Thanks for reviewing!

Hmm ... But I find the only use of `value` in `VM_Version::setup_cpu_available_features()` is for `log_debug`:

147       log_debug(os, cpu)("Enabled RV64 feature "%s" (%ld)",
148              _feature_list[i]->pretty(),
149              _feature_list[i]->value());

Can we simply move this to other methods like `enable_feature()` or `disable_feature()` in the subclasses? These are the places where we do the real enable / disable for them. If that make sense, then we would be able to make `value()` a method only for non-extensions. What do you think?

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/27771#discussion_r2438107157


More information about the hotspot-dev mailing list