⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 248441 in webkit


Ignore:
Timestamp:
Aug 8, 2019, 1:48:37 PM (7 years ago)
Author:
msaboff@apple.com
Message:

OpenSource MemoryFootprint API for JSC command line tool
https://bugs.webkit.org/show_bug.cgi?id=200541

Reviewed by Saam Barati.

Source/JavaScriptCore:

Use wtf/spi/darwin/ProcessMemoryFootprint.h instead of WebKitAdditions/MemoryFootprint.h
for process memory stats.

  • jsc.cpp:

(MemoryFootprint::MemoryFootprint):

Source/WTF:

OpenSource version of WebKitAdditions/MemoryFootprint.h.

  • WTF.xcodeproj/project.pbxproj:
  • wtf/spi/darwin/ProcessMemoryFootprint.h: Added.

(ProcessMemoryFootprint::now):
(ProcessMemoryFootprint::resetPeak):

Location:
trunk/Source
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r248434 r248441  
     12019-08-08  Michael Saboff  <msaboff@apple.com>
     2
     3        OpenSource MemoryFootprint API for JSC command line tool
     4        https://bugs.webkit.org/show_bug.cgi?id=200541
     5
     6        Reviewed by Saam Barati.
     7
     8        Use wtf/spi/darwin/ProcessMemoryFootprint.h instead of WebKitAdditions/MemoryFootprint.h
     9        for process memory stats.
     10
     11        * jsc.cpp:
     12        (MemoryFootprint::MemoryFootprint):
     13
    1142019-08-08  Devin Rousso  <drousso@apple.com>
    215
  • trunk/Source/JavaScriptCore/jsc.cpp

    r247542 r248441  
    138138#endif
    139139
    140 #if __has_include(<WebKitAdditions/MemoryFootprint.h>)
    141 #include <WebKitAdditions/MemoryFootprint.h>
     140#if OS(DARWIN)
     141#include <wtf/spi/darwin/ProcessMemoryFootprint.h>
     142struct MemoryFootprint : ProcessMemoryFootprint {
     143    MemoryFootprint(const ProcessMemoryFootprint& src)
     144        : ProcessMemoryFootprint(src)
     145    {
     146    }
     147};
    142148#else
    143149struct MemoryFootprint {
    144150    uint64_t current;
    145151    uint64_t peak;
    146    
     152
    147153    static MemoryFootprint now()
    148154    {
  • trunk/Source/WTF/ChangeLog

    r248440 r248441  
     12019-08-08  Michael Saboff  <msaboff@apple.com>
     2
     3        OpenSource MemoryFootprint API for JSC command line tool
     4        https://bugs.webkit.org/show_bug.cgi?id=200541
     5
     6        Reviewed by Saam Barati.
     7
     8        OpenSource version of WebKitAdditions/MemoryFootprint.h.
     9
     10        * WTF.xcodeproj/project.pbxproj:
     11        * wtf/spi/darwin/ProcessMemoryFootprint.h: Added.
     12        (ProcessMemoryFootprint::now):
     13        (ProcessMemoryFootprint::resetPeak):
     14
    1152019-08-08  Per Arne Vollan  <pvollan@apple.com>
    216
  • trunk/Source/WTF/WTF.xcodeproj/project.pbxproj

    r247815 r248441  
    398398                5FAD3AE121B9636600BEE178 /* URLHelpers.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = URLHelpers.cpp; sourceTree = "<group>"; };
    399399                6541CAF41630DB26006D0DEC /* CopyWTFHeaders.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = CopyWTFHeaders.xcconfig; sourceTree = "<group>"; };
     400                6593CDE922FA4A520087714B /* ProcessMemoryFootprint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ProcessMemoryFootprint.h; sourceTree = "<group>"; };
    400401                70A993FC1AD7151300FA615B /* SymbolRegistry.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SymbolRegistry.cpp; sourceTree = "<group>"; };
    401402                70A993FD1AD7151300FA615B /* SymbolRegistry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SymbolRegistry.h; sourceTree = "<group>"; };
     
    13751376                                E431CC4A21187ADB000C8A07 /* DispatchSPI.h */,
    13761377                                93DDE9311CDC052D00FD3491 /* dyldSPI.h */,
     1378                                6593CDE922FA4A520087714B /* ProcessMemoryFootprint.h */,
    13771379                                A5098AFF1C169E0700087797 /* SandboxSPI.h */,
    13781380                                CE73E02419DCB7AB00580D5C /* XPCSPI.h */,
     
    14971499                        runOnlyForDeploymentPostprocessing = 0;
    14981500                        shellPath = /bin/sh;
    1499                         shellScript = "if [[ \"${DEPLOYMENT_LOCATION}\" == \"NO\" ]]; then\n    PRIVATE_HEADERS_PATH=\"${TARGET_BUILD_DIR%/}/${PRIVATE_HEADERS_FOLDER_PATH}\"\n    ICU_PRIVATE_HEADERS_PATH=\"${TARGET_BUILD_DIR%/}/${ICU_PRIVATE_HEADERS_FOLDER_PATH}\"\nelse\n    PRIVATE_HEADERS_PATH=\"${DSTROOT}/${PRIVATE_HEADERS_FOLDER_PATH}\"\n    ICU_PRIVATE_HEADERS_PATH=\"${DSTROOT}/${ICU_PRIVATE_HEADERS_FOLDER_PATH}\"\nfi;\n\nmkdir -p \"${PRIVATE_HEADERS_PATH}\"\nrsync -av --no-owner --no-group --prune-empty-dirs --exclude \".svn\" --exclude \"usr\" --exclude \"DerivedSources\" --include \"*/\" --include \"*.h\" --exclude \"*\" \"${SRCROOT}/wtf/\" \"${PRIVATE_HEADERS_PATH}\"\n\nrsync -av --no-owner --no-group --prune-empty-dirs --exclude \".svn\" --exclude \"usr\" --exclude \"DerivedSources\" --include \"*/\" --include \"*.rb\" --exclude \"*\" \"${SRCROOT}/Scripts\" \"${PRIVATE_HEADERS_PATH}\"\n\nif [[ \"${USE_INTERNAL_SDK}\" != \"YES\" ]]; then\nmkdir -p \"${ICU_PRIVATE_HEADERS_PATH}\"\nrsync -av --no-owner --no-group --prune-empty-dirs --exclude \".svn\" --exclude \"usr\" --exclude \"DerivedSources\" --include \"*/\" --include \"*.h\" --exclude \"*\" \"${SRCROOT}/icu/\" \"${ICU_PRIVATE_HEADERS_PATH}\"\nfi";
     1501                        shellScript = "if [[ \"${DEPLOYMENT_LOCATION}\" == \"NO\" ]]; then\n    PRIVATE_HEADERS_PATH=\"${TARGET_BUILD_DIR%/}/${PRIVATE_HEADERS_FOLDER_PATH}\"\n    ICU_PRIVATE_HEADERS_PATH=\"${TARGET_BUILD_DIR%/}/${ICU_PRIVATE_HEADERS_FOLDER_PATH}\"\nelse\n    PRIVATE_HEADERS_PATH=\"${DSTROOT}/${PRIVATE_HEADERS_FOLDER_PATH}\"\n    ICU_PRIVATE_HEADERS_PATH=\"${DSTROOT}/${ICU_PRIVATE_HEADERS_FOLDER_PATH}\"\nfi;\n\nmkdir -p \"${PRIVATE_HEADERS_PATH}\"\nrsync -av --no-owner --no-group --prune-empty-dirs --exclude \".svn\" --exclude \"usr\" --exclude \"DerivedSources\" --include \"*/\" --include \"*.h\" --exclude \"*\" \"${SRCROOT}/wtf/\" \"${PRIVATE_HEADERS_PATH}\"\n\nrsync -av --no-owner --no-group --prune-empty-dirs --exclude \".svn\" --exclude \"usr\" --exclude \"DerivedSources\" --include \"*/\" --include \"*.rb\" --exclude \"*\" \"${SRCROOT}/Scripts\" \"${PRIVATE_HEADERS_PATH}\"\n\nif [[ \"${USE_INTERNAL_SDK}\" != \"YES\" ]]; then\nmkdir -p \"${ICU_PRIVATE_HEADERS_PATH}\"\nrsync -av --no-owner --no-group --prune-empty-dirs --exclude \".svn\" --exclude \"usr\" --exclude \"DerivedSources\" --include \"*/\" --include \"*.h\" --exclude \"*\" \"${SRCROOT}/icu/\" \"${ICU_PRIVATE_HEADERS_PATH}\"\nfi\n";
    15001502                };
    15011503/* End PBXShellScriptBuildPhase section */
Note: See TracChangeset for help on using the changeset viewer.