Skip to content

Conversation

@jaokim
Copy link
Contributor

@jaokim jaokim commented Aug 15, 2024

When committing JFR events with string data longer than 128 characters, the string isn't added to the JFR string pool. In scenarios with many events containing large string values, this can lead to very large JFR recordings. This is mostly the case for custom events containing f.i. SQL strings or other data. In the case where the string data consist of mostly duplicate data, adding them to the string pool has been shown to reduce the recording size by a factor of 10.

This change will add all longer strings (>128 characters) to the string pool. Strings of length 16-128 are still added using the same pre-cache methodology as before. The raised StringPool.MAX_LIMIT is used by jdk.jfr.internal.event.EventWriter::putString to determine which strings to add to the pool.

Testing

  • tier1-tier3
  • jdk_jfr
  • Internal testing with high load, using custom JFR events containing long strings have been performed

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-8338389: [JFR] Long strings should be added to the string pool (Bug - P3)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 20596

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

Using diff file

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

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Aug 15, 2024

👋 Welcome back jnordstrom! 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 Aug 15, 2024

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

8338389: [JFR] Long strings should be added to the string pool

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

  • fead3cf: 8338745: Intrinsify Continuation.pin() and Continuation.unpin()
  • a5e2800: 8338834: Remove unused import declarations in java.compiler
  • 9cbf685: 8337658: ZGC: Move soft reference handling out of the driver loop function
  • 8e0d019: 8338630: Test java/nio/channels/DatagramChannel/SendReceiveMaxSize.java timeout
  • e06652a: 8338810: PPC, s390x: LightweightSynchronizer::exit asserts, missing lock
  • ea33709: 8328880: Events::log_exception should limit the size of the logging message
  • c89a1c3: 8338696: (fs) BasicFileAttributes.creationTime() falls back to epoch if birth time is unavailable (Linux)
  • 813546f: 8338856: [BACKOUT] JDK-8337828: CDS: Trim down minimum GC region alignment
  • 0b5c887: 8338380: Update TLSCommon/interop/AbstractServer to specify an interface to listen for connections
  • 6041c93: 8335664: Parsing jsr broken: assert(bci>= 0 && bci < c->method()->code_size()) failed: index out of bounds
  • ... and 79 more: https://git.openjdk.org/jdk/compare/fbe4f05636c8f692bd40bbe11fb5bb8b77b77042...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 (@mgronlun) 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
Copy link

openjdk bot commented Aug 15, 2024

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

  • hotspot-jfr

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 hotspot-jfr hotspot-jfr-dev@openjdk.org label Aug 15, 2024
@openjdk openjdk bot added the rfr Pull request is ready for review label Aug 15, 2024
@mlbridge
Copy link

mlbridge bot commented Aug 15, 2024

Webrevs

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Aug 22, 2024
@openjdk openjdk bot removed the ready Pull request is ready to be integrated label Aug 22, 2024
@jaokim
Copy link
Contributor Author

jaokim commented Aug 23, 2024

I've fixed the nits for the test, thanks @turbanoff and @mgronlun!

This now needs a re-review. Thanks!

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Aug 23, 2024
@jaokim
Copy link
Contributor Author

jaokim commented Aug 23, 2024

Thank you @mgronlun!
Could I also request a sponsor for this? Thanks!

/integrate

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label Aug 23, 2024
@openjdk
Copy link

openjdk bot commented Aug 23, 2024

@jaokim
Your change (at version 190704f) is now ready to be sponsored by a Committer.

@mgronlun
Copy link

/sponsor

@openjdk
Copy link

openjdk bot commented Aug 27, 2024

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

  • 2edf574: 8338814: [PPC64] Unify interface of cmpxchg for different types
  • aefdbdc: 8338727: RISC-V: Avoid synthetic data dependency in nmethod barrier on Ztso
  • b704bfa: 8298920: Improve microbenchmark build times
  • b8e8e96: 8338668: Test javax/swing/JFileChooser/8080628/bug8080628.java doesn't test for GTK L&F
  • cd9e241: 8336289: Obliterate most references to _snprintf in the Windows JDK
  • 78f53ef: 8338938: The result of the combine method of SettingsControl is not used
  • 16df090: 8338947: Deprecate the UseLinuxPosixThreadCPUClocks flag and remove it in a future release
  • a827ff0: 8335577: runtime/cds/appcds/TestParallelGCWithCDS.java still fails with JNI error
  • 5ecbecf: 8338936: StringConcatFactory optimize the construction of MethodType and MethodTypeDesc
  • 0c744ea: 8338928: Update SwingSet2 "About" image to reference openjdk.org
  • ... and 104 more: https://git.openjdk.org/jdk/compare/fbe4f05636c8f692bd40bbe11fb5bb8b77b77042...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Aug 27, 2024
@openjdk openjdk bot closed this Aug 27, 2024
@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 Aug 27, 2024
@openjdk
Copy link

openjdk bot commented Aug 27, 2024

@mgronlun @jaokim Pushed as commit d5c6158.

💡 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

hotspot-jfr hotspot-jfr-dev@openjdk.org integrated Pull request has been integrated

Development

Successfully merging this pull request may close these issues.

3 participants