| Summary: | Add a tool that dumps class and struct member layout, showing padding | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Simon Fraser (smfr) <simon.fraser> | ||||
| Component: | New Bugs | Assignee: | Simon Fraser (smfr) <simon.fraser> | ||||
| Status: | RESOLVED FIXED | ||||||
| Severity: | Normal | CC: | commit-queue, darin, dbates, kling, sam, simon.fraser, zalan | ||||
| Priority: | P2 | ||||||
| Version: | 528+ (Nightly build) | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Attachments: |
|
||||||
|
Description
Simon Fraser (smfr)
2015-08-11 13:58:19 PDT
Created attachment 258753 [details]
Patch
Here's what it says for RenderElement:
97$ $ ./Tools/Scripts/dump-class-layout WebCore RenderElement
Found 1 types matching "RenderElement" in "/Volumes/Data/Development/OSX/webkit/OpenSource/WebKitBuild/Release/WebCore.framework/WebCore"
+0 { 72} RenderElement
+0 { 48} WebCore::RenderObject
+0 { 8} WebCore::CachedImageClient
+0 { 8} WebCore::CachedResourceClient
+0 < 8> __vtbl_ptr_type * _vptr;
+8 < 8> WebCore::Node & m_node;
+16 < 8> WebCore::RenderElement * m_parent;
+24 < 8> WebCore::RenderObject * m_previous;
+32 < 8> WebCore::RenderObject * m_next;
+40 < 4> WebCore::RenderObject::RenderObjectBitfields m_bitfields;
+40 < 4> unsigned int:1 m_hasRareData;
+40 < 4> unsigned int:1 m_beingDestroyed;
+40 < 4> unsigned int:1 m_needsLayout;
+40 < 4> unsigned int:1 m_needsPositionedMovementLayout;
+40 < 4> unsigned int:1 m_normalChildNeedsLayout;
+40 < 4> unsigned int:1 m_posChildNeedsLayout;
+40 < 4> unsigned int:1 m_needsSimplifiedNormalFlowLayout;
+40 < 4> unsigned int:1 m_preferredLogicalWidthsDirty;
+41 < 4> unsigned int:1 m_floating;
+41 < 4> unsigned int:1 m_isAnonymous;
+41 < 4> unsigned int:1 m_isTextOrRenderView;
+41 < 4> unsigned int:1 m_isBox;
+41 < 4> unsigned int:1 m_isInline;
+41 < 4> unsigned int:1 m_isReplaced;
+41 < 4> unsigned int:1 m_isLineBreak;
+41 < 4> unsigned int:1 m_horizontalWritingMode;
+42 < 4> unsigned int:1 m_hasLayer;
+42 < 4> unsigned int:1 m_hasOverflowClip;
+42 < 4> unsigned int:1 m_hasTransformRelatedProperty;
+42 < 4> unsigned int:1 m_unused;
+42 < 4> unsigned int:1 m_everHadLayout;
+42 < 4> unsigned int:1 m_childrenInline;
+42 < 4> unsigned int:2 m_positionedState;
+43 < 4> unsigned int:3 m_selectionState;
+43 < 4> unsigned int:2 m_flowThreadState;
+43 < 4> unsigned int:2 m_boxDecorationState;
+47 < 1> <PADDING>
+44 < 4> unsigned int:6 m_baseTypeFlags;
+44 < 4> unsigned int:1 m_ancestorLineBoxDirty;
+44 < 4> unsigned int:1 m_hasInitializedStyle;
+45 < 4> unsigned int:1 m_renderInlineAlwaysCreatesLineBoxes;
+45 < 4> unsigned int:1 m_renderBoxNeedsLazyRepaint;
+45 < 4> unsigned int:1 m_hasPausedImageAnimations;
+45 < 4> unsigned int:1 m_hasCounterNodeMap;
+45 < 4> unsigned int:1 m_isCSSAnimating;
+45 < 4> unsigned int:1 m_hasContinuation;
+45 < 4> unsigned int:1 m_renderBlockHasMarginBeforeQuirk;
+45 < 4> unsigned int:1 m_renderBlockHasMarginAfterQuirk;
+46 < 4> unsigned int:1 m_renderBlockHasBorderOrPaddingLogicalWidthChanged;
+46 < 4> unsigned int:1 m_renderBlockFlowHasMarkupTruncation;
+46 < 4> unsigned int:2 m_renderBlockFlowLineLayoutPath;
+48 < 8> WebCore::RenderObject * m_firstChild;
+56 < 8> WebCore::RenderObject * m_lastChild;
+64 < 8> WTF::Ref<WebCore::RenderStyle> m_style;
+64 < 8> WebCore::RenderStyle * m_ptr;
Total byte size: 72
Total pad bytes: 1
Padding percentage: 1.39 %
Comment on attachment 258753 [details]
Patch
rs=me!
very nice!
Any documentation on how to use it?
(In reply to comment #3) > Comment on attachment 258753 [details] > Patch > > rs=me! > very nice! > > Any documentation on how to use it? Never mind! Comment on attachment 258753 [details] Patch Clearing flags on attachment: 258753 Committed r188350: <http://trac.webkit.org/changeset/188350> All reviewed patches have been landed. Closing bug. |