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

Use Unsafe.defineAnonymousClass for loading Nashorn script code

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3
    • 9
    • 9
    • core-libs
    • None
    • b83
    • generic
    • generic

    Backports

      Description

        We should use Unsafe.defineAnonymousClass to load Nashorn script code. We can cut down significantly on the number of class loaders (as we no longer need one per compilation job in order for the generated classes to be GC eligible). Anonymous classes are said to be more aggressively optimized (at least that's what Aleksey Shipilev told me). Class installation time also gets reduced to 80% of what it was before.

        Attachments

          Issue Links

            Activity

              People

                attila Attila Szegedi
                attila Attila Szegedi
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: