RFR (L): 8072008: Emit direct call instead of linkTo* for recursive indy/MH.invoke* calls
vladimir.x.ivanov at oracle.com
Thu Nov 19 16:04:20 UTC 2015
>> I'm slightly uncomfortable with making CallGenerator into a
>> state-ful type. Maybe:
>> -+ cg->set_override_symbolic_info(true); ++ cg =
>> To do this cleanly requires a virtual (re-constructor) with lots of
>> Perhaps it can be done dirtily also, as long as there is a note
>> saying "if these objects are ever cached, a fresh copy must be
>> created here", inside the dirty implementation of
>> (Or add virtual CallGenerator::fresh_copy, and keep the
>> side-effecting thing?)
> Oh, I haven't thought about caching CallGenerators. Having
> override_symbolic_info in CallGenerator doesn't play well with it.
> override_symbolic_info is entangled with JVMState passed into
> CallGenerator::generate(JVMState*). So, depending on the context
> symbolic info can be either valid or invalid.
> I haven't found a good way to fix it yet. I'll leave it as is for now,
> but will continue thinking about alternatives.
> Maybe a special check in CallGenerator::generate() to catch failed
> inlines through MH.linkTo/invokeBasic?
... and it looks pretty decent:
More information about the hotspot-compiler-dev