[Win] Implement memoryFootprint for Windows
authorutatane.tea@gmail.com <utatane.tea@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 12 May 2017 05:21:41 +0000 (05:21 +0000)
committerutatane.tea@gmail.com <utatane.tea@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 12 May 2017 05:21:41 +0000 (05:21 +0000)
commit98a9b59b3b41379ed4ac8caac4ec4c1837614af4
tree6486c45186036943beab19cc8918c919ebbd798e
parentebe231cf72419c7bc94b1a0767f406b66ae5d036
[Win] Implement memoryFootprint for Windows
https://bugs.webkit.org/show_bug.cgi?id=171693

Reviewed by Alex Christensen.

This patch implements memoryFootprint for Windows. In Windows, we calculate the size
of private working set. This can be done by enumerating private pages in working set.

And we also split MemoryFootprint.cpp to cocoa, linux, and win versions.

* WTF.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/MallocPtr.h:
(WTF::MallocPtr::operator*):
(WTF::MallocPtr::operator->):
* wtf/PlatformGTK.cmake:
* wtf/PlatformJSCOnly.cmake:
* wtf/PlatformMac.cmake:
* wtf/PlatformWin.cmake:
* wtf/cocoa/MemoryFootprintCocoa.cpp: Copied from Source/WTF/wtf/MemoryFootprint.cpp.
(WTF::memoryFootprint):
* wtf/linux/MemoryFootprintLinux.cpp: Renamed from Source/WTF/wtf/MemoryFootprint.cpp.
(WTF::forEachLine):
(WTF::memoryFootprint):
* wtf/win/MemoryFootprintWin.cpp: Added.
(WTF::memoryFootprint):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@216731 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WTF/ChangeLog
Source/WTF/WTF.xcodeproj/project.pbxproj
Source/WTF/wtf/CMakeLists.txt
Source/WTF/wtf/MallocPtr.h
Source/WTF/wtf/PlatformGTK.cmake
Source/WTF/wtf/PlatformJSCOnly.cmake
Source/WTF/wtf/PlatformMac.cmake
Source/WTF/wtf/PlatformWin.cmake
Source/WTF/wtf/cocoa/MemoryFootprintCocoa.cpp [new file with mode: 0644]
Source/WTF/wtf/linux/MemoryFootprintLinux.cpp [moved from Source/WTF/wtf/MemoryFootprint.cpp with 86% similarity]
Source/WTF/wtf/win/MemoryFootprintWin.cpp [new file with mode: 0644]