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

Avoid calculating primordial thread stack bounds on VM startup

XMLWordPrintable

    • b10
    • linux

        On linux, we scan /proc/self/maps to be able to tell if the current thread is the "primordial" one.

        However, when initializing the VM, most launchers spawn a new thread rather than initializing the VM on the primordial thread. If we can communicate this, or even better retrieve and communicate the tid of the primordial thread, we might just be able to avoid reading /proc/self/maps on startup.

        Experimentally this saves ~0.7ms on my machine, which is about 1.5% of the total of the startup on a minimal image.

              redestad Claes Redestad
              redestad Claes Redestad
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: