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

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • 23
    • Affects Version/s: 23
    • Component/s: 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.

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

              Created:
              Updated:
              Resolved: