Changeset 195142 in webkit


Ignore:
Timestamp:
Jan 15, 2016, 12:57:37 PM (10 years ago)
Author:
Simon Fraser
Message:

Add kdebug_trace signposts for a few WebCore operations
https://bugs.webkit.org/show_bug.cgi?id=153136
rdar://problem/24208487

Reviewed by Sam Weinig.
Source/WebCore:

Add trace points for style recalc, layout, view painting and layer painting.

  • dom/Document.cpp:

(WebCore::Document::recalcStyle):

  • page/FrameView.cpp:

(WebCore::FrameView::layout):
(WebCore::FrameView::paintContents):

  • platform/graphics/ca/GraphicsLayerCA.cpp:

(WebCore::GraphicsLayerCA::platformCALayerPaintContents):

Source/WTF:

New header with the reserved WebKit component code, trace point codes, and
a stack-based helper that traces scope entry and exit.

The available range of trace point codes is arbitrarily segmented into WTF, JSC,
WebCore, WebKit and WebKit2.

  • WTF.xcodeproj/project.pbxproj:
  • wtf/CMakeLists.txt:
  • wtf/SystemTracing.h: Added.

(WTF::TraceScope::TraceScope):
(WTF::TraceScope::~TraceScope):

Tools:

Plist used by kdebug_trace() viewing tools.

  • Tracing/SystemTracePoints.plist: Added.
