Changeset 214204 in webkit


Ignore:
Timestamp:
Mar 20, 2017 7:04:59 PM (7 years ago)
Author:
Simon Fraser
Message:

Add a system trace point for memory warning handling
https://bugs.webkit.org/show_bug.cgi?id=169893

Reviewed by Zalan Bujtas.

Source/WebCore:

Add a TraceScope for low memory handling, which logs 'critical' and 'synchronous'.

  • page/MemoryRelease.cpp:

(WebCore::releaseMemory):

Source/WTF:

Make it possible to pass data to the Begin trace point.

  • wtf/SystemTracing.h:

(WTF::TraceScope::TraceScope):

Tools:

Describe the new trace points.

  • Tracing/SystemTracePoints.plist:
Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WTF/ChangeLog

    r214125 r214204  
     12017-03-20  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Add a system trace point for memory warning handling
     4        https://bugs.webkit.org/show_bug.cgi?id=169893
     5
     6        Reviewed by Zalan Bujtas.
     7
     8        Make it possible to pass data to the Begin trace point.
     9
     10        * wtf/SystemTracing.h:
     11        (WTF::TraceScope::TraceScope):
     12
    1132017-03-17  Said Abou-Hallawa  <sabouhallawa@apple.com>
    214
  • trunk/Source/WTF/wtf/SystemTracing.h

    r214084 r214204  
    6868    RAFCallbackStart,
    6969    RAFCallbackEnd,
     70    MemoryPressureHandlerStart,
     71    MemoryPressureHandlerEnd,
    7072
    7173    WebKitRange = 10000,
     
    108110public:
    109111
    110     TraceScope(TracePointCode entryCode, TracePointCode exitCode)
     112    TraceScope(TracePointCode entryCode, TracePointCode exitCode, uint64_t data1 = 0, uint64_t data2 = 0, uint64_t data3 = 0, uint64_t data4 = 0)
    111113        : m_exitCode(exitCode)
    112114    {
    113         TracePoint(entryCode);
     115        TracePoint(entryCode, data1, data2, data3, data4);
    114116    }
    115117
  • trunk/Source/WebCore/ChangeLog

    r214203 r214204  
     12017-03-20  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Add a system trace point for memory warning handling
     4        https://bugs.webkit.org/show_bug.cgi?id=169893
     5
     6        Reviewed by Zalan Bujtas.
     7
     8        Add a TraceScope for low memory handling, which logs 'critical' and 'synchronous'.
     9
     10        * page/MemoryRelease.cpp:
     11        (WebCore::releaseMemory):
     12
    1132017-03-20  Simon Fraser  <simon.fraser@apple.com>
    214
  • trunk/Source/WebCore/page/MemoryRelease.cpp

    r211622 r214204  
    4848#include "WorkerThread.h"
    4949#include <wtf/FastMalloc.h>
     50#include <wtf/SystemTracing.h>
    5051
    5152#if PLATFORM(COCOA)
     
    113114void releaseMemory(Critical critical, Synchronous synchronous)
    114115{
     116    TraceScope scope(MemoryPressureHandlerStart, MemoryPressureHandlerEnd, static_cast<uint64_t>(critical), static_cast<uint64_t>(synchronous));
     117
    115118    if (critical == Critical::Yes)
    116119        releaseCriticalMemory(synchronous);
  • trunk/Tools/ChangeLog

    r214201 r214204  
     12017-03-20  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Add a system trace point for memory warning handling
     4        https://bugs.webkit.org/show_bug.cgi?id=169893
     5
     6        Reviewed by Zalan Bujtas.
     7
     8        Describe the new trace points.
     9
     10        * Tracing/SystemTracePoints.plist:
     11
    1122017-03-20  Alex Christensen  <achristensen@webkit.org>
    213
  • trunk/Tools/Tracing/SystemTracePoints.plist

    r214084 r214204  
    154154             <dict>
    155155                 <key>Name</key>
     156                 <string>Memory pressure handler</string>
     157                 <key>Type</key>
     158                 <string>Interval</string>
     159                 <key>Component</key>
     160                 <string>47</string>
     161                 <key>CodeBegin</key>
     162                 <string>5019</string>
     163                 <key>CodeEnd</key>
     164                 <string>5020</string>
     165                 <key>ArgNamesBegin</key>
     166                 <dict>
     167                     <key>Arg1</key>
     168                     <string>Critical</string>
     169                     <key>Arg2</key>
     170                     <string>Synchronous</string>
     171                 </dict>
     172             </dict>
     173             <dict>
     174                 <key>Name</key>
    156175                 <string>Paint WebHTMLView</string>
    157176                 <key>Type</key>
Note: See TracChangeset for help on using the changeset viewer.