On Thu, 17 Nov 2022 11:16:52 GMT, Richard Reingruber <rr...@openjdk.org> wrote:

>> The compiler should be able to do that already. We devirtualize calls into 
>> oop closures, and the closure is stack allocated. So the compiler should be 
>> able to do that if it finds that it is a good idea. I'd prefer to leave that 
>> to the compiler.
>
> `CompressOopsOopClosure::do_oop()` and `FrameOopIterator::oops_do()` are 
> defined in different compilation units. So calls to `do_oop()` cannot be 
> devirtualized or am I missing something?
>  Mistaken or not, I'm ok with this version.

Sorry, my bad. You are right - it can't devirtualize. Anyway, I'd like to keep 
it the way it is as I don't think it's worth optimizing this.

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

PR: https://git.openjdk.org/jdk/pull/11111

Reply via email to