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

CompileCommand support for hidden class methods

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 18
    • Fix Version/s: 18
    • Component/s: hotspot
    • Subcomponent:
    • Resolved In Build:
      b10

      Description

      Current implementation of CompileCommand doesn't work for hidden class methods.
      For example, if you run with `java -Xcomp -Xbatch -XX:+PrintCompilation`
      The following hidden class methods were compiled:
      ```
         5317 1573 b 3 java.util.ResourceBundle$$Lambda$1/0x00000008010413c8::run (8 bytes)
         5318 1574 b 4 java.util.ResourceBundle$$Lambda$1/0x00000008010413c8::run (8 bytes)
         6735 1938 b 3 java.util.ResourceBundle$ResourceBundleProviderHelper$$Lambda$2/0x0000000801041e80::run (12 bytes)
         6736 1939 b 4 java.util.ResourceBundle$ResourceBundleProviderHelper$$Lambda$2/0x0000000801041e80::run (12 bytes)
         7060 2029 b 3 java.util.ResourceBundle$ResourceBundleProviderHelper$$Lambda$58/0x800000060::run (8 bytes)
         7061 2030 b 4 java.util.ResourceBundle$ResourceBundleProviderHelper$$Lambda$58/0x800000060::run (8 bytes)
         7688 2153 b 3 java.util.ResourceBundle$ResourceBundleProviderHelper$$Lambda$4/0x0000000801043218::run (16 bytes)
         7688 2154 b 4 java.util.ResourceBundle$ResourceBundleProviderHelper$$Lambda$4/0x0000000801043218::run (16 bytes)
      ```

      Then people may want to exclude the compilation of `java.util.ResourceBundle$$Lambda$1/0x00000008010413c8::run` like this
      ```
      -XX:CompileCommand=exclude,'java.util.ResourceBundle$$Lambda$1/0x00000008010413c8::run'
      ```

      But unfortunately, it doesn't work.
      ```
      CompileCommand: An error occurred during parsing
      Error: Method pattern uses '/' together with '::'
      Line: 'exclude,java.util.ResourceBundle$$Lambda$1/0x00000008010413c8::run'

      Usage: '-XX:CompileCommand=<option>,<method pattern>' - to set boolean option to true
      Usage: '-XX:CompileCommand=<option>,<method pattern>,<value>'
      Use: '-XX:CompileCommand=help' for more information and to list all option.
      ```

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              jiefu Jie Fu
              Reporter:
              jiefu Jie Fu
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: