WebKit icon indicating copy to clipboard operation
WebKit copied to clipboard

[PlayStation] Replace OSAllocator implementation with memory-extra private library

Open basuke opened this issue 9 months ago โ€ข 1 comments

https://bugs.webkit.org/show_bug.cgi?id=274221

Reviewed by NOBODY (OOPS!).

To reserve large address space, our platform requires precise control of virtual address space and commiti/decommit management is not enough for this purpose. In this patch, I've introduced new memory-extra private library for that purpose and add platform specific OSAllocator implementation.

Also replace showmap library with embedded one inside memory-extra and use clever way to collect memory information.

  • Source/JavaScriptCore/PlatformPlayStation.cmake:
  • Source/JavaScriptCore/shell/PlatformPlayStation.cmake:
  • Source/JavaScriptCore/testmem/PlatformPlayStation.cmake:
  • Source/JavaScriptCore/testmem/testmem.cpp: (Footprint::now):
  • Source/WTF/wtf/PlatformPlayStation.cmake:
  • Source/WTF/wtf/playstation/OSAllocatorPlayStation.cpp: Added. (WTF::OSAllocator::tryReserveAndCommit): (WTF::OSAllocator::tryReserveUncommitted): (WTF::OSAllocator::reserveUncommitted): (WTF::OSAllocator::tryReserveUncommittedAligned): (WTF::OSAllocator::reserveAndCommit): (WTF::OSAllocator::commit): (WTF::OSAllocator::decommit): (WTF::OSAllocator::hintMemoryNotNeededSoon): (WTF::OSAllocator::releaseDecommitted): (WTF::OSAllocator::protect):
  • Source/WebCore/PlatformPlayStation.cmake:
  • Source/WebCore/page/playstation/ResourceUsageThreadPlayStation.cpp: (WebCore::ResourceUsageThread::platformCollectMemoryData):
  • Source/cmake/OptionsPlayStation.cmake:
  • Tools/TestWebKitAPI/PlatformPlayStation.cmake:

Pull Request Template

File a Bug

All changes should be associated with a bug. The WebKit project is currently using Bugzilla as our bug tracker. Note that multiple changes may be associated with a single bug.

Provided Tooling

The WebKit Project strongly recommends contributors use Tools/Scripts/git-webkit to generate pull requests. See Setup and Contributing Code for how to do this.

Template

If a contributor wishes to file a pull request manually, the template is below. Manually-filed pull requests should contain their commit message as the pull request description, and their commit message should be formatted like the template below.

Additionally, the pull request should be mentioned on Bugzilla, labels applied to the pull request matching the component and version of the Bugzilla associated with the pull request and the pull request assigned to its author.


https://bugs.webkit.org/show_bug.cgi?id=#####

Reviewed by NOBODY (OOPS!).

Explanation of why this fixes the bug (OOPS!).

* path/changed.ext:
(function):
(class.function):

https://github.com/WebKit/WebKit/commit/75876b0080c4b213202ecae59c79d9582fd5fc5f

Misc iOS, tvOS & watchOS macOS Linux Windows
โœ… ๐Ÿงช style โœ… ๐Ÿ›  ios โœ… ๐Ÿ›  mac โœ… ๐Ÿ›  wpe โœ… ๐Ÿ›  wincairo
โœ… ๐Ÿงช bindings โœ… ๐Ÿ›  ios-sim โœ… ๐Ÿ›  mac-AS-debug โœ… ๐Ÿงช wpe-wk2
โœ… ๐Ÿงช webkitperl โœ… ๐Ÿงช ios-wk2 โœ… ๐Ÿงช api-mac โœ… ๐Ÿงช api-wpe
โœ… ๐Ÿงช ios-wk2-wpt โœ… ๐Ÿงช mac-wk1 โณ ๐Ÿ›  wpe-skia
โœ… ๐Ÿ›  ๐Ÿงช jsc โœ… ๐Ÿงช api-ios โœ… ๐Ÿงช mac-wk2 โœ… ๐Ÿ›  gtk
โœ… ๐Ÿ›  ๐Ÿงช jsc-arm64 โœ… ๐Ÿ›  tv โœ… ๐Ÿงช mac-AS-debug-wk2 โœ… ๐Ÿงช gtk-wk2
โœ… ๐Ÿ›  tv-sim โœ… ๐Ÿงช mac-wk2-stress โœ… ๐Ÿงช api-gtk
โœ… ๐Ÿ›  watch โœ… ๐Ÿ›  jsc-armv7
โœ… ๐Ÿ›  watch-sim โœ… ๐Ÿงช jsc-armv7-tests

basuke avatar May 15 '24 18:05 basuke

Committed 278920@main (3042eb64bb03): https://commits.webkit.org/278920@main

Reviewed commits have been landed. Closing PR #28603 and removing active labels.

webkit-commit-queue avatar May 17 '24 18:05 webkit-commit-queue