Ignore:
Timestamp:
Apr 22, 2013, 3:52:23 PM (12 years ago)
Author:
[email protected]
Message:

Remove the memory instrumentation code
https://bugs.webkit.org/show_bug.cgi?id=114931

Reviewed by Andreas Kling.

.:

  • Source/autotools/symbols.filter:

Source/JavaScriptCore:

  • JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreExports.def:
  • JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExports.def.in:

Source/WebCore:

The Memory Instrumentation code is unfinished and has already
become out of sync the objects it is supposed to represent.

The current approach does not seem maintainable, it is better to
remove it before someone gets hurt.

By removing the code, the binary become 1240976 bytes smaller.
Yep, almost 1 Mb, bringing WebCore to the size it has 5 months ago :)

  • MostWebCoreFiles: remove the support for memory instrumentation.

Source/WebKit:

  • WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in:

Source/WebKit/mac:

  • WebView/WebRenderLayer.mm:

Source/WebKit/win:

  • WebKit.vcproj/WebKitExports.def.in:

Source/WTF:

On Mac x86_64, the code removal cause the binary to be
9224 bytes smaller.

  • GNUmakefile.list.am:
  • WTF.pro:
  • WTF.vcproj/WTF.vcproj:
  • WTF.vcxproj/WTF.vcxproj:
  • WTF.vcxproj/WTF.vcxproj.filters:
  • WTF.xcodeproj/project.pbxproj:
  • wtf/CMakeLists.txt:
  • wtf/Forward.h:
  • wtf/ListHashSet.h:

(ListHashSet):
(ListHashSetNodeAllocator):
(WTF::ListHashSetNodeAllocator::pool):
(WTF::ListHashSetNodeAllocator::pastPool):

  • wtf/MemoryInstrumentation.cpp: Removed.
  • wtf/MemoryInstrumentation.h: Removed.
  • wtf/MemoryInstrumentationArrayBufferView.h: Removed.
  • wtf/MemoryInstrumentationHashCountedSet.h: Removed.
  • wtf/MemoryInstrumentationHashMap.h: Removed.
  • wtf/MemoryInstrumentationHashSet.h: Removed.
  • wtf/MemoryInstrumentationListHashSet.h: Removed.
  • wtf/MemoryInstrumentationSequence.h: Removed.
  • wtf/MemoryInstrumentationString.h: Removed.
  • wtf/MemoryInstrumentationVector.h: Removed.
  • wtf/MemoryObjectInfo.h: Removed.
  • wtf/text/AtomicString.h:
  • wtf/text/StringImpl.h:

(WTF::StringImpl::isASCIILiteral):

  • wtf/text/WTFString.h:

Tools:

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WTF/MemoryInstrumentationTest.cpp: Removed.

