JDK-8211213 : AIX build fails after 8196341: Add JFR events for parallel phases of G1
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 12
  • Priority: P2
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • Submitted: 2018-09-27
  • Updated: 2018-10-02
  • Resolved: 2018-10-02
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbd_majorResolved
Related Reports
Duplicate :  
Duplicate :  
Relates :  
Relates :  
Relates :  
Relates :  
Description
8196341: Add JFR events for parallel phases of G1  introduced new jfr events.
Unfortunately the change breaks the AIX build.  This seems to be an xlc compiler bug to me. The overloaded commit function is not resolved correctly,
The compiler seems to notice only the commit without arguments which is brought into the EventGCPhaseParallel  via using.

errors are like :
/openjdk/nb/rs6000_64/nightly/jdk/src/hotspot/share/gc/g1/g1CollectedHeap.cpp", line 3185.15: 1540-0215 (S) The wrong number of arguments has been specified for "JfrEvent::commit()"  

Comments
I closed it as duplicate because otherwise people might search for changes related to it needlessly.
02-10-2018

JDK-8211239 has been pushed, this fixes this bug as well.
02-10-2018

After JDK-8211239 has been pushed, the AIX build is fine again as well. So this bug can be closed, the fixed JFR generator addresses the issue reported in this bug.
02-10-2018

JDK-8211239 is pushed, please verify and deal with this bug as you see fit.
01-10-2018

Matthias, if you can confirm the AIX build is fine after any candidate fix from JDK-8211239, and close this as duplicate then?
28-09-2018

Something like this: http://cr.openjdk.java.net/~shade/8211213/webrev.01
27-09-2018

Yeah, maybe the better fix would be teaching JFR generator to make those overloaded commit methods?
27-09-2018

ok I see , in case of ! INCLUDE_JFR you just get These : class JfrEvent { public: JfrEvent() {} void set_starttime(const Ticks&) const {} void set_endtime(const Ticks&) const {} bool should_commit() const { return false; } static bool is_enabled() { return false; } void commit() {} }; and class EventGCPhaseParallel : public JfrEvent { public: EventGCPhaseParallel(EventStartTime ignore=TIMED) {} EventGCPhaseParallel( unsigned, unsigned, const char*) { } void set_gcId(unsigned) { } void set_gcWorkerId(unsigned) { } void set_name(const char*) { } }; with only one commit method without parameters. Seems the generator did not add the other commit methods to the ! INCLUDE_JFR - part when generating EventGCPhaseParallel .
27-09-2018

Yeah, but if you look at say ./build/linux-x86_64-zero-fastdebug/hotspot/variant-zero/gensrc/jfrfiles/jfrEventClasses.hpp, then there is INCLUDE_JFR ifdef: #ifndef JFRFILES_JFREVENTCLASSES_HPP #define JFRFILES_JFREVENTCLASSES_HPP ... #include "utilities/ticks.hpp" #if INCLUDE_JFR ; <--------- oops, this is disabled by build #include "jfr/recorder/service/jfrEvent.hpp" ... class Event ... I think this is why this fails the build, the definitions are not actually there during compilation.
27-09-2018

Even with jfr disabled in the m4 file , the jfr related classes are generated on AIX . For example, the hotspot/variant-server/gensrc/jfrfiles/jfrEventClasses.hpp is generated and includes class EventGCPhaseParallel . Additionally the using + the commit Methods are in the class . ���. using JfrEvent<EventGCPhaseParallel>::commit; // else commit() is hidden by overloaded versions in this class EventGCPhaseParallel( unsigned gcId, unsigned gcWorkerId, const char* name) : JfrEvent<EventGCPhaseParallel>(TIMED) { if (should_commit()) { set_gcId(gcId); set_gcWorkerId(gcWorkerId); set_name(name); } } void commit(unsigned gcId, unsigned gcWorkerId, const char* name) { if (should_commit()) { set_gcId(gcId); set_gcWorkerId(gcWorkerId); set_name(name); commit(); } }
27-09-2018

It seems JFR is disabled on AIX, see make/autoconf/hotspot.m4: # Enable JFR by default, except for Zero, linux-sparcv9 and on minimal. if ! HOTSPOT_CHECK_JVM_VARIANT(zero); then if test "x$OPENJDK_TARGET_OS" != xaix; then if test "x$OPENJDK_TARGET_OS" != xlinux || test "x$OPENJDK_TARGET_CPU" != xsparcv9; then NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jfr" fi fi fi ...which means it fails the same way Zero fails in JDK-8211228?
27-09-2018

Take a look at the fix for https://bugs.openjdk.java.net/browse/JDK-8200246 http://openjdk.5641.n7.nabble.com/8200246-AIX-build-fails-after-adjustments-of-src-hotspot-share-trace-traceEventClasses-xsl-tc331126.html It might be the same thing. Although the code is not generated through xsl any more.
27-09-2018