[lworld] RFR: 8263067: [lworld] Use tlab_allocate in MacroAssembler::store_inline_type_fields_to_buf

Yi Yang github.com+5010047+kelthuzadx at openjdk.java.net
Fri Mar 5 07:58:46 UTC 2021


On Fri, 5 Mar 2021 07:38:22 GMT, Tobias Hartmann <thartmann at openjdk.org> wrote:

>> TLAB allocation in MacroAssembler::store_inline_type_fields_to_buf looks duplicated with MacroAssembler::tlab_allocate, we might use existing MacroAssembler::tlab_allocate instead of duplicated ones. It will generate safer and faster code. (See details on JBS). All jtreg tests are passed with slowdebug mode.
>> 
>> Thanks!
>> Yang
>
> Hi Yang,
> 
> I had this on my To-Do list as well, thanks for fixing! I'm just wondering if we shouldn't also attempt an allocation in eden if `UseTLAB` is disabled? Similar to what code in `MacroAssembler::allocate_instance` does.
> 
> Thanks,
> Tobias

Hi Tobias,

I think it's reasonable. We can create such a buffered instance similar to `MacroAssembler::allocate_instance` or just using it. What do you think? If you think it's a feasible way, I can also try to tweak the implementation, keeping using the same buffer allocation mechanism on  aarch64.

Thanks!
Yang

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

PR: https://git.openjdk.java.net/valhalla/pull/362


More information about the valhalla-dev mailing list