Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JDK-8312466: /bin/nm usage in AIX makes needs -X64 flag #15036

Closed
wants to merge 2 commits into from

Conversation

ansteiner
Copy link
Contributor

@ansteiner ansteiner commented Jul 26, 2023

On AIX the 'nm' needs -X64 option.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8312466: /bin/nm usage in AIX makes needs -X64 flag (Bug - P4)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/15036/head:pull/15036
$ git checkout pull/15036

Update a local copy of the PR:
$ git checkout pull/15036
$ git pull https://git.openjdk.org/jdk.git pull/15036/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 15036

View PR using the GUI difftool:
$ git pr show -t 15036

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/15036.diff

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Jul 26, 2023

👋 Welcome back ansteiner! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk openjdk bot added the rfr Pull request is ready for review label Jul 26, 2023
@openjdk
Copy link

openjdk bot commented Jul 26, 2023

@ansteiner The following label will be automatically applied to this pull request:

  • build

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the build build-dev@openjdk.org label Jul 26, 2023
@mlbridge
Copy link

mlbridge bot commented Jul 26, 2023

Webrevs

@MBaesken
Copy link
Member

Hi Andreas, thanks for addressing this.
Should it be 'needs' instead of 'need' in the comment you added ?

Btw did you look at the naming of the mangled symbols we check for (SetupOperatorNewDeleteCheck) , are those names really the same on AIX ?

@TheShermanTanker
Copy link
Contributor

I am fairly certain there is a better spot for this, but I cannot remember where at the moment. Is this for JvmMapfile.gmk where we dump the symbols of object files, or for something else?

@MBaesken
Copy link
Member

MBaesken commented Jul 26, 2023

I am fairly certain there is a better spot for this, but I cannot remember where at the moment. Is this for JvmMapfile.gmk where we dump the symbols of object files, or for something else?

It is needed for the SetupOperatorNewDeleteCheck some lines below this change (check for unwanted global new/delete operators in HS objects).

@TheShermanTanker
Copy link
Contributor

Right, thanks for jolting my memory

@ansteiner
Copy link
Contributor Author

Hi Andreas, thanks for addressing this. Should it be 'needs' instead of 'need' in the comment you added ?

Btw did you look at the naming of the mangled symbols we check for (SetupOperatorNewDeleteCheck) , are those names really the same on AIX ?
Yes, the naming is the same.

@openjdk
Copy link

openjdk bot commented Jul 26, 2023

@ansteiner This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8312466: /bin/nm usage in AIX makes needs -X64 flag

Reviewed-by: mbaesken, stuefe, jwaters

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 43 new commits pushed to the master branch:

  • 86821a7: 8312235: [JVMCI] ConstantPool should not force eager resolution
  • 7cbab1f: 8312218: Print additional debug information when hitting assert(in_hash)
  • 01e135c: 8312440: assert(cast != nullptr) failed: must have added a cast to pin the node
  • b7545a6: 8313164: src/java.desktop/windows/native/libawt/windows/awt_Robot.cpp GetRGBPixels adjust releasing of resources
  • 36d578c: 8311653: Modify -XshowSettings launcher behavior
  • a9d21c6: 8313081: MonitoringSupport_lock should be unconditionally initialized after 8304074
  • 4c2e54f: 8309088: security/infra/java/security/cert/CertPathValidator/certification/AmazonCA.java fails
  • 830413f: 8313087: DerValue::toString should output a hex view of the values in byte array
  • 7412193: 4800398: (ch spec) Clarify Channels.newChannel(InputStream) spec
  • e7726fb: 8313155: Problem list some JUnit-based tests in test/jdk/java/lang/invoke
  • ... and 33 more: https://git.openjdk.org/jdk/compare/0328886450a4978f1edbe06a59d2ab8f733d19a9...master

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@MBaesken, @tstuefe, @dholmes-ora, @TheShermanTanker) but any other Committer may sponsor as well.

➡️ To flag this PR as ready for integration with the above commit message, type /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Jul 26, 2023
Copy link
Member

@tstuefe tstuefe left a comment

Choose a reason for hiding this comment

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

+1

Copy link
Member

@dholmes-ora dholmes-ora left a comment

Choose a reason for hiding this comment

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

I don't think this is the right place to make this change. Shouldn't it be handled at configure time in ./autoconf/toolchain.m4 ? There is also a BUILD_NM variable that will not be fixed by the proposed change.

@RealCLanger
Copy link
Contributor

