RFR: 8252505: C1/C2 compiler support for blackholes [v11]

Vladimir Ivanov vladimir.x.ivanov at oracle.com
Wed Dec 2 17:16:26 UTC 2020



On 02.12.2020 16:10, Aleksey Shipilev wrote:
> On 12/2/20 1:18 PM, Vladimir Ivanov wrote:
>> I would assume that `-XX:CompileCommand=blackhole,method` marks the
>> method as a blackhole for the whole JVM instance (irrespective of what
>> JIT is used or . Why can't you perform the query from the ciMethod
>> itself? Or do you see controlling it on per-compilation basis valuable?
> 
> Well, actually I thought it should be like "inline", which consults 
> compiler directive sets.
> 
> But there is no compiler-specific setting for "blackhole", as 
> DirectiveSet::should_blackhole delegates fully to CompilerOracle. So 
> you're right, and we can indeed just do the global command, and ask 
> CompilerOracle straight in ciMethod. Did so in new commit.

Looks nice!

One more idea: what if you populate ciMethod::_intrinsic_id instead when 
you detect a blackhole method? There's already an example of marker 
pseudo-intrinsic (vmIntrinsics::_compiledLambdaForm) and you can just 
introduce a new one for blackhole methods.

Then you don't need `BlackholeCallGenerator` anymore and 
`BlackholeCallGenerator::generate()` can be migrated to 
`library_call.cpp` as yet another intrinsic.

Best regards,
Vladimir Ivanov


More information about the hotspot-dev mailing list