Skip to content

8361640: JFR: RandomAccessFile::readLine emits events for each character #26210

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

egahlin
Copy link
Member

@egahlin egahlin commented Jul 9, 2025

Could I have a review of the change that prevents RandomAccessFile::readLine from emitting an event per character? This leads to unnecessary overhead, both with or without JFR enabled.

Testing: tier1 + tier2 + jdk/jdk/jfr

Thanks
Erik


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-8361640: JFR: RandomAccessFile::readLine emits events for each character (Bug - P3)

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 26210

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

Using diff file

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

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Jul 9, 2025

👋 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 Jul 9, 2025

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@openjdk
Copy link

openjdk bot commented Jul 9, 2025

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

  • core-libs

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.

@egahlin
Copy link
Member Author

egahlin commented Jul 9, 2025

/label add hotspot-jfr

@openjdk
Copy link

openjdk bot commented Jul 9, 2025

@egahlin
The hotspot-jfr label was successfully added.

@egahlin egahlin marked this pull request as ready for review July 9, 2025 08:22
@openjdk openjdk bot added the rfr Pull request is ready for review label Jul 9, 2025
@mlbridge
Copy link

mlbridge bot commented Jul 9, 2025

Webrevs

@AlanBateman
Copy link
Contributor

Testing: tier1 + jdk/jdk/jfr

The tests for this area are in tier2 (not tier1).

@AlanBateman
Copy link
Contributor

I think we'll need to see if a test can be added as it's way too easy to refactor this code and re-introduce the issue.

@egahlin
Copy link
Member Author

egahlin commented Jul 9, 2025

I think we'll need to see if a test can be added as it's way too easy to refactor this code and re-introduce the issue.

I'm planning a follow-up PR that will check the top frame. Here's the draft:
#26211

That test will count the number of events also, so it can detect if the code is refactored.

@egahlin
Copy link
Member Author

egahlin commented Jul 9, 2025

Testing: tier1 + jdk/jdk/jfr

The tests for this area are in tier2 (not tier1).

I ran tier2. It was fine.

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

Successfully merging this pull request may close these issues.

2 participants