Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8266813

Shenandoah: Use shorter instruction sequence for checking if marking in progress

XMLWordPrintable

    • gc
    • b22
    • aarch64

        In ShenandoahBarrierSetAssembler::generate_c1_pre_barrier_runtime_stub(), we can use shorter instruction sequence for checking if marking in progress:

            // Is marking still active?
            Address gc_state(thread, in_bytes(ShenandoahThreadLocalData::gc_state_offset()));
            __ ldrb(tmp, gc_state);
        - __ mov(rscratch2, ShenandoahHeap::MARKING);
        - __ tst(tmp, rscratch2);
        - __ br(Assembler::EQ, done);
        + __ tbz(tmp, ShenandoahHeap::MARKING_BITPOS, done);
          
            // Can we store original value in the thread's buffer?
            __ ldr(tmp, queue_index);
            __ cbz(tmp, runtime);

              zgu Zhengyu Gu
              zgu Zhengyu Gu
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: