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

Slow linking with devkit on Linux

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4
    • 13
    • 13
    • infrastructure
    • None
    • b06
    • linux

    Description

      While investigating performance with different linkers and linker configuration, we discovered that the devkit linker on Linux (both bfd and gold) were a lot slower than the native linker on Ubuntu. They are both the same version (2.30), so this was puzzling.

      The most obvious explanation for such a big difference would be missing compiler optimizations, but why would such a widely used product like binutils not have their compiler flags setup properly for optimization? But, looking at the build logs for binutils for Ubuntu: https://launchpad.net/ubuntu/+source/binutils/2.30-21ubuntu1~18.04/+build/15453713 they are setting CFLAGS="-O2" when running the build for binutils. I tried this for our devkit, and that created a kit with comparable linking performance to the Ubuntu linker.

      We should rebuild the current devkit for Linux with this setting to improve daily life for developers. While at it, I will also add --enable-threads which will make it possible for the adventurous to run the gold linker with threads from the devkit.

      Attachments

        Issue Links

          Activity

            People

              erikj Erik Joelsson
              erikj Erik Joelsson
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: