Changeset 127195 in webkit


Ignore:
Timestamp:
Aug 30, 2012 2:56:45 PM (12 years ago)
Author:
commit-queue@webkit.org
Message:

[EFL][WK2] Add WebMemorySampler feature.
https://bugs.webkit.org/show_bug.cgi?id=91214

Patch by JungJik Lee <jungjik.lee@samsung.com> on 2012-08-30
Reviewed by Kenneth Rohde Christiansen.

.:

Set WebMemorySampler feature on in EFL port.

  • Source/cmake/OptionsEfl.cmake:
  • Source/cmake/WebKitFeatures.cmake:
  • Source/cmakeconfig.h.cmake:

Source/JavaScriptCore:

WebMemorySampler collects Javascript stack and JIT memory usage in globalMemoryStatistics.

  • PlatformEfl.cmake:

Source/WebKit2:

Add WebMemorySampler feature to EFL port. WebMemorySampler records memory usage of
WebProcess and UI Process and also it records application memory status in real time.
Included items on the result are JIT, JS heap, fastmalloc bytes and
application memory info from /proc/process_id/statm.

  • PlatformEfl.cmake:
  • Shared/linux/WebMemorySamplerLinux.cpp: Added.

(WebKit):
(ApplicationMemoryStats):
(WebKit::nextToken):
(WebKit::appendKeyValuePair):
(WebKit::sampleMemoryAllocatedForApplication):
(WebKit::WebMemorySampler::processName):
(WebKit::WebMemorySampler::sampleWebKit):
(WebKit::WebMemorySampler::sendMemoryPressureEvent):

  • UIProcess/API/efl/ewk_context.cpp:

(_Ewk_Context::_Ewk_Context):

