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

8264311: Heap object statistics #3271

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

Conversation

@rkennke
Copy link
Contributor

@rkennke rkennke commented Mar 30, 2021

For Lilliput evaluation, it would be useful to be able to get some statistics about heap objects, e.g. how many objects there typically are, what is their (average) size, how big is the live data set, how many objecs have an identity hash code and how many objects are locked. Some of that information may be useful for general purpose too, e.g. the avg live data set and object size/count information might be quite useful to have.

Heap object statistics can be gathered and printed by invoking java with -XX:+UnlockDiagnosticVMOptions -XX:+HeapObjectStats -Xlog:heap+stats. It will impact performance of the workload. The sampling interval can be specificed by -XX:HeapObjectStatsSamplingInterval=X (in ms) and defaults to 500 (ms).

Testing:

  • Some manual tests, verifying the plausability of the output by hand
  • tier1
  • tier2

Progress

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

Integration blocker

 ⚠️ The change requires a CSR request to be approved.

Issue

Reviewing

Using git

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

Update a local copy of the PR:
$ git checkout pull/3271
$ git pull https://git.openjdk.java.net/jdk pull/3271/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 3271

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/3271.diff

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Mar 30, 2021

👋 Welcome back rkennke! 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 label Mar 30, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Mar 30, 2021

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

  • hotspot-runtime

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.

@mlbridge
Copy link

@mlbridge mlbridge bot commented Mar 30, 2021

Webrevs

@plummercj
Copy link
Contributor

@plummercj plummercj commented Mar 30, 2021

/label serviceability

@openjdk
Copy link

@openjdk openjdk bot commented Mar 30, 2021

@plummercj
The serviceability label was successfully added.

@plummercj
Copy link
Contributor

@plummercj plummercj commented Mar 30, 2021

You'll need a CSR for this enhancement.

@plummercj
Copy link
Contributor

@plummercj plummercj commented Mar 30, 2021

/csr needed

@openjdk
Copy link

@openjdk openjdk bot commented Mar 30, 2021

@plummercj has indicated that a compatibility and specification (CSR) request is needed for this pull request.
@rkennke please create a CSR request and add link to it in JDK-8264311. This pull request cannot be integrated until the CSR request is approved.

@openjdk openjdk bot added the csr label Mar 30, 2021
@rkennke
Copy link
Contributor Author

@rkennke rkennke commented Mar 30, 2021

You'll need a CSR for this enhancement.

Hmm, yeah.
I'm wondering if this should rather go into the Lilliput repository once it is created (I'd expect in ~1week or so). Then it would be refined during Lilliput project live time, and eventually merged upstream (and CSR'ed) when all is ready.

I only wanted to get this out ASAP so that people can tinker with it, and do their own measurements.

@plummercj
Copy link
Contributor

@plummercj plummercj commented Mar 30, 2021

I'm not involved in the Lilliput project, but as long as the stakeholders are ok with that approach, it's probably the way to go, especially since you seem to think the feature might still evolve some.

@mseledts
Copy link
Member

@mseledts mseledts commented Mar 30, 2021

If you are planning to integrate this change to jdk/jdk, please make sure to provide tests for this enhancement.

@mlbridge
Copy link

@mlbridge mlbridge bot commented Mar 31, 2021

Mailing list message from David Holmes on hotspot-runtime-dev:

On 31/03/2021 3:41 am, Roman Kennke wrote:

On Tue, 30 Mar 2021 17:12:52 GMT, Chris Plummer <cjplummer at openjdk.org> wrote:

You'll need a CSR for this enhancement.

Hmm, yeah.
I'm wondering if this should rather go into the Lilliput repository once it is created (I'd expect in ~1week or so). Then it would be refined during Lilliput project live time, and eventually merged upstream (and CSR'ed) when all is ready.

Diagnostic flags don't need a CSR request.

Cheers,
David

@sspitsyn
Copy link
Contributor

@sspitsyn sspitsyn commented Apr 2, 2021

Hi Roman,
Do you have any test case verifying this?
Thanks,
Serguei

@rkennke
Copy link
Contributor Author

@rkennke rkennke commented Apr 2, 2021

Hi Roman,
Do you have any test case verifying this?
Thanks,
Serguei

Hi Serguei, no, not yet, but I will add some. Thanks for the suggestion!

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Apr 30, 2021

@rkennke 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!

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