Skip to content

Open XL header includes and vm flag fixup - #19910

Merged
r30shah merged 1 commit into
eclipse-openj9:masterfrom
Deigue:openxl-headers-flags
Oct 2, 2024
Merged

Open XL header includes and vm flag fixup#19910
r30shah merged 1 commit into
eclipse-openj9:masterfrom
Deigue:openxl-headers-flags

Conversation

@Deigue

@Deigue Deigue commented Jul 23, 2024

Copy link
Copy Markdown
Contributor

runtime/tests/jsig/main.c : dlfcn.h needs to be defined before defines for dllfree()/dllload() due to conflicting type definitions decomp003.c/decomp005.c : strcasecmp() implict function declaration needs strings.h j9vmemTest.c : -Wimplicit-int , missing type specifier that defaults to "int"
jvminit.c : atoe_enableFileTagging() implicit function declaration requires atoe.h
runtime/vm/CMakeLists.txt : Added appropriate conditionals to apply correct flags for Open XL suggested by compiler team. Hooks are not implemented for Open XL.

@r30shah r30shah left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just have one question I have asked, changes LGTM. Will launch test internally with this to make sure we do not run into any issue before continuing to merge.

Comment thread runtime/vm/CMakeLists.txt Outdated
if(OMR_TOOLCONFIG STREQUAL "openxl")
# Hooks are not implemented in Open XL. The default debug compiles in Open XL will be NOHOOK
# equivalent.
list(APPEND interp_flags_to_remove "-qdebug=nohook")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

runtime/vm/CMakeLists.txt : Added appropriate conditionals to apply correct flags for Open XL suggested by compiler team. Hooks are not implemented for Open XL.

Just to understand, with xlc it removes -O3, -g for compiler but with OpenXL it will not ?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why won't we want -O2 being added for interp_new_flags from the XLC case?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That might be an oversight, from the discussions I can find right now the intention was only to remove the "\"-Wc flags , but leave the same optimizations. So I will try with restoring the optimization levels and rebuilding.
If there is something I may not be remembering, at least it might remind me if it was intentional.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is what the intended outcome was, which I am currently testing out ...

    if(OMR_TOOLCONFIG STREQUAL "openxl")                                                                                                                                                                                   # Hooks are not implemented in Open XL. The default debug compiles in Open XL will be NOHOOK
        # equivalent.
        list(APPEND interp_flags_to_remove "-O3" "-g")
        list(APPEND interp_new_flags -O2)
    else()
        # TODO need to handle optimized debug info
        list(APPEND interp_flags_to_remove "-O3" "-g" "-qdebug=nohook")

        list(APPEND interp_new_flags
            -O2
            "\"-Wc,TBYDBG(-qdebug=MRABIG)\""
            "\"-Wc,TBYDBG(-qdebug=lincomm:ptranl:tfbagg)\""
            "\"-Wc,FEDBG(-qxflag=InlineDespiteVolatileInArgs)\""
        )    

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified these changes are working with openxl, still need to test xlc with jenkins, but I imagine it won't be a problem since that clause/conditional has remained unchanged altogether.

Comment thread runtime/vm/jvminit.c
#include <signal.h>
#endif

#include "atoe.h"

@r30shah r30shah Jul 25, 2024

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Deigue We may need this guarded by platform - See failures on other platform (/job_output.php?id=89250736)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@Deigue
Deigue force-pushed the openxl-headers-flags branch from 1378f79 to d4f28ce Compare July 31, 2024 16:23
@Deigue

Deigue commented Jul 31, 2024

Copy link
Copy Markdown
Contributor Author

I have removed runtime/tests/jsig/main.c reordering of headers as per @joransiu's advice. I discussed with Keith and have integrated this dependency where it should be (in the a2e wrappers, see dll.h change in eclipse-omr/omr#7383 , explicitly defined dlfcn.h as a pre-req for the functions it may override with its wrapper.

edit: Also rebased branch to eclipse/master

@Deigue
Deigue force-pushed the openxl-headers-flags branch from d4f28ce to ce865bd Compare July 31, 2024 17:30
@Deigue

Deigue commented Aug 8, 2024

Copy link
Copy Markdown
Contributor Author

jdk21 build passes , same commit based off ibm-openxl-headers (internal fork)

decomp003.c/decomp005.c : strcasecmp() implict function declaration needs strings.h
j9vmemTest.c : -Wimplicit-int , missing type specifier that defaults to "int"
jvminit.c : atoe_enableFileTagging() implicit function declaration requires atoe.h
runtime/vm/CMakeLists.txt : Added appropriate conditionals to apply correct flags for Open XL
suggested by compiler team. Hooks are not implemented for Open XL.

Signed-off-by: Gaurav Chaudhari <gaurav.chaudhari@ibm.com>
@Deigue
Deigue force-pushed the openxl-headers-flags branch from ce865bd to 43a112d Compare September 25, 2024 18:12
@Deigue

Deigue commented Sep 27, 2024

Copy link
Copy Markdown
Contributor Author

This one is ready @r30shah , and the dependent changes from eclipse-omr/omr#7383 fixing the headers has been merged.

EDIT: Sorry, will update this once I have verified Java 8 testing, need to verify that as well.

@Deigue

Deigue commented Oct 1, 2024

Copy link
Copy Markdown
Contributor Author

All passed with java 8 and java 21 builds.

@r30shah

r30shah commented Oct 1, 2024

Copy link
Copy Markdown
Contributor

jenkins test sanity zlinux jdk21

@r30shah
r30shah merged commit 6c1effb into eclipse-openj9:master Oct 2, 2024
@r30shah

r30shah commented Oct 2, 2024

Copy link
Copy Markdown
Contributor

Failing test in the launched test is same as #19618, not related to change in this PR. Merging this as internal tests have been confirmed by @Deigue and changes have been approved.


#include "jvmti_test.h"
#include <string.h>
#include <strings.h>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Deigue Given that this is causing failure - I wonder, we should guard this with J9ZOS same as how atoe.h was done (Assuming that only z/OS needs the function defined in strings.hwhich you may have bumped into with OpenXL work.

@Deigue Deigue Oct 2, 2024

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes that sounds like a good idea, I think the build must have failed on one of the platforms we didnt verify with.
Same for decomp005.c too I guess...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants