-
Enhancement
-
Resolution: Not an Issue
-
P4
-
13
CompilerOracle::has_option and has_option_value take a const methodHandle&, but is called using a Method* in several places, which cause implicit conversions that amount to a small overhead during compilation and profiling (~methodHandle in particular is not inlined, and potentially does a non-trivial amount of work)
In the normal case of when there is no CompilerOracle options set we can profitably avoid this overhead by first checking CompilerOracle::has_any_option(). This method should also be made inlineable.
Relatedly, in ciMethod::has_option* we take a costly transition from native to VM to check if a method has some option. First checking has_any_option seems safe to do without the transition overhead (no need for the methodHandle).
In the normal case of when there is no CompilerOracle options set we can profitably avoid this overhead by first checking CompilerOracle::has_any_option(). This method should also be made inlineable.
Relatedly, in ciMethod::has_option* we take a costly transition from native to VM to check if a method has some option. First checking has_any_option seems safe to do without the transition overhead (no need for the methodHandle).