Location:
trunk
Files:
2 added
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r127178 r127195  
     12012-08-30  JungJik Lee  <jungjik.lee@samsung.com>
     2
     3        [EFL][WK2] Add WebMemorySampler feature.
     4        https://bugs.webkit.org/show_bug.cgi?id=91214
     5
     6        Reviewed by Kenneth Rohde Christiansen.
     7
     8        Set WebMemorySampler feature on in EFL port.
     9
     10        * Source/cmake/OptionsEfl.cmake:
     11        * Source/cmake/WebKitFeatures.cmake:
     12        * Source/cmakeconfig.h.cmake:
     13
    1142012-08-30  Rob Buis  <rbuis@rim.com>
    215
  • trunk/Source/JavaScriptCore/ChangeLog

    r127191 r127195  
     12012-08-30  JungJik Lee  <jungjik.lee@samsung.com>
     2
     3        [EFL][WK2] Add WebMemorySampler feature.
     4        https://bugs.webkit.org/show_bug.cgi?id=91214
     5
     6        Reviewed by Kenneth Rohde Christiansen.
     7
     8        WebMemorySampler collects Javascript stack and JIT memory usage in globalMemoryStatistics.
     9
     10        * PlatformEfl.cmake:
     11
    1122012-08-30  Benjamin Poulain  <bpoulain@apple.com>
    213
  • trunk/Source/JavaScriptCore/PlatformEfl.cmake

    r111150 r127195  
    22    jit/ExecutableAllocatorFixedVMPool.cpp
    33    jit/ExecutableAllocator.cpp
     4
     5    runtime/MemoryStatistics.cpp
    46)
    57
  • trunk/Source/WebKit2/ChangeLog

    r127193 r127195  
     12012-08-30  JungJik Lee  <jungjik.lee@samsung.com>
     2
     3        [EFL][WK2] Add WebMemorySampler feature.
     4        https://bugs.webkit.org/show_bug.cgi?id=91214
     5
     6        Reviewed by Kenneth Rohde Christiansen.
     7
     8        Add WebMemorySampler feature to EFL port. WebMemorySampler records memory usage of
     9        WebProcess and UI Process and also it records application memory status in real time.
     10        Included items on the result are JIT, JS heap, fastmalloc bytes and
     11        application memory info from /proc/process_id/statm.
     12
     13        * PlatformEfl.cmake:
     14        * Shared/linux/WebMemorySamplerLinux.cpp: Added.
     15        (WebKit):
     16        (ApplicationMemoryStats):
     17        (WebKit::nextToken):
     18        (WebKit::appendKeyValuePair):
     19        (WebKit::sampleMemoryAllocatedForApplication):
     20        (WebKit::WebMemorySampler::processName):
     21        (WebKit::WebMemorySampler::sampleWebKit):
     22        (WebKit::WebMemorySampler::sendMemoryPressureEvent):
     23        * UIProcess/API/efl/ewk_context.cpp:
     24        (_Ewk_Context::_Ewk_Context):
     25
    1262012-08-30  Pratik Solanki  <psolanki@apple.com>
    227
  • trunk/Source/WebKit2/PlatformEfl.cmake

    r126866 r127195  
    1616    Platform/CoreIPC/unix/AttachmentUnix.cpp
    1717
     18    Shared/WebMemorySampler.cpp
     19
    1820    Shared/API/c/cairo/WKImageCairo.cpp
    1921
     
    2830    Shared/efl/ProcessExecutablePathEfl.cpp
    2931    Shared/efl/WebEventFactory.cpp
     32
     33    Shared/linux/WebMemorySamplerLinux.cpp
    3034
    3135    Shared/soup/PlatformCertificateInfo.cpp
  • trunk/Source/WebKit2/UIProcess/API/efl/ewk_context.cpp

    r126926 r127195  
    2626#include "WKAPICast.h"
    2727#include "WKContextSoup.h"
     28#include "WKNumber.h"
    2829#include "WKRetainPtr.h"
    2930#include "WKString.h"
     
    8687#endif
    8788
     89#if ENABLE(MEMORY_SAMPLER)
     90        static bool initializeMemorySampler = false;
     91        static const char environmentVariable[] = "SAMPLE_MEMORY";
     92
     93        if (!initializeMemorySampler && getenv(environmentVariable)) {
     94            WKRetainPtr<WKDoubleRef> interval(AdoptWK, WKDoubleCreate(0.0));
     95            WKContextStartMemorySampler(context.get(), interval.get());
     96            initializeMemorySampler = true;
     97        }
     98#endif
    8899        ewk_context_request_manager_client_attach(this);
    89100        ewk_context_download_client_attach(this);
  • trunk/Source/cmake/OptionsEfl.cmake

    r126735 r127195  
    7979WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_LINK_PREFETCH ON)
    8080WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MEDIA_CAPTURE ON)
     81WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MEMORY_SAMPLER ON)
    8182WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MICRODATA ON)
    8283WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_NAVIGATOR_CONTENT_UTILS ON)
  • trunk/Source/cmake/WebKitFeatures.cmake

    r126735 r127195  
    7878    WEBKIT_OPTION_DEFINE(ENABLE_MEDIA_STATISTICS "Toggle Media Statistics support" OFF)
    7979    WEBKIT_OPTION_DEFINE(ENABLE_MEDIA_STREAM "Toggle Media Stream API support" OFF)
     80    WEBKIT_OPTION_DEFINE(ENABLE_MEMORY_SAMPLER "Toggle Memory Sampler support" OFF)
    8081    WEBKIT_OPTION_DEFINE(ENABLE_METER_ELEMENT "Toggle Meter Tag support" ON)
    8182    WEBKIT_OPTION_DEFINE(ENABLE_MHTML "Toggle MHTML support" OFF)
  • trunk/Source/cmakeconfig.h.cmake

    r126735 r127195  
    6868#cmakedefine01 ENABLE_MEDIA_CAPTURE
    6969#cmakedefine01 ENABLE_MEDIA_STREAM
     70#cmakedefine01 ENABLE_MEMORY_SAMPLER
    7071#cmakedefine01 ENABLE_METER_ELEMENT
    7172#cmakedefine01 ENABLE_MICRODATA
Note: See TracChangeset for help on using the changeset viewer.