Skip to content

Conversation

@vnkozlov
Copy link
Contributor

@vnkozlov vnkozlov commented Jul 17, 2024

Citing David Holmes from bug report:
"We provided the ability to leave out certain VM services (JVMTI, GC's other than serial, ...) as part of the design of the MinimalVM to support Java SE Embedded, along with the Compact Profiles of JDK 8. This manifested in the source code as a set of INCLUDE_XXX ifdef guards. The build system later exposed these as individual --with-jvm-features=xxx,yyy support. However, it was never intended (and certainly not tested) that you could mix-and-match arbitrary subsets of these VM features at will. Consequently if you start trying to do this you will find things that need fixing."

I added INCLUDE_JVMTI guards in two places where it was missed: JVMCI and JFR. Affected code was added recently, in the past year. After that I was able to build VM on all supported platforms.

Note: building VM without JVMTI is not officially supported feature. We are not testing it and such failures (missing guards) are not unexpected.

A lot of tests failed with VM without JVMTI. All are expected failures. I listed failed tests in bug report.
I fixed (added requires vm.jvmti) only one which was part of JDK-8257967 changes which introduced JFR code without INCLUDE_JVMTI guards.

I ran 2 rounds of testing:

First, only tier1 with VM built without JVMTI to see if builds passed and which tests affected. I wrote comment in bug report which tests failed (all expected to fail without JVMTI).

Second round of testing with JVMTI in VM: tier1-4


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-8335921: Fix HotSpot VM build without JVMTI (Bug - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 20209

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

Using diff file

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

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Jul 17, 2024

👋 Welcome back kvn! 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
Copy link

openjdk bot commented Jul 17, 2024

@vnkozlov 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:

8335921: Fix HotSpot VM build without JVMTI

Reviewed-by: dholmes, shade

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 12 new commits pushed to the master branch:

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.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

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

openjdk bot commented Jul 17, 2024

@vnkozlov The following labels will be automatically applied to this pull request:

  • build
  • graal
  • hotspot
  • serviceability

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

@openjdk openjdk bot added graal graal-dev@openjdk.org serviceability serviceability-dev@openjdk.org build build-dev@openjdk.org hotspot hotspot-dev@openjdk.org labels Jul 17, 2024
@mlbridge
Copy link

mlbridge bot commented Jul 17, 2024

Webrevs

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.

This seems reasonable to me.

It highlights the problem we have with optional components in that you either have to work things so that semantically we have a do-nothing implementation of that component, or else you have to put the guards around every piece of code that would normally interact with it.

Thanks.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Jul 17, 2024
@vnkozlov
Copy link
Contributor Author

Thank you, David, for review.

Copy link
Member

@shipilev shipilev left a comment

Choose a reason for hiding this comment

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

Looks okay.

@shipilev
Copy link
Member

It highlights the problem we have with optional components in that you either have to work things so that semantically we have a do-nothing implementation of that component, or else you have to put the guards around every piece of code that would normally interact with it.

At some point a few years ago I explored a private testing pipeline that built VM with different combination of options. It worked, but there were so many issues that cropped up continuously that I scratched that off as the lost cause. I gave up even on building Minimal. Fixing the particular build configurations every once in a while -- like this PR -- seems to be a pragmatic compromise.

@vnkozlov
Copy link
Contributor Author

vnkozlov commented Jul 17, 2024

Thank you, Aleksey, for review.

@vnkozlov
Copy link
Contributor Author

/integrate

@openjdk
Copy link

openjdk bot commented Jul 17, 2024

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

  • 10186ff: 8336300: DateFormatSymbols#getInstanceRef returns non-cached instance
  • 7ec55df: 8336638: Parallel: Remove redundant mangle in PSScavenge::invoke
  • 6df7acb: 8299080: Wrong default value of snippet lang attribute
  • 8713628: 8334217: [AIX] Misleading error messages after JDK-8320005
  • 67979eb: 8334781: JFR crash: assert(((((JfrTraceIdBits::load(klass)) & ((JfrTraceIdEpoch::this_epoch_method_and_class_bits()))) != 0))) failed: invariant
  • d41d2a7: 8334502: gtest/GTestWrapper.java fails on armhf due to LogDecorations.iso8601_utctime_test
  • 59843f4: 8336040: Missing closing anchor element in Docs.gmk
  • 70f3e99: 8336463: Parallel: Add PSOldGen::expand_and_allocate
  • b9b0b85: 8336375: Crash on paste to JShell
  • 3babffd: 8334167: Test java/lang/instrument/NativeMethodPrefixApp.java timed out
  • ... and 10 more: https://git.openjdk.org/jdk/compare/69baa7d2850fafbd89978db12eec683c286eb921...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Jul 17, 2024

@vnkozlov Pushed as commit bcb5e69.

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

@vnkozlov vnkozlov deleted the 8335921 branch July 17, 2024 18:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build build-dev@openjdk.org graal graal-dev@openjdk.org hotspot hotspot-dev@openjdk.org integrated Pull request has been integrated serviceability serviceability-dev@openjdk.org

Development

Successfully merging this pull request may close these issues.

3 participants