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

CTW: Lots of level 3 compiles are done at level 2 after JDK-8348570

XMLWordPrintable

    • b11

      Noticed this in manual CTW runs after JDK-8348570 that lots and lots of methods are compiled at level 2 instead of requested level 3:

      ```
      ...
      [97] javax.enterprise.deploy.shared.ActionType::getValue() WARNING compilation level = 2, but not 3
      [97] javax.enterprise.deploy.shared.ActionType::getOffset() WARNING compilation level = 2, but not 3
      [97] javax.enterprise.deploy.shared.ActionType::getEnumValueTable() WARNING compilation level = 2, but not 3
      [97] javax.enterprise.deploy.shared.ActionType::getStringTable() WARNING compilation level = 2, but not 3
      [97] javax.enterprise.deploy.shared.ActionType::getActionType(int) WARNING compilation level = 2, but not 3
      [97] javax.enterprise.deploy.shared.ActionType::toString() WARNING compilation level = 2, but not 3
      [99] javax.enterprise.deploy.shared.DConfigBeanVersionType
      [98] javax.enterprise.deploy.shared.CommandType::toString() WARNING compilation level = 2, but not 3
      [98] javax.enterprise.deploy.shared.CommandType::getOffset() WARNING compilation level = 2, but not 3
      ...
      ```

      I narrowed it down to level downgrade in compilation policy here:
       https://github.com/openjdk/jdk/blob/ed17c55ea34b3b6009dab11d64f21e0b7af3d701/src/hotspot/share/compiler/compilationPolicy.cpp#L677

      JDK-8348570 enters here, because we mark all methods as having profiles to extend the CTW scope. So now `is_method_profiled(max_method_h)` is `true` and downgrade happens. There is already check for `!Arguments::is_compiler_only()` there, so I think we better exclude CTW from this downgrade as well.

            shade Aleksey Shipilev
            shade Aleksey Shipilev
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: