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

8315462: [REDO] runtime/NMT/SummarySanityCheck.java failed with "Total committed (MMMMMM) did not match the summarized committed (NNNNNN)" #16262

Closed
wants to merge 10 commits into from

Conversation

afshin-zafari
Copy link
Contributor

@afshin-zafari afshin-zafari commented Oct 19, 2023

This is a PR for the original PR.


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-8315462: [REDO] runtime/NMT/SummarySanityCheck.java failed with "Total committed (MMMMMM) did not match the summarized committed (NNNNNN)" (Bug - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 16262

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

Using diff file

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

Webrev

Link to Webrev Comment

Sorry, something went wrong.

…l committed (MMMMMM) did not match the summarized committed (NNNNNN)"
@bridgekeeper
Copy link

bridgekeeper bot commented Oct 19, 2023

👋 Welcome back azafari! 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 Oct 19, 2023

@afshin-zafari 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.

@openjdk openjdk bot added the hotspot-runtime hotspot-runtime-dev@openjdk.org label Oct 19, 2023
@mlbridge
Copy link

mlbridge bot commented Oct 19, 2023

void MallocMemorySnapshot::copy_to(MallocMemorySnapshot* s) {
// Need to make sure that mtChunks don't get deallocated while the
// copy is going on, because their size is adjusted using this
// buffer in make_adjustment().
Copy link
Member

Choose a reason for hiding this comment

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

Since you are moving this, could you change the comment a bit to make clear it only refers to the ThreadCritical, not the rest of the function? E.g. "Need to lock to make sure...."

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

inline size_t thread_count() const {
MallocMemorySnapshot* s = const_cast<MallocMemorySnapshot*>(this);
return s->by_type(mtThreadStack)->malloc_count();
}
Copy link
Member

Choose a reason for hiding this comment

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

Why is this needed?

Copy link
Contributor Author

@afshin-zafari afshin-zafari Nov 7, 2023

Choose a reason for hiding this comment

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

It came after merge, added in JDK-8315362.

Copy link
Member

Choose a reason for hiding this comment

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

Yes, JDK-8315362 threw this out. IIRC we removed the awkward mechanism of counting threads by number of thread stacks. Hence my question, why the re-introduction? Merge glitch?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's a merge glitch.

Copy link

@gerard-ziemski gerard-ziemski left a comment

Choose a reason for hiding this comment

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

Looks nice and clean!

(still need to remove the merge introduced code as Thomas pointed out though)

Thank you for fixing this!

@openjdk
Copy link

openjdk bot commented Nov 17, 2023

⚠️ @afshin-zafari This pull request contains merges that bring in commits not present in the target repository. Since this is not a "merge style" pull request, these changes will be squashed when this pull request in integrated. If this is your intention, then please ignore this message. If you want to preserve the commit structure, you must change the title of this pull request to Merge <project>:<branch> where <project> is the name of another project in the OpenJDK organization (for example Merge jdk:master).

@afshin-zafari
Copy link
Contributor Author

@tstuefe, any more comments on this?

@@ -55,6 +55,8 @@ class MemoryCounter {
public:
MemoryCounter() : _count(0), _size(0), _peak_count(0), _peak_size(0) {}

inline void set_size_and_count(size_t size, size_t count) { _size = size; _count = count; }
Copy link
Member

Choose a reason for hiding this comment

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

It occurred to me that this invalidates the peak counter. You need to update that too, e.g.

void set_size_and_count(size_t size, size_t count) { 
  _size = size;
  _count = count;
  update_peak(size, count);
}

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Copy link
Member

@tstuefe tstuefe left a comment

Choose a reason for hiding this comment

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

Okay

@openjdk
Copy link

openjdk bot commented Dec 18, 2023

@afshin-zafari 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:

8315462: [REDO] runtime/NMT/SummarySanityCheck.java failed with "Total committed (MMMMMM) did not match the summarized committed (NNNNNN)"

Reviewed-by: gziemski, stuefe

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

  • ecff9c1: 8315040: Remove redundant check in WorkerPolicy::parallel_worker_threads
  • a247d0c: 8322209: RISC-V: Enable some tests related to MD5 instrinsic
  • 341b4e0: 8321975: Print when add_reserved_region fails even in product mode
  • f696796: 8280087: G1: Handle out-of-mark stack situations during reference processing more gracefully
  • 413dbf8: 8322205: Parallel: Remove unused arg in PSCardTable::pre_scavenge
  • f553819: 8317007: Add bulk removal of dead nmethods during class unloading

Please see this link for an up-to-date comparison between the source branch of this pull request and the master branch.
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 Pull request is ready to be integrated label Dec 18, 2023
@afshin-zafari
Copy link
Contributor Author

Thanks for your review @tstuefe and @gerard-ziemski.

/integrate

@openjdk
Copy link

openjdk bot commented Dec 18, 2023

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

  • a5122d7: 8314029: Add file name parameter to Compiler.perfmap
  • c0a3b76: 8316197: Make tracing of inline cache available in unified logging
  • 7e1d26d: 8322287: Parallel: Remove unused arg in adjust_eden_for_pause_time and adjust_eden_for_minor_pause_time
  • 5584ba3: 8322097: Serial: Refactor CardTableRS::find_first_clean_card
  • 75d382d: 8322204: Parallel: Remove unused _collection_cost_margin_fraction
  • febf8af: 8322089: Parallel: Remove PSAdaptiveSizePolicy::set_survivor_size
  • 10335f6: 7001133: OutOfMemoryError by CustomMediaSizeName implementation
  • ecff9c1: 8315040: Remove redundant check in WorkerPolicy::parallel_worker_threads
  • a247d0c: 8322209: RISC-V: Enable some tests related to MD5 instrinsic
  • 341b4e0: 8321975: Print when add_reserved_region fails even in product mode
  • ... and 3 more: https://git.openjdk.org/jdk/compare/34351b7a7950a3b563748f40f2619374f62f9b16...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Dec 18, 2023
@openjdk openjdk bot closed this Dec 18, 2023
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Dec 18, 2023
@openjdk
Copy link

openjdk bot commented Dec 18, 2023

@afshin-zafari Pushed as commit 66aeb89.

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

@afshin-zafari
Copy link
Contributor Author

/sponsor

@openjdk
Copy link

openjdk bot commented Dec 18, 2023

@afshin-zafari The command sponsor can only be used in open pull requests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotspot-runtime hotspot-runtime-dev@openjdk.org integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

None yet

3 participants