RFR: 8255782: Turn UseTLAB and ResizeTLAB from product_pd to product, defaulting to "true"
Thomas Stuefe
stuefe at openjdk.java.net
Tue Nov 3 08:37:56 UTC 2020
On Mon, 2 Nov 2020 19:28:29 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
> When doing Zero VM performance investigations, I realized that `UseTLAB` is disabled there by default.
>
> That is effectively because `UseTLAB` is currently `product_pd` (defined in `gc_globals.hpp`), and it is enabled for every platform with C1 and C2 ports (in their respective `c1/c2_globals.hpp`). `compiler_globals.hpp` has a block that defines `UseTLAB` to `false` when no C1/C2/JVMCI is present.
>
> Not only this is awkward -- GC flag is managed by Compiler globals! -- it makes Zero awkward to opt-in to `UseTLAB` in `*_zero_globals.hpp`, because `compiler_globals.hpp` already defines it. I think we can make this all better by turning TLAB flags from `product_pd` to `product`, and defaulting them to `true`. This matches what every current Server/Minimal VM config has, and would implicitly enable `UseTLAB` and `ResizeTLAB` for Zero, as well as for builds with `--with-jvm-features=-compiler1,-compiler-2,-jvmci` (in case anyone actually builds it, that is only with template interpreter).
>
> On the downside, this shuts the door for new platform ports to disable TLAB flags by default to ease porting. But I believe the same can be achieved by turning these flags off in `arguments.cpp` under the special platform defines, while TLAB enablement work is in progress.
>
> Additional testing:
> - [x] Linux x86_64 Zero ad-hoc runs
> - [x] Linux x86_64 `--with-jvm-features=-compiler1,-compiler-2,-jvmci,*` builds
I think this is fine. New platforms could also just use NOT_platform ONLY_platform in gc_globals.hpp, which would be better grep-able.
-------------
Marked as reviewed by stuefe (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/1019
More information about the hotspot-dev
mailing list