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

Use ConcurrentHashMap to map ProtectionDomain to PermissionCollection

    Details

      Backports

        Description

        The current implementation uses a Collections.synchronizedMap. Replacing that with a ConcurrentHashMap (with additional code to remove weak keys) increases the throughput of the Policy.implies method by approximately 3x.
        1. PerfChart.pdf
          15 kB
          Sean Mullan
        2. Policy_Implies.java
          2 kB
          Sean Mullan

          Issue Links

            Activity

            Hide
            mullan Sean Mullan added a comment -
            jmh benchmark
            Show
            mullan Sean Mullan added a comment - jmh benchmark
            Hide
            mullan Sean Mullan added a comment - - edited
            jmh results on a 4 CPU system with 8 threads:

            JDK 1.8.0_20:

            Benchmark Mode Samples Score Score error Units
            b.j.s.Policy_Implies.implies thrpt 200 9075912.941 95499.388 ops/s

            JDK 9 with patch:

            Benchmark Mode Samples Score Score error Units
            b.j.s.Policy_Implies.implies thrpt 200 23138796.071 373972.133 ops/s

            (See attached PerfChart.pdf for latest results)
            Show
            mullan Sean Mullan added a comment - - edited jmh results on a 4 CPU system with 8 threads: JDK 1.8.0_20: Benchmark Mode Samples Score Score error Units b.j.s.Policy_Implies.implies thrpt 200 9075912.941 95499.388 ops/s JDK 9 with patch: Benchmark Mode Samples Score Score error Units b.j.s.Policy_Implies.implies thrpt 200 23138796.071 373972.133 ops/s (See attached PerfChart.pdf for latest results)
            Hide
            mullan Sean Mullan added a comment -
            Attached is a chart comparing the performance before and after the fix with various numbers of threads. The system under test was Intel® Core™ i5-2520M CPU @ 2.50GHz × 4 running Ubuntu 14.04 LTS
            Show
            mullan Sean Mullan added a comment - Attached is a chart comparing the performance before and after the fix with various numbers of threads. The system under test was Intel® Core™ i5-2520M CPU @ 2.50GHz × 4 running Ubuntu 14.04 LTS
            Hide
            hgupdate HG Updates added a comment -
            URL: http://hg.openjdk.java.net/jdk9/dev/jdk/rev/72fdb709f356
            User: mullan
            Date: 2015-05-21 12:57:08 +0000
            Show
            hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk9/dev/jdk/rev/72fdb709f356 User: mullan Date: 2015-05-21 12:57:08 +0000
            Hide
            hgupdate HG Updates added a comment -
            URL: http://hg.openjdk.java.net/jdk9/jdk9/jdk/rev/72fdb709f356
            User: lana
            Date: 2015-05-27 18:31:20 +0000
            Show
            hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk9/jdk9/jdk/rev/72fdb709f356 User: lana Date: 2015-05-27 18:31:20 +0000

              People

              • Assignee:
                mullan Sean Mullan
                Reporter:
                mullan Sean Mullan
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: