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

SA PointerFinder code can do a better job of leveraging existing code to determine if an address is in the TLAB

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 23
    • 23
    • hotspot
    • b09

      In PointerFinder we have the following code to determine if a pointer is in a TLAB:

              if (VM.getVM().getUseTLAB()) {
                // Try to find thread containing it
                for (int i = 0; i < threads.getNumberOfThreads(); i++) {
                  JavaThread t = threads.getJavaThreadAt(i);
                  ThreadLocalAllocBuffer tlab = t.tlab();
                  if (tlab.contains(a)) {
                    loc.inTLAB = true;
                    loc.tlabThread = t;
                    loc.tlab = tlab;
                    break;
                  }
                }

      However, it is nested in a block of code that is only executed for the SerialGC. It should work for all GCs, and moving it outside of the SerialGC block should accomplish that.

            cjplummer Chris Plummer
            cjplummer Chris Plummer
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: