jdk9 : forcing inlining in src/share/vm/oops/instanceKlass.inline.hpp for xlc

Baesken, Matthias matthias.baesken at sap.com
Wed Mar 9 17:01:07 UTC 2016

Hello ,
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


// 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.
#define INLINE __forceinline
#elif defined(TARGET_COMPILER_sparcWorks)
#define INLINE __attribute__((always_inline))
#define INLINE inline

(which is compiler dependent)
Should we do this for the AIX port too ?


describes the function attributes of xlc which can be used.
Diff to instanceKlass.inline.hpp  :

< #elif defined(TARGET_COMPILER_xlc)
< #define INLINE __attribute__((always_inline))

Regards, Matthias

More information about the hotspot-dev mailing list