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

8334234: NMT: Re-evaluate MallocMemory and VirtualMemory counter classes #20550

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

roberttoyonaga
Copy link
Contributor

@roberttoyonaga roberttoyonaga commented Aug 12, 2024

Summary

This PR splits up NMT memory counter classes into "live" and "flat" versions. Currently, the same classes are used and reused in both live (recording) and snapshotted (reporting) contexts. However, after counters have been shapshotted, they no longer need to be atomic or require things like peak updating. "Live" classes are now atomic and have methods needed for recording allocation/dealocation and updating peaks. "Flat" classes basically just hold data to later be reported, are not atomic, and only have methods for retrieving data.

I've also made all counters in LiveVirtualMemory update atomically, when previously only the peaks in VirtualMemory were updated atomically.

Testing

  • tier1
  • jdk/test/hotspot/jtreg/gtest/NMTGtests.java
  • jdk/test/jdk/jdk/jfr/event/runtime/TestNativeMemoryUsageEvents.java

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-8334234: NMT: Re-evaluate MallocMemory and VirtualMemory counter classes (Enhancement - P4)

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 20550

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

Using diff file

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

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Aug 12, 2024

👋 Welcome back roberttoyonaga! 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 12, 2024

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

@openjdk openjdk bot changed the title 8334234 8334234: NMT: Re-evaluate MallocMemory and VirtualMemory counter classes Aug 12, 2024
@openjdk
Copy link

openjdk bot commented Aug 12, 2024

@roberttoyonaga To determine the appropriate audience for reviewing this pull request, one or more labels corresponding to different subsystems will normally be applied automatically. However, no automatic labelling rule matches the changes in this pull request. In order to have an "RFR" email sent to the correct mailing list, you will need to add one or more applicable labels manually using the /label pull request command.

Applicable Labels
  • build
  • client
  • compiler
  • core-libs
  • graal
  • hotspot
  • hotspot-compiler
  • hotspot-gc
  • hotspot-jfr
  • hotspot-runtime
  • i18n
  • ide-support
  • javadoc
  • jdk
  • jmx
  • kulla
  • net
  • nio
  • security
  • serviceability
  • shenandoah

@roberttoyonaga
Copy link
Contributor Author

/label serviceability

@openjdk
Copy link

openjdk bot commented Aug 12, 2024

@roberttoyonaga
The serviceability label was successfully added.

@roberttoyonaga roberttoyonaga marked this pull request as ready for review August 12, 2024 16:52
@openjdk openjdk bot added the rfr Pull request is ready for review label Aug 12, 2024
@roberttoyonaga
Copy link
Contributor Author

Hi @tstuefe, can you please have a look through this when you have time?

@mlbridge
Copy link

mlbridge bot commented Aug 12, 2024

Webrevs

@bridgekeeper
Copy link

bridgekeeper bot commented Sep 9, 2024

@roberttoyonaga This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

@roberttoyonaga
Copy link
Contributor Author

Commenting to prevent this from being closed in 4 weeks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rfr Pull request is ready for review serviceability [email protected]
Development

Successfully merging this pull request may close these issues.

1 participant