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

Make Nashorn Timing class both threadsafe and efficient

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b80
    • CPU:
      generic
    • OS:
      generic

      Backports

        Description

        Timing.java in Nashorn currently uses a LinkedHashMap<String, Long> to record compilation timings. This is grossly inefficient (not to mention not being thread safe). The solution is to switch to using a ConcurrentHashMap<String, LongAdder> instead; with a separate LinkedBlockingQueue<String> to preserve ordering of stats.

          Attachments

            Issue Links

              Activity

                People

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

                  Dates

                  Created:
                  Updated:
                  Resolved: