RFR: 8302873: ZGC: dump barrier data in C2 Mach nodes

Tobias Hartmann thartmann at openjdk.org
Tue Feb 21 10:45:28 UTC 2023


On Mon, 20 Feb 2023 13:44:35 GMT, Roberto Castañeda Lozano <rcastanedalo at openjdk.org> wrote:

> This changeset adds (debug-only) support for printing ZGC barrier data in a human-readable form as part of the C2 Mach node dumps. This is useful for debugging, IGV visualization (e.g. to create [barrier-specific filters](https://user-images.githubusercontent.com/8792647/216639224-aa288dd8-72cc-43a5-a445-a93d65004dac.png)), and for matching nodes in IR test framework checks (e.g. to write [barrier optimization tests](https://github.com/openjdk/zgc/blob/zgc_generational/test/hotspot/jtreg/compiler/gcbarriers/TestZGCBarrierElision.java)).
> 
> #### Testing
> 
> - tier1 (x64 and aaarch64; linux, windows, and macosx; release and debug mode)
> - tested manually that the expected barrier information is dumped when using ZGC
> - tested manually that the dumps remain unchanged when using another GC

Looks good to me.

src/hotspot/share/gc/shared/c2/barrierSetC2.hpp line 309:

> 307: #ifndef PRODUCT
> 308:   virtual void dump_barrier_data(const MachNode* mach, outputStream* st) const {
> 309:     st->print("%x", mach->barrier_data());

Just wondering, do we ever have barrier data without ZGC?

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

Marked as reviewed by thartmann (Reviewer).

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


More information about the hotspot-gc-dev mailing list