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

Cleanup definition/usage of INLINE/NOINLINE macros and add xlC support

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 9
    • 9
    • hotspot
    • None
    • b115

      CR 8075955: "Replace the macro based implementation of oop_oop_iterate with a template based solution" changed src/share/vm/oops/instanceKlass.inline.hpp and replaced macro based oop iteration by templates.

      For performance reason, the change (and a follow up change for Oracle Studio) introduced forcing of inlining for some places in src/share/vm/oops/instanceKlass.inline.hpp, see:

      http://hg.openjdk.java.net/jdk9/dev/hotspot/file/797e6aac6d53/src/share/vm/oops/instanceKlass.inline.hpp

      ....
      // The iteration over the oops in objects is a hot path in the GC code.
      // By force inlining the following functions, we get similar GC performance
      // as the previous macro based implementation.
      #ifdef TARGET_COMPILER_visCPP
      #define INLINE __forceinline
      #elif defined(TARGET_COMPILER_sparcWorks)
      #define INLINE __attribute__((always_inline))
      #else
      #define INLINE inline
      #endif
      ....

      We can do this on AIX as well, as xlC also supports the 'always_inline' compiler attribute. See:

      http://www.ibm.com/support/knowledgecenter/SSGH2K_12.1.0/com.ibm.xlc121.aix.doc/language_ref/function_attributes.html?lang=en

            simonis Volker Simonis
            simonis Volker Simonis
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: