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

8276687: Remove support for JDK 1.4.1 PerfData shared memory files #10687

Closed

Conversation

iklam
Copy link
Member

@iklam iklam commented Oct 13, 2022

We have code in jdk.internal.jvmstat for supporting an ancient version (JDK 1.4.1). There's currently no test case for this code, so it's likely to be further bit-rotten in the future. Let's remove it now.

If anyone wants to connect to JDK 1.4.1, they can use tools from JDK 19 or earlier.


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-8276687: Remove support for JDK 1.4.1 PerfData shared memory files

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 10687

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

Using diff file

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

@bridgekeeper
Copy link

bridgekeeper bot commented Oct 13, 2022

👋 Welcome back iklam! 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 Oct 13, 2022
@openjdk
Copy link

openjdk bot commented Oct 13, 2022

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

  • serviceability

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 serviceability serviceability-dev@openjdk.org label Oct 13, 2022
@mlbridge
Copy link

mlbridge bot commented Oct 13, 2022

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.

Looks like a good cleanup. One suggestion/request below if you feel like it.

Thanks.

return Integer.parseInt(name.substring(first + 1, last));
}
} catch (NumberFormatException e) { }
}
throw new IllegalArgumentException("file name does not match pattern");
Copy link
Member

Choose a reason for hiding this comment

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

Pre-existing but it would be nice if this actually reported the file and the pattern.

Choose a reason for hiding this comment

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

Maybe "cannot convert 'filename' to VM id". (Or to pid.) We just parse it as an Integer now, so showing the problem filename would be nice. (Not sure if we would get this far trying a 1.4.1 attach, but if we did, it would help diagnose that.)

Copy link
Member Author

Choose a reason for hiding this comment

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

David and Kevin, thanks for the suggestions. I've update the error message. Does it look OK now?

@openjdk
Copy link

openjdk bot commented Oct 13, 2022

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

8276687: Remove support for JDK 1.4.1 PerfData shared memory files

Reviewed-by: dholmes, kevinw, redestad

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

  • fdb74ed: 8295301: Problem list TrayIcon tests that fail on Ubuntu 22.04
  • 21407de: 8295173: (tz) Update Timezone Data to 2022e
  • f5f8df1: 8295295: CDS ArchivedEnumTest fails with StaticProperty::JAVA_LOCALE_USE_OLD_ISO_CODES
  • 18dd9ee: 8295025: (bf) ByteBuffer "Access to binary data" section suggests putFloat is void
  • 4224d45: 8295232: "java.locale.useOldISOCodes" property is read lazily
  • 3b34387: 8288882: JFileChooser - empty (0 bytes) file is displayed as 1 KB
  • c7f6543: 8295223: JFR: At most one native periodic event thread at a time
  • 7e4868d: 8294847: Fix calculation of G1 effective scanned cards prediction
  • 2f60675: 8294997: Improve ECC math operations
  • 94caecb: 8294906: Memory leak in PKCS11 NSS TLS server
  • ... and 4 more: https://git.openjdk.org/jdk/compare/90fb9a085bbaa9d1928a1cec9f00098b80577721...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.

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

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Oct 13, 2022
@kevinjwalls
Copy link

Maybe the 3 classes in src/jdk.internal.jvmstat/share/classes/sun/jvmstat/perfdata/monitor/v1_0/ are redundant...?
We parse a version number in AbstractPerfDataBuffer.createPerfDataBuffer() and create e.g. sun.jvmstat.perfdata.monitor.v2_0.PerfDataBuffer
I don't have evidence of exactly where version 2 starts (I know it was in jdk5, but maybe it was 1.4.2), so I'm not saying the removal should be done now.
Anyway, looks good.

@iklam
Copy link
Member Author

iklam commented Oct 13, 2022

Maybe the 3 classes in src/jdk.internal.jvmstat/share/classes/sun/jvmstat/perfdata/monitor/v1_0/ are redundant...? We parse a version number in AbstractPerfDataBuffer.createPerfDataBuffer() and create e.g. sun.jvmstat.perfdata.monitor.v2_0.PerfDataBuffer I don't have evidence of exactly where version 2 starts (I know it was in jdk5, but maybe it was 1.4.2), so I'm not saying the removal should be done now. Anyway, looks good.

I have filed https://bugs.openjdk.org/browse/JDK-8295253 to remove the "kludge" code for supporting 1.4.1 in the monitor/v1_0/ code. Because of this kludge code, I suspect that v1_0 actually supports versions other than 1.4.1, so I am hesitant of removing the entire v1_0 directory. More investigation is needed.

cl4es
cl4es approved these changes Oct 13, 2022
Copy link
Member

@cl4es cl4es left a comment

Choose a reason for hiding this comment

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

Nice cleanup!

@kevinjwalls
Copy link

Yes, that's good. OK so there is evidence that v1_0 perfdata was at least used for some 1.4.2, so yes no rush to remove the v1_0 classes, thanks.

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.

Ok.

@iklam
Copy link
Member Author

iklam commented Oct 14, 2022

Thanks @kevinjwalls @cl4es @dholmes-ora for the review.
/integrate

@openjdk
Copy link

openjdk bot commented Oct 14, 2022

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

  • b30d922: 8292876: Do not include the deprecated userinfo component of the URI in HTTP/2 headers
  • 2b4830a: 8295017: Remove Windows specific workaround in JLI_Snprintf
  • fdb74ed: 8295301: Problem list TrayIcon tests that fail on Ubuntu 22.04
  • 21407de: 8295173: (tz) Update Timezone Data to 2022e
  • f5f8df1: 8295295: CDS ArchivedEnumTest fails with StaticProperty::JAVA_LOCALE_USE_OLD_ISO_CODES
  • 18dd9ee: 8295025: (bf) ByteBuffer "Access to binary data" section suggests putFloat is void
  • 4224d45: 8295232: "java.locale.useOldISOCodes" property is read lazily
  • 3b34387: 8288882: JFileChooser - empty (0 bytes) file is displayed as 1 KB
  • c7f6543: 8295223: JFR: At most one native periodic event thread at a time
  • 7e4868d: 8294847: Fix calculation of G1 effective scanned cards prediction
  • ... and 6 more: https://git.openjdk.org/jdk/compare/90fb9a085bbaa9d1928a1cec9f00098b80577721...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Oct 14, 2022

@iklam Pushed as commit 67046ae.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integrated Pull request has been integrated serviceability serviceability-dev@openjdk.org
4 participants