G1: Hide ConcurrentMarkThread reference from outside ConcurrentMark

XMLWordPrintable

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

      ConcurrentMark::cm_thread() provides direct access to the concurrent mark thread; it is used in a few places in G1CollectedHeap.

      Since JDK-8367993 this thread (and the G1ConcurrentMark class) are not initlalized immediately any more, making this direct access problematic. Also, not all accesses are guarded with the `G1ConcurrentMark::is_fully_initialized()` assert.

      Instead of everyone checking is_fully_initialized() it is easier to read.

      Also there is some circular calls going on because of that (G1ConcurrentMark calls G1CollectedHeap which calls G1ConcurrentMark).

      The ConcurrentMarkThread is also an implementation detail of how concurrent mark works.

            Assignee:
            Thomas Schatzl
            Reporter:
            Thomas Schatzl
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: