Move the method barrier_stubs_init from BarrierSetAssembler to BarrierSet

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Unresolved
    • Priority: P5
    • tbd
    • Affects Version/s: 23
    • Component/s: hotspot
    • None
    • gc

      The method `barrier_stubs_init`, currently in BarrierSetAssembler, would like to generate and store some stubs about barriers. It is not so good to place it in `BarrierSetAssembler` because the `BarrierSetAssembler` is just an assembler in order to produce machine code which is like the `MacroAssembler`. And the feature of `barrier_stubs_init` is much like `StubGenerator` which generate and store stubs. So I think it is better to place `barrier_stubs_init` in `BarrierSet`.

      A bit of history:
      The method `barrier_stubs_init` is firstly introduced at JDK-8166317 which only be used at SPARC & G1. And then the ZGC and Shenandoah also used it.
      But currently, they (SPARC & G1, ZGC, Shenandoah) have removed or refactored the related code and don't use `barrier_stubs_init`.
      The related issues:
      SPARC & G1 : SPARC was removed at JDK-8241787.
      ZGC: ZGC refactored the code at JDK-8230565.
      Shenandoah: Shenandoah also refactored the code at JDK-8255762.

            Assignee:
            Guoxiong Li
            Reporter:
            Guoxiong Li
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: