RFR: 8257460: Further CompilerOracle cleanup

Claes Redestad redestad at openjdk.java.net
Mon Nov 30 23:41:57 UTC 2020


On Mon, 30 Nov 2020 22:37:32 GMT, Nils Eliasson <neliasso at openjdk.org> wrote:

> I got some additional feedback on 8256508: "Improve CompileCommand flag" from Claes.
> 
> 1. The _type field in TypedMethodMatcher is not used any more. It is derived from the option.
> 
> 2. The verify_type argument is only used from whitebox API and the check should be pushed out to that code. The check is needed because the option is passed from java as a String and we need to verify that the value type matches the option type.
>  
> 3. The type parameter to TypedMethodMatcher::match isn't used.
>  
> 4. Some code only used for asserts was moved into assert

Thanks for doing this cleanup!

src/hotspot/share/compiler/compilerOracle.hpp line 158:

> 156:   static bool option_matches_type(enum CompileCommand option, T& value);
> 157: 
> 158:     // Reads from string instead of file

indentation off

src/hotspot/share/compiler/compilerOracle.cpp line 309:

> 307: bool CompilerOracle::has_option_value(const methodHandle& method, enum CompileCommand option, T& value) {
> 308:   enum OptionType type = option2type(option);
> 309:   if (type == OptionType::Unknown) {

Could this be an assertion done inside option_matches_type?

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

Marked as reviewed by redestad (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/1528


More information about the hotspot-compiler-dev mailing list