LayoutTests:

  • inspector/profiler/memory-instrumentation-cached-images-expected.txt: Removed.
  • inspector/profiler/memory-instrumentation-cached-images.html: Removed.
  • inspector/profiler/memory-instrumentation-canvas-expected.txt: Removed.
  • inspector/profiler/memory-instrumentation-canvas.html: Removed.
  • inspector/profiler/memory-instrumentation-external-array-expected.txt: Removed.
  • inspector/profiler/memory-instrumentation-external-array.html: Removed.
  • inspector/profiler/memory-instrumentation-external-string-expected.txt: Removed.
  • inspector/profiler/memory-instrumentation-external-string.html: Removed.
  • inspector/profiler/memory-instrumentation-test.js: Removed.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/css/CSSValue.cpp

    r148852 r148921  
    5656#include "SVGColor.h"
    5757#include "SVGPaint.h"
    58 #include "WebCoreMemoryInstrumentation.h"
    5958#include "WebKitCSSArrayFunctionValue.h"
    6059#include "WebKitCSSFilterValue.h"
     
    8180
    8281    String cssText() const { return m_cssText; }
    83 
    84     void reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
    85     {
    86         MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
    87         info.addMember(m_cssText, "cssText");
    88     }
    8982
    9083private:
     
    150143#endif
    151144    return false;
    152 }
    153 
    154 void CSSValue::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
    155 {
    156     if (m_isTextClone) {
    157         ASSERT(isCSSOMSafe());
    158         static_cast<const TextCloneCSSValue*>(this)->reportDescendantMemoryUsage(memoryObjectInfo);
    159         return;
    160     }
    161 
    162     ASSERT(!isCSSOMSafe() || isSubtypeExposedToCSSOM());
    163     switch (classType()) {
    164     case PrimitiveClass:
    165         static_cast<const CSSPrimitiveValue*>(this)->reportDescendantMemoryUsage(memoryObjectInfo);
    166         return;
    167     case ImageClass:
    168         static_cast<const CSSImageValue*>(this)->reportDescendantMemoryUsage(memoryObjectInfo);
    169         return;
    170     case CursorImageClass:
    171         static_cast<const CSSCursorImageValue*>(this)->reportDescendantMemoryUsage(memoryObjectInfo);
    172         return;
    173     case CanvasClass:
    174         static_cast<const CSSCanvasValue*>(this)->reportDescendantMemoryUsage(memoryObjectInfo);
    175         return;
    176     case CrossfadeClass:
    177         static_cast<const CSSCrossfadeValue*>(this)->reportDescendantMemoryUsage(memoryObjectInfo);
    178         return;
    179     case LinearGradientClass:
    180         static_cast<const CSSLinearGradientValue*>(this)->reportDescendantMemoryUsage(memoryObjectInfo);
    181         return;
    182     case RadialGradientClass:
    183         static_cast<const CSSRadialGradientValue*>(this)->reportDescendantMemoryUsage(memoryObjectInfo);
    184         return;
    185     case CubicBezierTimingFunctionClass:
    186         static_cast<const CSSCubicBezierTimingFunctionValue*>(this)->reportDescendantMemoryUsage(memoryObjectInfo);
    187         return;
    188     case LinearTimingFunctionClass:
    189         static_cast<const CSSLinearTimingFunctionValue*>(this)->reportDescendantMemoryUsage(memoryObjectInfo);
    190         return;
    191     case StepsTimingFunctionClass:
    192         static_cast<const CSSStepsTimingFunctionValue*>(this)->reportDescendantMemoryUsage(memoryObjectInfo);
    193         return;
    194     case AspectRatioClass:
    195         static_cast<const CSSAspectRatioValue*>(this)->reportDescendantMemoryUsage(memoryObjectInfo);
    196         return;
    197     case BorderImageSliceClass:
    198         static_cast<const CSSBorderImageSliceValue*>(this)->reportDescendantMemoryUsage(memoryObjectInfo);
    199         return;
    200     case FontFeatureClass:
    201         static_cast<const FontFeatureValue*>(this)->reportDescendantMemoryUsage(memoryObjectInfo);
    202         return;
    203     case FontClass:
    204         static_cast<const FontValue*>(this)->reportDescendantMemoryUsage(memoryObjectInfo);
    205         return;
    206     case FontFaceSrcClass:
    207         static_cast<const CSSFontFaceSrcValue*>(this)->reportDescendantMemoryUsage(memoryObjectInfo);
    208         return;
    209     case FunctionClass:
    210         static_cast<const CSSFunctionValue*>(this)->reportDescendantMemoryUsage(memoryObjectInfo);
    211         return;
    212     case InheritedClass:
    213         static_cast<const CSSInheritedValue*>(this)->reportDescendantMemoryUsage(memoryObjectInfo);
    214         return;
    215     case InitialClass:
    216         static_cast<const CSSInitialValue*>(this)->reportDescendantMemoryUsage(memoryObjectInfo);
    217         return;
    218     case ReflectClass:
    219         static_cast<const CSSReflectValue*>(this)->reportDescendantMemoryUsage(memoryObjectInfo);
    220         return;
    221     case ShadowClass:
    222         static_cast<const ShadowValue*>(this)->reportDescendantMemoryUsage(memoryObjectInfo);
    223         return;
    224     case UnicodeRangeClass:
    225         static_cast<const CSSUnicodeRangeValue*>(this)->reportDescendantMemoryUsage(memoryObjectInfo);
    226         return;
    227     case LineBoxContainClass:
    228         static_cast<const CSSLineBoxContainValue*>(this)->reportDescendantMemoryUsage(memoryObjectInfo);
    229         return;
    230     case CalculationClass:
    231         static_cast<const CSSCalcValue*>(this)->reportDescendantMemoryUsage(memoryObjectInfo);
    232         return;
    233 #if ENABLE(CSS_FILTERS) && ENABLE(CSS_SHADERS)
    234     case WebKitCSSArrayFunctionValueClass:
    235         static_cast<const WebKitCSSArrayFunctionValue*>(this)->reportDescendantMemoryUsage(memoryObjectInfo);
    236         return;
    237     case WebKitCSSMatFunctionValueClass:
    238         static_cast<const WebKitCSSMatFunctionValue*>(this)->reportDescendantMemoryUsage(memoryObjectInfo);
    239         return;
    240     case WebKitCSSMixFunctionValueClass:
    241         static_cast<const WebKitCSSMixFunctionValue*>(this)->reportDescendantMemoryUsage(memoryObjectInfo);
    242         return;
    243     case WebKitCSSShaderClass:
    244         static_cast<const WebKitCSSShaderValue*>(this)->reportDescendantMemoryUsage(memoryObjectInfo);
    245         return;
    246 #endif
    247 #if ENABLE(CSS_VARIABLES)
    248     case VariableClass:
    249         static_cast<const CSSVariableValue*>(this)->reportDescendantMemoryUsage(memoryObjectInfo);
    250         return;
    251 #endif
    252 #if ENABLE(SVG)
    253     case SVGColorClass:
    254         static_cast<const SVGColor*>(this)->reportDescendantMemoryUsage(memoryObjectInfo);
    255         return;
    256     case SVGPaintClass:
    257         static_cast<const SVGPaint*>(this)->reportDescendantMemoryUsage(memoryObjectInfo);
    258         return;
    259     case WebKitCSSSVGDocumentClass:
    260         static_cast<const WebKitCSSSVGDocumentValue*>(this)->reportDescendantMemoryUsage(memoryObjectInfo);
    261         return;
    262 #endif
    263     case ValueListClass:
    264         static_cast<const CSSValueList*>(this)->reportDescendantMemoryUsage(memoryObjectInfo);
    265         return;
    266 #if ENABLE(CSS_IMAGE_SET)
    267     case ImageSetClass:
    268         static_cast<const CSSImageSetValue*>(this)->reportDescendantMemoryUsage(memoryObjectInfo);
    269         return;
    270 #endif
    271 #if ENABLE(CSS_FILTERS)
    272     case WebKitCSSFilterClass:
    273         static_cast<const WebKitCSSFilterValue*>(this)->reportDescendantMemoryUsage(memoryObjectInfo);
    274         return;
    275 #endif
    276     case WebKitCSSTransformClass:
    277         static_cast<const WebKitCSSTransformValue*>(this)->reportDescendantMemoryUsage(memoryObjectInfo);
    278         return;
    279     }
    280     ASSERT_NOT_REACHED();
    281145}
    282146
Note: See TracChangeset for help on using the changeset viewer.