Skip to content

Commit

Permalink
8309675: Generational ZGC: compiler/gcbarriers/UnsafeIntrinsicsTest.j…
Browse files Browse the repository at this point in the history
…ava fails in nmt_commit

Reviewed-by: aboldtch, dcubed
  • Loading branch information
stefank committed Jun 8, 2023
1 parent 34f0a6e commit c4e6542
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/hotspot/share/gc/z/zPhysicalMemory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -283,15 +283,15 @@ void ZPhysicalMemoryManager::nmt_commit(zoffset offset, size_t size) const {
// When this function is called we don't know where in the virtual memory
// this physical memory will be mapped. So we fake that the virtual memory
// address is the heap base + the given offset.
const zaddress addr = ZOffset::address(offset);
MemTracker::record_virtual_memory_commit((void*)untype(addr), size, CALLER_PC);
const uintptr_t addr = ZAddressHeapBase + untype(offset);
MemTracker::record_virtual_memory_commit((void*)addr, size, CALLER_PC);
}

void ZPhysicalMemoryManager::nmt_uncommit(zoffset offset, size_t size) const {
if (MemTracker::enabled()) {
const zaddress addr = ZOffset::address(offset);
const uintptr_t addr = ZAddressHeapBase + untype(offset);
Tracker tracker(Tracker::uncommit);
tracker.record((address)untype(addr), size);
tracker.record((address)addr, size);
}
}

Expand Down

3 comments on commit c4e6542

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

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

@stefank
Copy link
Member Author

@stefank stefank commented on c4e6542 Jun 8, 2023

Choose a reason for hiding this comment

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

/backport jdk21

@openjdk
Copy link

@openjdk openjdk bot commented on c4e6542 Jun 8, 2023

Choose a reason for hiding this comment

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

@stefank the backport was successfully created on the branch stefank-backport-c4e65425 in my personal fork of openjdk/jdk21. To create a pull request with this backport targeting openjdk/jdk21:master, just click the following link:

➡️ Create pull request

The title of the pull request is automatically filled in correctly and below you find a suggestion for the pull request body:

Hi all,

This pull request contains a backport of commit c4e65425 from the openjdk/jdk repository.

The commit being backported was authored by Stefan Karlsson on 8 Jun 2023 and was reviewed by Axel Boldt-Christmas and Daniel D. Daugherty.

Thanks!

If you need to update the source branch of the pull then run the following commands in a local clone of your personal fork of openjdk/jdk21:

$ git fetch https://github.com/openjdk-bots/jdk21.git stefank-backport-c4e65425:stefank-backport-c4e65425
$ git checkout stefank-backport-c4e65425
# make changes
$ git add paths/to/changed/files
$ git commit --message 'Describe additional changes made'
$ git push https://github.com/openjdk-bots/jdk21.git stefank-backport-c4e65425

Please sign in to comment.