Location:
trunk
Files:
3 added
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WTF/ChangeLog

    r195141 r195142  
     12016-01-15  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Add kdebug_trace signposts for a few WebCore operations
     4        https://bugs.webkit.org/show_bug.cgi?id=153136
     5        rdar://problem/24208487
     6
     7        Reviewed by Sam Weinig.
     8       
     9        New header with the reserved WebKit component code, trace point codes, and
     10        a stack-based helper that traces scope entry and exit.
     11       
     12        The available range of trace point codes is arbitrarily segmented into WTF, JSC,
     13        WebCore, WebKit and WebKit2.
     14
     15        * WTF.xcodeproj/project.pbxproj:
     16        * wtf/CMakeLists.txt:
     17        * wtf/SystemTracing.h: Added.
     18        (WTF::TraceScope::TraceScope):
     19        (WTF::TraceScope::~TraceScope):
     20
    1212016-01-15  Andreas Kling  <akling@apple.com>
    222
  • trunk/Source/WTF/WTF.vcxproj/WTF.vcxproj

    r195141 r195142  
    270270    <ClInclude Include="..\wtf\StringExtras.h" />
    271271    <ClInclude Include="..\wtf\StringPrintStream.h" />
     272    <ClInclude Include="..\wtf\SystemTracing.h" />
    272273    <ClInclude Include="..\wtf\TemporaryChange.h" />
    273274    <ClInclude Include="..\wtf\text\ASCIIFastPath.h" />
  • trunk/Source/WTF/WTF.xcodeproj/project.pbxproj

    r195141 r195142  
    4242                0FB14E19180FA218009B6B4D /* Bag.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FB14E18180FA218009B6B4D /* Bag.h */; };
    4343                0FB14E1B1810E1DC009B6B4D /* BagToHashMap.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FB14E1A1810E1DA009B6B4D /* BagToHashMap.h */; };
     44                0FB317C41C488001007E395A /* SystemTracing.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FB317C31C488001007E395A /* SystemTracing.h */; };
    4445                0FC4488316FE9FE100844BE9 /* ProcessID.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FC4488216FE9FE100844BE9 /* ProcessID.h */; };
    4546                0FC4EDE61696149600F65041 /* CommaPrinter.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FC4EDE51696149600F65041 /* CommaPrinter.h */; };
     
    347348                0FB14E18180FA218009B6B4D /* Bag.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Bag.h; sourceTree = "<group>"; };
    348349                0FB14E1A1810E1DA009B6B4D /* BagToHashMap.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BagToHashMap.h; sourceTree = "<group>"; };
     350                0FB317C31C488001007E395A /* SystemTracing.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SystemTracing.h; sourceTree = "<group>"; };
    349351                0FC4488216FE9FE100844BE9 /* ProcessID.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ProcessID.h; sourceTree = "<group>"; };
    350352                0FC4EDE51696149600F65041 /* CommaPrinter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CommaPrinter.h; sourceTree = "<group>"; };
     
    922924                                0FDDBFA51666DFA300C55FEF /* StringPrintStream.cpp */,
    923925                                0FDDBFA61666DFA300C55FEF /* StringPrintStream.h */,
     926                                0FB317C31C488001007E395A /* SystemTracing.h */,
    924927                                A8A4731A151A825B004123FF /* TemporaryChange.h */,
    925928                                A8A4732F151A825B004123FF /* ThreadFunctionInvocation.h */,
     
    11911194                                A70DA0841799F04D00529A9B /* Insertion.h in Headers */,
    11921195                                26147B0A15DDCCDC00DDB907 /* IntegerToStringConversion.h in Headers */,
     1196                                0FB317C41C488001007E395A /* SystemTracing.h in Headers */,
    11931197                                7CDD7FF8186D291E007433CD /* IteratorAdaptors.h in Headers */,
    11941198                                7CDD7FFA186D2A54007433CD /* IteratorRange.h in Headers */,
  • trunk/Source/WTF/wtf/CMakeLists.txt

    r195141 r195142  
    100100    StringExtras.h
    101101    StringPrintStream.h
     102    SystemTracing.h
    102103    ThreadIdentifierDataPthreads.h
    103104    ThreadSafeRefCounted.h
  • trunk/Source/WebCore/ChangeLog

    r195141 r195142  
     12016-01-15  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Add kdebug_trace signposts for a few WebCore operations
     4        https://bugs.webkit.org/show_bug.cgi?id=153136
     5        rdar://problem/24208487
     6
     7        Reviewed by Sam Weinig.
     8
     9        Add trace points for style recalc, layout, view painting and layer painting.
     10
     11        * dom/Document.cpp:
     12        (WebCore::Document::recalcStyle):
     13        * page/FrameView.cpp:
     14        (WebCore::FrameView::layout):
     15        (WebCore::FrameView::paintContents):
     16        * platform/graphics/ca/GraphicsLayerCA.cpp:
     17        (WebCore::GraphicsLayerCA::platformCALayerPaintContents):
     18
    1192016-01-15  Andreas Kling  <akling@apple.com>
    220
  • trunk/Source/WebCore/dom/Document.cpp

    r195091 r195142  
    181181#include <wtf/CurrentTime.h>
    182182#include <wtf/NeverDestroyed.h>
     183#include <wtf/SystemTracing.h>
    183184#include <wtf/TemporaryChange.h>
    184185#include <wtf/text/StringBuffer.h>
     
    18231824    if (m_inStyleRecalc)
    18241825        return; // Guard against re-entrancy. -dwh
     1826
     1827    TraceScope tracingScope(StyleRecalcStart, StyleRecalcEnd);
    18251828
    18261829    RenderView::RepaintRegionAccumulator repaintRegionAccumulator(renderView());
  • trunk/Source/WebCore/page/FrameView.cpp

    r194823 r195142  
    9494#include <wtf/CurrentTime.h>
    9595#include <wtf/Ref.h>
     96#include <wtf/SystemTracing.h>
    9697#include <wtf/TemporaryChange.h>
    9798
     
    12371238            return;
    12381239    }
     1240   
     1241    TraceScope tracingScope(LayoutStart, LayoutEnd);
    12391242
    12401243#if PLATFORM(IOS)
     
    40154018    if (m_layoutPhase == InViewSizeAdjust)
    40164019        return;
    4017    
     4020
     4021    TraceScope tracingScope(PaintViewStart, PaintViewEnd);
     4022
    40184023    ASSERT(m_layoutPhase == InPostLayerPositionsUpdatedAfterLayout || m_layoutPhase == OutsideLayout);
    40194024   
  • trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp

    r194825 r195142  
    4848#include <wtf/CurrentTime.h>
    4949#include <wtf/MathExtras.h>
     50#include <wtf/SystemTracing.h>
    5051#include <wtf/TemporaryChange.h>
    5152#include <wtf/text/WTFString.h>
     
    14471448        return;
    14481449    }
     1450
     1451    TraceScope tracingScope(PaintLayerStart, PaintLayerEnd);
    14491452    paintGraphicsLayerContents(context, clip);
    14501453}
  • trunk/Tools/ChangeLog

    r195083 r195142  
     12016-01-15  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Add kdebug_trace signposts for a few WebCore operations
     4        https://bugs.webkit.org/show_bug.cgi?id=153136
     5        rdar://problem/24208487
     6
     7        Reviewed by Sam Weinig.
     8       
     9        Plist used by kdebug_trace() viewing tools.
     10
     11        * Tracing/SystemTracePoints.plist: Added.
     12
    1132016-01-14  Konstantin Tokarev  <annulen@yandex.ru>
    214
Note: See TracChangeset for help on using the changeset viewer.