I agree, this should be handled in toochain.m4

@MBaesken
Copy link
Member

MBaesken commented Jul 26, 2023

I don't think this is the right place to make this change. Shouldn't it be handled at configure time in ./autoconf/toolchain.m4 ? There is also a BUILD_NM variable that will not be fixed by the proposed change.

Currently all needed flags for calling NM are set directly in the makefile, see

common/NativeCompilation.gmk

hotspot/lib/CompileJvm.gmk

hotspot/lib/JvmMapfile.gmk

so Andreas was just following the current practise. Regarding BUILD_NM , I cannot find usage of it in the makefiles, so probably nothing to fix at the moment.

@TheShermanTanker
Copy link
Contributor

Rather than toolchain.m4, this might actually be better suited for flags-other.m4, if there isn't already a flag for nm set there. This might be only in one location, but it might help future ports to have an nm flag that can be conveniently set, much like strip and rc already have their flags set there. That's my humble opinion, at least

@RealCLanger
Copy link
Contributor

No, I don't think flags-other.m4 is suited. If at all, it should be handled in toolchain.m4 if we understand the -X64 flag on AIX as unconditional for every nm call. Then we could also remove -X64 in JvmMapFile.gmk.

Also, maybe we should check if we can remove BUILD_NM and/or unify BUILD_NM and NM - as I see it now, BUILD_NM is not used anywhere. But I don't know all the history and maybe I'm overseeing something.

OTOH, this cleanup could be done in another PR. For now, the code as it is would be ok, too.

@MBaesken
Copy link
Member

OTOH, this cleanup could be done in another PR. For now, the code as it is would be ok, too.

I agree, let's do the flags / macro adjustment in another issue. Andreas, I can open one for you if you want.

@ansteiner
Copy link
Contributor Author

OTOH, this cleanup could be done in another PR. For now, the code as it is would be ok, too.

I agree, let's do the flags / macro adjustment in another issue. Andreas, I can open one for you if you want.

I would prefer to integrate this as is. To get the check working on AIX at all and do the BUILD_NM/NM cleanup in another PR.
@MBaesken: Feel free to open another issue for this cleanup.

@MBaesken
Copy link
Member

There might be room for improvement for the general handling of NM flags, I opened
https://bugs.openjdk.org/browse/JDK-8313244
8313244: NM flags handling in configure process

@ansteiner
Copy link
Contributor Author

/integrate

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label Jul 27, 2023
@openjdk
Copy link

openjdk bot commented Jul 27, 2023

@ansteiner
Your change (at version ac23329) is now ready to be sponsored by a Committer.

@RealCLanger
Copy link
Contributor

/sponsor

@openjdk
Copy link

openjdk bot commented Jul 27, 2023

Going to push as commit 44576a7.
Since your change was applied there have been 43 commits pushed to the master branch:

  • 86821a7: 8312235: [JVMCI] ConstantPool should not force eager resolution
  • 7cbab1f: 8312218: Print additional debug information when hitting assert(in_hash)
  • 01e135c: 8312440: assert(cast != nullptr) failed: must have added a cast to pin the node
  • b7545a6: 8313164: src/java.desktop/windows/native/libawt/windows/awt_Robot.cpp GetRGBPixels adjust releasing of resources
  • 36d578c: 8311653: Modify -XshowSettings launcher behavior
  • a9d21c6: 8313081: MonitoringSupport_lock should be unconditionally initialized after 8304074
  • 4c2e54f: 8309088: security/infra/java/security/cert/CertPathValidator/certification/AmazonCA.java fails
  • 830413f: 8313087: DerValue::toString should output a hex view of the values in byte array
  • 7412193: 4800398: (ch spec) Clarify Channels.newChannel(InputStream) spec
  • e7726fb: 8313155: Problem list some JUnit-based tests in test/jdk/java/lang/invoke
  • ... and 33 more: https://git.openjdk.org/jdk/compare/0328886450a4978f1edbe06a59d2ab8f733d19a9...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Jul 27, 2023
@openjdk openjdk bot closed this Jul 27, 2023
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review sponsor Pull request is ready to be sponsored labels Jul 27, 2023
@openjdk
Copy link

openjdk bot commented Jul 27, 2023

@RealCLanger @ansteiner Pushed as commit 44576a7.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

@ansteiner ansteiner deleted the JDK-8312466 branch July 27, 2023 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build build-dev@openjdk.org integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

6 participants