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

8269222: Incorrect number of workers reported for reference processing #4588

Closed
wants to merge 1 commit into from

Conversation

@albertnetymk
Copy link
Member

@albertnetymk albertnetymk commented Jun 24, 2021

Override the worker_id used by worker time trackers to 0 in sequential ref-processing.

With this patch, java -XX:+UseParallelGC -Xms2g -Xmx2g -XX:+ParallelRefProcEnabled -Xlog:gc,gc+phases+ref=debug:gc.log::filecount=0 -jar dacapo-9.12-MR1-bach.jar h2 -n 1 prints

[2.159s][debug][gc,phases,ref] GC(0)   Reconsider SoftReferences: 0.0ms
[2.159s][debug][gc,phases,ref] GC(0)     SoftRef (ms):                  skipped
[2.159s][debug][gc,phases,ref] GC(0)   Notify Soft/WeakReferences: 0.1ms
[2.159s][debug][gc,phases,ref] GC(0)     SoftRef (ms):                  Min:  0.0, Avg:  0.0, Max:  0.0, Diff:  0.0, Sum:  0.0, Workers: 1
[2.159s][debug][gc,phases,ref] GC(0)     WeakRef (ms):                  Min:  0.0, Avg:  0.0, Max:  0.0, Diff:  0.0, Sum:  0.0, Workers: 1
[2.159s][debug][gc,phases,ref] GC(0)     FinalRef (ms):                 Min:  0.0, Avg:  0.0, Max:  0.0, Diff:  0.0, Sum:  0.0, Workers: 1
[2.159s][debug][gc,phases,ref] GC(0)     Total (ms):                    Min:  0.0, Avg:  0.0, Max:  0.0, Diff:  0.0, Sum:  0.0, Workers: 1
[2.159s][debug][gc,phases,ref] GC(0)   Notify and keep alive finalizable: 0.0ms
[2.159s][debug][gc,phases,ref] GC(0)     FinalRef (ms):                 skipped
[2.159s][debug][gc,phases,ref] GC(0)   Notify PhantomReferences: 0.0ms
[2.159s][debug][gc,phases,ref] GC(0)     PhantomRef (ms):               Min:  0.0, Avg:  0.0, Max:  0.0, Diff:  0.0, Sum:  0.0, Workers: 1
[2.159s][debug][gc,phases,ref] GC(0)   SoftReference:
[2.159s][debug][gc,phases,ref] GC(0)     Discovered: 0
[2.159s][debug][gc,phases,ref] GC(0)     Cleared: 0
[2.159s][debug][gc,phases,ref] GC(0)   WeakReference:
[2.159s][debug][gc,phases,ref] GC(0)     Discovered: 316
[2.159s][debug][gc,phases,ref] GC(0)     Cleared: 188
[2.159s][debug][gc,phases,ref] GC(0)   FinalReference:
[2.159s][debug][gc,phases,ref] GC(0)     Discovered: 4
[2.159s][debug][gc,phases,ref] GC(0)     Cleared: 4
[2.159s][debug][gc,phases,ref] GC(0)   PhantomReference:
[2.159s][debug][gc,phases,ref] GC(0)     Discovered: 156
[2.159s][debug][gc,phases,ref] GC(0)     Cleared: 67

It's "Workers: 1" since #refs < 1000.


Progress

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

Issue

  • JDK-8269222: Incorrect number of workers reported for reference processing

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 4588

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

Using diff file

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

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Jun 24, 2021

👋 Welcome back ayang! 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.

Loading

@openjdk openjdk bot added the rfr label Jun 24, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Jun 24, 2021

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

  • hotspot-gc

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.

Loading

@openjdk openjdk bot added the hotspot-gc label Jun 24, 2021
@mlbridge
Copy link

@mlbridge mlbridge bot commented Jun 24, 2021

Webrevs

Loading

Copy link
Contributor

@tschatzl tschatzl left a comment

Lgtm.

Loading

@openjdk
Copy link

@openjdk openjdk bot commented Jun 25, 2021

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

8269222: Incorrect number of workers reported for reference processing

