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

8264001: JFR: Modernize implementation #3138

Closed
wants to merge 3 commits into from

Conversation

egahlin
Copy link
Member

@egahlin egahlin commented Mar 22, 2021

Hi,

Could I have a review of changes that updates the Java implementation of JFR with newer language constructs and library calls. I also removed unused imports, dead code and added @OverRide where approriate.

Testing: jdk/jdk/jfr


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

Reviewers

Download

To checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/3138/head:pull/3138
$ git checkout pull/3138

To update a local copy of the PR:
$ git checkout pull/3138
$ git pull https://git.openjdk.java.net/jdk pull/3138/head

@bridgekeeper
Copy link

bridgekeeper bot commented Mar 22, 2021

👋 Welcome back egahlin! 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 Mar 22, 2021

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

  • hotspot-jfr
  • net

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 net net-dev@openjdk.org hotspot-jfr hotspot-jfr-dev@openjdk.org labels Mar 22, 2021
@egahlin
Copy link
Member Author

egahlin commented Mar 22, 2021

/label remove net

@openjdk openjdk bot removed the net net-dev@openjdk.org label Mar 22, 2021
@openjdk
Copy link

openjdk bot commented Mar 22, 2021

@egahlin
The net label was successfully removed.

@egahlin egahlin changed the title 8264001: JFR: Modernize Java implementation 8264001: JFR: Modernize implementation Mar 23, 2021
@egahlin egahlin marked this pull request as ready for review March 23, 2021 20:03
@openjdk openjdk bot added the rfr Pull request is ready for review label Mar 23, 2021
@mlbridge
Copy link

mlbridge bot commented Mar 23, 2021

Webrevs

Copy link

@mgronlun mgronlun left a comment

Choose a reason for hiding this comment

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

Looks good.

@openjdk
Copy link

openjdk bot commented Mar 23, 2021

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

8264001: JFR: Modernize implementation

Reviewed-by: mgronlun

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

  • 1c9817b: 8261479: CDS runtime code should check exceptions
  • 087c8bf: 8264041: Incorrect comments for ParallelCompactData::summarize_dense_prefix
  • c087f3e: 8263995: Incorrect double-checked locking in Types.arraySuperType()
  • d7268fa: 8251942: PrintStream specification is not clear which flush method is automatically invoked
  • 8fa34e4: 8241619: (fs) Files.newByteChannel(path, Set.of(CREATE_NEW, READ)) does not throw a FileAlreadyExistsException when the file exists
  • e9321cd: 8263964: Redundant check in ObjectStartArray::object_starts_in_range
  • bd7a184: 8263442: Potential bug in jdk.internal.net.http.common.Utils.CONTEXT_RESTRICTED
  • 2335362: 8264032: Improve thread safety of Runtime.version()
  • 8c1ab38: 8263766: Confusing specification of JEditorPaneAccessibleHypertextSupport constructor
  • 5bc382f: 8263976: Remove block allocation from BasicHashtable
  • ... and 19 more: https://git.openjdk.java.net/jdk/compare/f62b1008ed136dcbe7ee17191cc9b77ca2b70334...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 Mar 23, 2021
@egahlin
Copy link
Member Author

egahlin commented Mar 24, 2021

/integrate

@openjdk openjdk bot closed this Mar 24, 2021
@openjdk openjdk bot added integrated Pull request has been integrated and removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Mar 24, 2021
@openjdk
Copy link

openjdk bot commented Mar 24, 2021

@egahlin Since your change was applied there have been 42 commits pushed to the master branch:

  • fad8484: 8263411: Convert jshell tool to use Stream.toList()
  • 06d46d6: 8264008: Incorrect metaspace statistics after JEP 387 when UseCompressedClassPointers is off
  • 45e1bab: 8264091: Use the blessed modifier order in java.logging
  • cb776ed: 8263981: java.awt.image.ComponentSampleModel equals/hashcode use numBands twice
  • da512bf: 8264050: Remove unused field VM_HeapWalkOperation::_collecting_heap_roots
  • 6e3a158: 8263352: assert(use == polladr) failed: the use should be a safepoint polling
  • 8d63bb6: 8260565: JFR: Fix copyright header in tests
  • 0b2aa1b: 8263978: Clarify why 0 argument is ignored in SecureRandom::setSeed
  • 15bcf6d: 8264055: backout JDK-8248904 in order to resubmit with additional attribution.
  • 2425462: 8263903: Use Cleaner instead of finalize to auto stop Timer thread
  • ... and 32 more: https://git.openjdk.java.net/jdk/compare/f62b1008ed136dcbe7ee17191cc9b77ca2b70334...master

Your commit was automatically rebased without conflicts.

Pushed as commit ae9af57.

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

@@ -51,7 +51,7 @@
public List<RecordedFrame> getFrames() {
Object[] array = getTyped("frames", Object[].class, null);
if (array == null) {
return Collections.EMPTY_LIST;
return new ArrayList<>(0);
Copy link
Member

Choose a reason for hiding this comment

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

Why ArrayList is used here and not List.of() as everywhere else?

Copy link
Member Author

Choose a reason for hiding this comment

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

I wanted it to be consistent.

Now the list is always modifiable, regardless of how it is constructed. One could argue for always returning an unmodifiable list, but it would require a spec change.

@egahlin egahlin deleted the modernize branch May 11, 2022 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotspot-jfr hotspot-jfr-dev@openjdk.org integrated Pull request has been integrated
3 participants