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

8261527: Record page size used for underlying mapping in ReservedSpace #3802

Closed
wants to merge 2 commits into from

Conversation

kstefanj
Copy link
Contributor

@kstefanj kstefanj commented Apr 29, 2021

Please review this change to use the actual page size rather than bool large when creating and initializing ReservedSpace. This allows us to then get rid of the helper ReservedSpace::actual_reserved_page_size() and instead use the "real" page size for logging and other use.

The PR consist of two commits, one that changes ReservedSpace to use and store a page size and one that removes actual_reserved_page_size() and instead uses ReservedSpace::page_size(). Hopefully this might help ease the review a bit.

There are two changes in behavior:

  • In JfrVirtualMemorySegment::initialize() we now always pass down os::vm_page_size() which means never use large pages. This differs from the old condition where large pages were enabled if transparent huge pages were enabled. This change has been discussed with the JFR team and they will later investigate how to re-enable large page use.
  • In ReservedSpace::reserve(), if a file is used, the page size is always set to os::vm_page_size(). So when logging the page_size for such mapping it will not report a large page size. This was incorrectly done in the past when using ReservedSpace::actual_reserved_page_size() to figure out the page size. This makes the runtime/os/TestTracePageSizes.java test pass even if run with -XX:AllocateHeapAt=/tmp.

Testing
Mach5 tier1-4 and a lot of local testing.


Progress

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

Issue

  • JDK-8261527: Record page size used for underlying mapping in ReservedSpace

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 3802

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

Using diff file

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

@bridgekeeper
Copy link

bridgekeeper bot commented Apr 29, 2021

👋 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
Copy link

openjdk bot commented Apr 29, 2021

@kstefanj The following labels will be automatically applied to this pull request:

  • hotspot
  • shenandoah

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing lists. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added hotspot shenandoah labels Apr 29, 2021
@kstefanj kstefanj marked this pull request as ready for review Apr 29, 2021
@openjdk openjdk bot added the rfr label Apr 29, 2021
@mlbridge
Copy link

mlbridge bot commented Apr 29, 2021

Webrevs

rkennke
rkennke approved these changes May 3, 2021
Copy link
Contributor

@rkennke rkennke left a comment

Looks good to me.

@openjdk
Copy link

openjdk bot commented May 3, 2021

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

8261527: Record page size used for underlying mapping in ReservedSpace

Reviewed-by: rkennke, iwalulya

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

  • 1d9ea3a: 8266083: Shenandoah: Consolidate dedup/no dedup oop closures
  • 80941f4: 8234446: Post-CMS workgroup hierarchy cleanup
  • ac760c7: 8266295: Remove unused _concurrent_iteration_safe_limit
  • b42d496: 8266388: C2: Improve constant ShiftCntV on x86
  • 05cfac9: 8266412: Remove redundant TemplateInterpreter entries
  • c5dc657: 8266056: runtime/stringtable/StringTableCleaningTest.java failed with "RuntimeException: Missing Callback in [10, 11]"
  • 8fa50eb: 8263363: Minor cleanup of Lanai code - unused code removal and comments correction
  • 7e30130: 8266401: mark hotspot compiler/intrinsics/sha/cli tests which ignore VM flags
  • dedddd5: 8266248: Compilation failure in PLATFORM_API_MacOSX_MidiUtils.c with Xcode 12.5
  • 5c083e8: 8266129: tools/jpackage/windows/WinInstallerIconTest.java hangs with fastdebug
  • ... and 34 more: https://git.openjdk.java.net/jdk/compare/dd8286e2f3f7e0a4b0b07b4ea84be4d36414c330...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 May 3, 2021
Copy link
Member

@walulyai walulyai left a comment

lgtm!

@kstefanj
Copy link
Contributor Author

kstefanj commented May 4, 2021

Thanks for the reviews @rkennke and @walulyai.

/integrate

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

openjdk bot commented May 4, 2021

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

  • 8e071c4: 8265784: [C2] Hoisting of DecodeN leaves MachTemp inputs behind
  • ce1bc9d: 8266432: ZGC: GC allocation stalls can trigger deadlocks
  • 30ccd80: 8264950: Set opaque for JTooltip in config file of NimbusLookAndFeel
  • cfdf4a7: 8266449: cleanup jtreg tags in compiler/intrinsics/sha/cli tests
  • 3544a9d: 8266391: Replace use of reflection in jdk.internal.platform.Metrics
  • 020236c: 8264786: [macos] All Swing/AWT apps cause Allow Notifications prompt to appear when app is launched
  • 45760d4: 8266320: (bf) ReadOnlyBufferException in heap buffer put(String,int,int) should not be conditional
  • ff65920: 8265491: Math Signum optimization for x86
  • 55cc0af: 8266185: Shenandoah: Fix incorrect comment/assertion messages
  • 880c138: 8265349: vmTestbase/../stress/compiler/deoptimize/Test.java fails with OOME due to CodeCache exhaustion.
  • ... and 46 more: https://git.openjdk.java.net/jdk/compare/dd8286e2f3f7e0a4b0b07b4ea84be4d36414c330...master

Your commit was automatically rebased without conflicts.

Pushed as commit 141cc2f.

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

Copy link
Member

@tstuefe tstuefe left a comment

I see you were too fast for me :)

Good patch. Much cleaner now.

Thanks, Thomas

@kstefanj
Copy link
Contributor Author

kstefanj commented May 4, 2021

Thanks @tstuefe =)

@kstefanj kstefanj deleted the 8261527-use-rs-ps-for-trace branch May 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotspot integrated shenandoah
4 participants