Reviewed-by: tschatzl, sangheki

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

  • 35c4702: 8268967: Update java.security to use switch expressions
  • b565459: 8267138: Stray suffix when starting gtests via GTestWrapper.java
  • 1d16797: 8268469: Update java.time to use switch expressions
  • ffa34ed: 8265919: RunThese30M fails "assert((!(((((JfrTraceIdBits::load(value)) & ((1 << 4) << 8)) != 0))))) failed: invariant"
  • fdcae66: 8269092: Add OldObjectSampleEvent.allocationSize field
  • fd43d9c: 8269225: JFR.stop misses the written info when the filename is only specified by JFR.start
  • 3a8f3d6: 8269280: (bf) Replace StringBuffer in *Buffer.toString()
  • c37988d: 8268276: Base64 Decoding optimization for x86 using AVX-512
  • 08ee7ae: 8268855: Cleanup name handling in the Thread class and subclasses
  • c79034e: 8269303: Remove unnecessary forward declaration of PSPromotionManager in cpCache.hpp
  • ... and 30 more: https://git.openjdk.java.net/jdk/compare/0c693e2f03b1adef0e946ebc32827ac09192f5f0...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.

Loading

@openjdk openjdk bot added the ready label Jun 25, 2021
Copy link
Member

@sangheon sangheon left a comment

Looks good.

Loading

@mlbridge
Copy link

@mlbridge mlbridge bot commented Jun 25, 2021

Mailing list message from Sangheon Kim on hotspot-gc-dev:

Hi Albert,

On 6/24/21 10:40 AM, Albert Mingkun Yang wrote:

Override the `worker_id` used by worker time trackers to `0` in sequential ref-processing.

With this patch, `java -XX:+UseParallelGC -Xms2g -Xmx2g -XX:+ParallelRefProcEnabled -Xlog:gc,gc+phases+ref=debug:gc.log::filecount=0 -jar dacapo-9.12-MR1-bach.jar h2 -n 1` prints

[2.159s][debug][gc,phases,ref] GC(0) Reconsider SoftReferences: 0.0ms
[2.159s][debug][gc,phases,ref] GC(0) SoftRef (ms): skipped
[2.159s][debug][gc,phases,ref] GC(0) Notify Soft/WeakReferences: 0.1ms
[2.159s][debug][gc,phases,ref] GC(0) SoftRef (ms): Min: 0.0, Avg: 0.0, Max: 0.0, Diff: 0.0, Sum: 0.0, Workers: 1
[2.159s][debug][gc,phases,ref] GC(0) WeakRef (ms): Min: 0.0, Avg: 0.0, Max: 0.0, Diff: 0.0, Sum: 0.0, Workers: 1
[2.159s][debug][gc,phases,ref] GC(0) FinalRef (ms): Min: 0.0, Avg: 0.0, Max: 0.0, Diff: 0.0, Sum: 0.0, Workers: 1
[2.159s][debug][gc,phases,ref] GC(0) Total (ms): Min: 0.0, Avg: 0.0, Max: 0.0, Diff: 0.0, Sum: 0.0, Workers: 1
[2.159s][debug][gc,phases,ref] GC(0) Notify and keep alive finalizable: 0.0ms
[2.159s][debug][gc,phases,ref] GC(0) FinalRef (ms): skipped
[2.159s][debug][gc,phases,ref] GC(0) Notify PhantomReferences: 0.0ms
[2.159s][debug][gc,phases,ref] GC(0) PhantomRef (ms): Min: 0.0, Avg: 0.0, Max: 0.0, Diff: 0.0, Sum: 0.0, Workers: 1
[2.159s][debug][gc,phases,ref] GC(0) SoftReference:
[2.159s][debug][gc,phases,ref] GC(0) Discovered: 0
[2.159s][debug][gc,phases,ref] GC(0) Cleared: 0
[2.159s][debug][gc,phases,ref] GC(0) WeakReference:
[2.159s][debug][gc,phases,ref] GC(0) Discovered: 316
[2.159s][debug][gc,phases,ref] GC(0) Cleared: 188
[2.159s][debug][gc,phases,ref] GC(0) FinalReference:
[2.159s][debug][gc,phases,ref] GC(0) Discovered: 4
[2.159s][debug][gc,phases,ref] GC(0) Cleared: 4
[2.159s][debug][gc,phases,ref] GC(0) PhantomReference:
[2.159s][debug][gc,phases,ref] GC(0) Discovered: 156
[2.159s][debug][gc,phases,ref] GC(0) Cleared: 67

It's "Workers: 1" since #refs < 1000.

Looks good.

Thanks,
Sangheon

Loading

1 similar comment
@mlbridge
Copy link

@mlbridge mlbridge bot commented Jun 25, 2021

Mailing list message from Sangheon Kim on hotspot-gc-dev:

Hi Albert,

On 6/24/21 10:40 AM, Albert Mingkun Yang wrote:

Override the `worker_id` used by worker time trackers to `0` in sequential ref-processing.

With this patch, `java -XX:+UseParallelGC -Xms2g -Xmx2g -XX:+ParallelRefProcEnabled -Xlog:gc,gc+phases+ref=debug:gc.log::filecount=0 -jar dacapo-9.12-MR1-bach.jar h2 -n 1` prints

