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

8252645: Change time measurements in G1ServiceThread to only account remembered set work #1447

Closed

Conversation

kstefanj
Copy link
Contributor

@kstefanj kstefanj commented Nov 26, 2020

Please review this change to move the timing of how much time is spent doing remembered set sampling into the task doing the sampling. The timing has historically been part of the service thread, because in the past the only thing the thread did was sampling. Now when both uncommit work and periodic GC scheduling has been added, the timing needs to be moved into the sampling task.

I've also slightly changed the output using this information to:

[0,295s][trace][gc,remset   ] GC(0)   Sampling task time (ms)
[0,295s][trace][gc,remset   ] GC(0)           0,000

Instead of the old:

[0,301s][trace][gc,remset   ] GC(0)   Service thread time (s)
[0,301s][trace][gc,remset   ] GC(0)           0,00

I decided to change the unit to ms because the time spent doing sampling is very small and is better measured in milliseconds. When doing so I also went with three decimals since this is what we normally do for milliseconds.


Progress

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

Testing

Linux additional Linux x64 Linux x86 Windows x64 macOS x64
Build ✔️ (8/8 passed) ✔️ (2/2 passed) ✔️ (2/2 passed) ✔️ (2/2 passed) ✔️ (2/2 passed)
Test (tier1) (1/9 failed) (2/9 failed) ✔️ (9/9 passed) ✔️ (9/9 passed)

Failed test tasks

Issue

  • JDK-8252645: Change time measurements in G1ServiceThread to only account remembered set work

Reviewers

Download

$ git fetch https://git.openjdk.java.net/jdk pull/1447/head:pull/1447
$ git checkout pull/1447

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Nov 26, 2020

👋 Welcome back sjohanss! 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 Nov 26, 2020
@openjdk
Copy link

@openjdk openjdk bot commented Nov 26, 2020

@kstefanj 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.

@openjdk openjdk bot added the hotspot-gc label Nov 26, 2020
@mlbridge
Copy link

@mlbridge mlbridge bot commented Nov 26, 2020

Webrevs

Copy link
Contributor

@tschatzl tschatzl left a comment

Looks good apart from these minor nits.

@@ -482,23 +482,6 @@ class G1RemSetScanState : public CHeapObj<mtGC> {
}
};

G1RemSet::G1RemSet(G1CollectedHeap* g1h,
Copy link
Contributor

@tschatzl tschatzl Nov 26, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not completely sure why this moved but not G1RemSet::initialize() below.

Copy link
Contributor Author

@kstefanj kstefanj Nov 26, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The destructor had to move to see the type and I obviously took the constructor but missed initialize(). Certainly makes sense to move that one too.

assert(_sampling_task != NULL, "Must have been initialized");
return _sampling_task->vtime_accum();
}

Copy link
Contributor

@tschatzl tschatzl Nov 26, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extra newline.

@openjdk
Copy link

@openjdk openjdk bot commented Nov 26, 2020

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

8252645: Change time measurements in G1ServiceThread to only account remembered set work

Reviewed-by: ayang, tschatzl

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

  • 2215e5a: 8255351: Add detection for Graviton 2 CPUs
  • 62d72de: 8220730: sun.security.provider.SecureRandom default constructor has wrong documentation
  • 4e43b28: 8256359: AArch64: runtime/ReservedStack/ReservedStackTestCompiler.java fails
  • 6e00622: 8256488: [aarch64] Use ldpq/stpq instead of ld4/st4 for small copies in StubGenerator::copy_memory
  • a93841a: 8255277: randomDelay in DrainDeadlockT and LoggingDeadlock do not randomly delay
  • 2d30a10: 8257069: C2: Clarify and sanity test RegMask/RegMaskIterator
  • 0a5de50: 8257151: ZGC: Simplify ZVerify
  • bf66d73: 8257073: ZGC: Try forward object before retaining page
  • 1b3aa3a: 8256831: MIPS Zero builds fail with undefined __atomic_compare_exchange_8
  • 734d3c3: 8256862: Several java/foreign tests fail on x86_32 platforms
  • ... and 1 more: https://git.openjdk.java.net/jdk/compare/f6d6a07c30d8dd1965ff3007707879719b82c6c0...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.

@openjdk openjdk bot added the ready label Nov 26, 2020
@tschatzl
Copy link
Contributor

@tschatzl tschatzl commented Nov 27, 2020

Still good. Thanks.

@kstefanj
Copy link
Contributor Author

@kstefanj kstefanj commented Nov 27, 2020

/integrate

@kstefanj
Copy link
Contributor Author

@kstefanj kstefanj commented Nov 27, 2020

Thanks @tschatzl and @albertnetymk for the reviews.

@openjdk openjdk bot closed this Nov 27, 2020
@openjdk openjdk bot added integrated and removed ready rfr labels Nov 27, 2020
@openjdk
Copy link

@openjdk openjdk bot commented Nov 27, 2020

@kstefanj Since your change was applied there have been 13 commits pushed to the master branch:

  • a3eec39: 8257181: s390x builds are very noisy with gc-sections messages
  • 9a468d8: 8256757: Incorrect MachCallRuntimeNode::ret_addr_offset() for CallLeafNoFP on x86_32
  • 2215e5a: 8255351: Add detection for Graviton 2 CPUs
  • 62d72de: 8220730: sun.security.provider.SecureRandom default constructor has wrong documentation
  • 4e43b28: 8256359: AArch64: runtime/ReservedStack/ReservedStackTestCompiler.java fails
  • 6e00622: 8256488: [aarch64] Use ldpq/stpq instead of ld4/st4 for small copies in StubGenerator::copy_memory
  • a93841a: 8255277: randomDelay in DrainDeadlockT and LoggingDeadlock do not randomly delay
  • 2d30a10: 8257069: C2: Clarify and sanity test RegMask/RegMaskIterator
  • 0a5de50: 8257151: ZGC: Simplify ZVerify
  • bf66d73: 8257073: ZGC: Try forward object before retaining page
  • ... and 3 more: https://git.openjdk.java.net/jdk/compare/f6d6a07c30d8dd1965ff3007707879719b82c6c0...master

Your commit was automatically rebased without conflicts.

Pushed as commit ee99686.

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

@kstefanj kstefanj deleted the 8252645-timing-remset-sampling branch Nov 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotspot-gc integrated
3 participants