[2.159s][debug][gc,phases,ref] GC(0) Reconsider SoftReferences: 0.0ms
[2.159s][debug][gc,phases,ref] GC(0) SoftRef (ms): skipped
[2.159s][debug][gc,phases,ref] GC(0) Notify Soft/WeakReferences: 0.1ms
[2.159s][debug][gc,phases,ref] GC(0) SoftRef (ms): Min: 0.0, Avg: 0.0, Max: 0.0, Diff: 0.0, Sum: 0.0, Workers: 1
[2.159s][debug][gc,phases,ref] GC(0) WeakRef (ms): Min: 0.0, Avg: 0.0, Max: 0.0, Diff: 0.0, Sum: 0.0, Workers: 1
[2.159s][debug][gc,phases,ref] GC(0) FinalRef (ms): Min: 0.0, Avg: 0.0, Max: 0.0, Diff: 0.0, Sum: 0.0, Workers: 1
[2.159s][debug][gc,phases,ref] GC(0) Total (ms): Min: 0.0, Avg: 0.0, Max: 0.0, Diff: 0.0, Sum: 0.0, Workers: 1
[2.159s][debug][gc,phases,ref] GC(0) Notify and keep alive finalizable: 0.0ms
[2.159s][debug][gc,phases,ref] GC(0) FinalRef (ms): skipped
[2.159s][debug][gc,phases,ref] GC(0) Notify PhantomReferences: 0.0ms
[2.159s][debug][gc,phases,ref] GC(0) PhantomRef (ms): Min: 0.0, Avg: 0.0, Max: 0.0, Diff: 0.0, Sum: 0.0, Workers: 1
[2.159s][debug][gc,phases,ref] GC(0) SoftReference:
[2.159s][debug][gc,phases,ref] GC(0) Discovered: 0
[2.159s][debug][gc,phases,ref] GC(0) Cleared: 0
[2.159s][debug][gc,phases,ref] GC(0) WeakReference:
[2.159s][debug][gc,phases,ref] GC(0) Discovered: 316
[2.159s][debug][gc,phases,ref] GC(0) Cleared: 188
[2.159s][debug][gc,phases,ref] GC(0) FinalReference:
[2.159s][debug][gc,phases,ref] GC(0) Discovered: 4
[2.159s][debug][gc,phases,ref] GC(0) Cleared: 4
[2.159s][debug][gc,phases,ref] GC(0) PhantomReference:
[2.159s][debug][gc,phases,ref] GC(0) Discovered: 156
[2.159s][debug][gc,phases,ref] GC(0) Cleared: 67

It's "Workers: 1" since #refs < 1000.

Looks good.

Thanks,
Sangheon

Loading

@albertnetymk
Copy link
Member Author

@albertnetymk albertnetymk commented Jun 28, 2021

Thanks for the review.

/integrate

Loading

@openjdk
Copy link

@openjdk openjdk bot commented Jun 28, 2021

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

  • 4d2412e: 8269122: The use of "extern const" for Register definitions generates poor code
  • f45be15: 8269003: Update the java manpage for JDK 18
  • a29953d: Merge
  • d9cb068: 8258746: illegal access to global field _jvmci_old_thread_counters by terminated thread causes crash
  • 6eb734a: 8266269: Lookup::accessClass fails with IAE when accessing an arrayClass with a protected inner class as component class
  • 3d0d27c: 8269351: Proxy::newProxyInstance and MethodHandleProxies::asInterfaceInstance should reject sealed interfaces
  • 824a516: 8269260: Add AVX512 and other SSE + AVX combinations testing for tests which generate vector instructions
  • 1404e4b: 8269302: serviceability/dcmd/framework/InvalidCommandTest.java still fails after JDK-8268433
  • fb0a95f: 8269036: tools/jpackage/share/AppImagePackageTest.java failed with "hdiutil: create failed - Resource busy"
  • 5ebed06: 8269074: (fs) Files.copy fails to copy from /proc on some linux kernel versions
  • ... and 69 more: https://git.openjdk.java.net/jdk/compare/0c693e2f03b1adef0e946ebc32827ac09192f5f0...master

Your commit was automatically rebased without conflicts.

Loading

@openjdk openjdk bot closed this Jun 28, 2021
@openjdk openjdk bot added integrated and removed ready rfr labels Jun 28, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Jun 28, 2021

@albertnetymk Pushed as commit 87ff277.

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

Loading

@albertnetymk albertnetymk deleted the tracker branch Jun 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
3 participants