[webkit-dev] Memory leak tracking in WebKit

Myles C. Maxfield mmaxfield at apple.com
Mon Nov 30 17:42:40 PST 2015


I've got a few questions/statements about this:

1. What makes you think that CSSParser::parseFontFaceSource() is the culprit? Which memory instrumentation tools are you using?
2. Font::platformInit() is the function where we start populating all our internal font caches. For example, we start creating and populating GlyphPages here. It makes sense that it should allocate some memory.
3. Platform fonts are quite heavyweight objects; I would expect these to cost more than the work being done in Font::platformInit(). These are allocated in FontCache::createFontPlatformData().

If you are able; it might be insightful to take a stack snapshot at every memory allocation and aggregate based on the allocation size and the top few frames of the stack. With this information, we can try to figure out what the memory is being used for, and where it should be released. Then we could try to debug why it isn't being released.

> On Nov 30, 2015, at 5:10 PM, Vienneau, Christopher <cvienneau at ea.com> wrote:
> 
> Hi,
>  
> I’ve still been tracking memory leaks in our application, and I think I have a good test scenario to share. 
>  
> In our application we found that a lot of memory would be held onto when visiting this particular site:
> http://answers.ea.com <http://answers.ea.com/>
> In a loop we visit this site, and a simple html page that consists of a list of test urls found on the local hard drive.
> Our in built memory tools suggest a leak is coming largely from  CSSParser::parseFontFaceSrc(), though admittedly I’ve changed my top suspects from time to time.  I think this item is showing as a large leak due to the inclusion of the font in the css on the answers.ea.com <http://answers.ea.com/> page, but perhaps there are more smaller items being leaked which is just less obvious (the font is large).
>  
> I’ve reproduce the scenario in the WinCairo test application, based on 188436.  I built in a quick and hacky soak mechanism to conduct the test, perhaps there are better tools I’m not aware of.  I’ve attached the source changes to this mail:
> Source/WebKit/win/WebKitMessageLoop.cpp
> Tools/WinLauncher/Common.cpp
>  
> I can see the memory of the WinLauncher process grow over time, here is an example of the memory usage as seen from the windows task manager over time:
> Duration    Memory (reported by windows)
> 0m                          155MB
> 13m                       178MB
> 23m                       199MB
> 36m                       219MB  
> 53m                       247MB
> 1h4m                     259MB
> 1h23m                  277MB
> After about an 1h30m, WinLauncher crashes, at the end of the mail is the basic debug data that was available. 
>  
> I’m not sure if the crash is related to the memory leak I’m experiencing, or if it’s an unrelated issue.  Since we’re a few months older from tip I’m wondering if anyone has any recent insights to share on this memory leak scenario? I haven’t identified anything in the change logs, but perhaps there is there something already addressing this?  Does the same issue occur at tip?
>  
> Any feedback is appreciated,
>  
> Thanks
>  
> Chris Vienneau
>  
>  
>  
>  
> +                             this         0x00000000784be130 {m_fontMetrics={m_unitsPerEm=1000 m_ascent=0.000000000 m_descent=0.000000000 ...} ...} WebCore::Font *
>                                 ascent   0.000000000       float
>                                 dc           Variable is optimized away and not available.     
> +                             extents {x_bearing=0.00000000000000000 y_bearing=2.840573810841e-316#DEN width=1.197610077640e-309#DEN ...}     cairo_text_extents_t
>                                 metricsMultiplier             0.031250000000000000  const double
>                                 faceName           Variable is optimized away and not available.     
>                                 descent                52852716.0          float
>                                 xHeight Variable is optimized away and not available.     
> +                             textMetrics        {tmHeight=0 tmAscent=0 tmDescent=1691286912 ...}     tagTEXTMETRICW
>                                 lineGap 63069964.0          float
>                                 scaledFont          0x000000006477fc00 {...}               _cairo_scaled_font *
>                                 faceLength         0              int
>  
>  
> >             WebKit.dll!WebCore::Font::platformInit() Line 82             C++
>                WebKit.dll!WebCore::Font::Font(const WebCore::FontPlatformData & platformData, bool isCustomFont, bool isLoading, bool isTextOrientationFallback) Line 80   C++
>                WebKit.dll!WebCore::CachedFont::createFont(const WebCore::FontDescription & fontDescription, const WTF::AtomicString & __formal, bool syntheticBold, bool syntheticItalic, bool __formal) Line 126                C++
>                WebKit.dll!WebCore::CSSFontFaceSource::font(const WebCore::FontDescription & fontDescription, bool syntheticBold, bool syntheticItalic, WebCore::CSSFontSelector * fontSelector) Line 138 C++
>                WebKit.dll!WebCore::CSSFontFace::font(const WebCore::FontDescription & fontDescription, bool syntheticBold, bool syntheticItalic) Line 127         C++
>                WebKit.dll!WebCore::CSSSegmentedFontFace::fontRanges(const WebCore::FontDescription & fontDescription) Line 130             C++
>                WebKit.dll!WebCore::CSSFontSelector::fontRangesForFamily(const WebCore::FontDescription & fontDescription, const WTF::AtomicString & familyName) Line 474           C++
>                WebKit.dll!WebCore::realizeNextFallback(const WebCore::FontDescription & description, unsigned int & index, WebCore::FontSelector * fontSelector) Line 90    C++
>                WebKit.dll!WebCore::FontCascadeFonts::realizeFallbackRangesAt(const WebCore::FontDescription & description, unsigned int index) Line 114               C++
>                WebKit.dll!WebCore::FontCascadeFonts::determinePitch(const WebCore::FontDescription & description) Line 64  C++
>                 WebKit.dll!WebCore::BreakingContext::handleText(WTF::Vector<WebCore::WordMeasurement,64,WTF::CrashOnOverflow,16> & wordMeasurements, bool & hyphenated, unsigned int & consecutiveHyphenatedLines) Line 731        C++
>                 WebKit.dll!WebCore::LineBreaker::nextLineBreak(WebCore::BidiResolver<WebCore::InlineIterator,WebCore::BidiRun> & resolver, WebCore::LineInfo & lineInfo, WebCore::RenderTextInfo & renderTextInfo, WebCore::FloatingObject * lastFloatFromPreviousLine, unsigned int consecutiveHyphenatedLines, WTF::Vector<WebCore::WordMeasurement,64,WTF::CrashOnOverflow,16> & wordMeasurements) Line 110   C++
>                WebKit.dll!WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange(WebCore::LineLayoutState & layoutState, WebCore::BidiResolver<WebCore::InlineIterator,WebCore::BidiRun> & resolver, const WebCore::InlineIterator & cleanLineStart, const WebCore::BidiStatus & cleanLineBidiStatus, unsigned int consecutiveHyphenatedLines) Line 1260               C++
>                WebKit.dll!WebCore::RenderBlockFlow::layoutRunsAndFloats(WebCore::LineLayoutState & layoutState, bool hasInlineChild) Line 1214    C++
>                WebKit.dll!WebCore::RenderBlockFlow::layoutLineBoxes(bool relayoutChildren, WebCore::LayoutUnit & repaintLogicalTop, WebCore::LayoutUnit & repaintLogicalBottom) Line 1624        C++
>                WebKit.dll!WebCore::RenderBlockFlow::layoutBlock(bool relayoutChildren, WebCore::LayoutUnit pageLogicalHeight) Line 484        C++
>                WebKit.dll!WebCore::RenderBlock::layout() Line 930      C++
>                WebKit.dll!WebCore::RenderBlockFlow::layoutBlockChild(WebCore::RenderBox & child, WebCore::RenderBlockFlow::MarginInfo & marginInfo, WebCore::LayoutUnit & previousFloatLogicalBottom, WebCore::LayoutUnit & maxFloatLogicalBottom) Line 712            C++
>                WebKit.dll!WebCore::RenderBlockFlow::layoutBlockChildren(bool relayoutChildren, WebCore::LayoutUnit & maxFloatLogicalBottom) Line 632              C++
>                WebKit.dll!WebCore::RenderBlockFlow::layoutBlock(bool relayoutChildren, WebCore::LayoutUnit pageLogicalHeight) Line 485        C++
>                WebKit.dll!WebCore::RenderBlock::layout() Line 930      C++
>                WebKit.dll!WebCore::RenderBlockFlow::layoutBlockChild(WebCore::RenderBox & child, WebCore::RenderBlockFlow::MarginInfo & marginInfo, WebCore::LayoutUnit & previousFloatLogicalBottom, WebCore::LayoutUnit & maxFloatLogicalBottom) Line 712            C++
>                WebKit.dll!WebCore::RenderBlockFlow::layoutBlockChildren(bool relayoutChildren, WebCore::LayoutUnit & maxFloatLogicalBottom) Line 632              C++
>                WebKit.dll!WebCore::RenderBlockFlow::layoutBlock(bool relayoutChildren, WebCore::LayoutUnit pageLogicalHeight) Line 485        C++
>                WebKit.dll!WebCore::RenderBlock::layout() Line 930      C++
>                WebKit.dll!WebCore::RenderBlockFlow::layoutBlockChild(WebCore::RenderBox & child, WebCore::RenderBlockFlow::MarginInfo & marginInfo, WebCore::LayoutUnit & previousFloatLogicalBottom, WebCore::LayoutUnit & maxFloatLogicalBottom) Line 712            C++
>                WebKit.dll!WebCore::RenderBlockFlow::layoutBlockChildren(bool relayoutChildren, WebCore::LayoutUnit & maxFloatLogicalBottom) Line 632              C++
>                WebKit.dll!WebCore::RenderBlockFlow::layoutBlock(bool relayoutChildren, WebCore::LayoutUnit pageLogicalHeight) Line 485        C++
>                WebKit.dll!WebCore::RenderBlock::layout() Line 930      C++
>                WebKit.dll!WebCore::RenderBlockFlow::layoutBlockChild(WebCore::RenderBox & child, WebCore::RenderBlockFlow::MarginInfo & marginInfo, WebCore::LayoutUnit & previousFloatLogicalBottom, WebCore::LayoutUnit & maxFloatLogicalBottom) Line 712            C++
>                WebKit.dll!WebCore::RenderBlockFlow::layoutBlockChildren(bool relayoutChildren, WebCore::LayoutUnit & maxFloatLogicalBottom) Line 632              C++
>                WebKit.dll!WebCore::RenderBlockFlow::layoutBlock(bool relayoutChildren, WebCore::LayoutUnit pageLogicalHeight) Line 485        C++
>                WebKit.dll!WebCore::RenderBlock::layout() Line 930      C++
>                WebKit.dll!WebCore::RenderBlockFlow::layoutBlockChild(WebCore::RenderBox & child, WebCore::RenderBlockFlow::MarginInfo & marginInfo, WebCore::LayoutUnit & previousFloatLogicalBottom, WebCore::LayoutUnit & maxFloatLogicalBottom) Line 712            C++
>                WebKit.dll!WebCore::RenderBlockFlow::layoutBlockChildren(bool relayoutChildren, WebCore::LayoutUnit & maxFloatLogicalBottom) Line 632              C++
>                WebKit.dll!WebCore::RenderBlockFlow::layoutBlock(bool relayoutChildren, WebCore::LayoutUnit pageLogicalHeight) Line 485        C++
>                WebKit.dll!WebCore::RenderBlock::layout() Line 930      C++
>                WebKit.dll!WebCore::RenderBlockFlow::insertFloatingObject(WebCore::RenderBox & floatBox) Line 2247                C++
>                WebKit.dll!WebCore::RenderBlockFlow::layoutBlockChildren(bool relayoutChildren, WebCore::LayoutUnit & maxFloatLogicalBottom) Line 627              C++
>                WebKit.dll!WebCore::RenderBlockFlow::layoutBlock(bool relayoutChildren, WebCore::LayoutUnit pageLogicalHeight) Line 485        C++
>                WebKit.dll!WebCore::RenderBlock::layout() Line 930      C++
>                WebKit.dll!WebCore::RenderBlockFlow::layoutBlockChild(WebCore::RenderBox & child, WebCore::RenderBlockFlow::MarginInfo & marginInfo, WebCore::LayoutUnit & previousFloatLogicalBottom, WebCore::LayoutUnit & maxFloatLogicalBottom) Line 712            C++
>                WebKit.dll!WebCore::RenderBlockFlow::layoutBlockChildren(bool relayoutChildren, WebCore::LayoutUnit & maxFloatLogicalBottom) Line 632              C++
>                WebKit.dll!WebCore::RenderBlockFlow::layoutBlock(bool relayoutChildren, WebCore::LayoutUnit pageLogicalHeight) Line 485        C++
>                WebKit.dll!WebCore::RenderBlock::layout() Line 930      C++
>                WebKit.dll!WebCore::RenderBlockFlow::layoutBlockChild(WebCore::RenderBox & child, WebCore::RenderBlockFlow::MarginInfo & marginInfo, WebCore::LayoutUnit & previousFloatLogicalBottom, WebCore::LayoutUnit & maxFloatLogicalBottom) Line 712            C++
>                WebKit.dll!WebCore::RenderBlockFlow::layoutBlockChildren(bool relayoutChildren, WebCore::LayoutUnit & maxFloatLogicalBottom) Line 632              C++
>                WebKit.dll!WebCore::RenderBlockFlow::layoutBlock(bool relayoutChildren, WebCore::LayoutUnit pageLogicalHeight) Line 485        C++
>                WebKit.dll!WebCore::RenderBlock::layout() Line 930      C++
>                WebKit.dll!WebCore::RenderBlockFlow::layoutBlockChild(WebCore::RenderBox & child, WebCore::RenderBlockFlow::MarginInfo & marginInfo, WebCore::LayoutUnit & previousFloatLogicalBottom, WebCore::LayoutUnit & maxFloatLogicalBottom) Line 712            C++
>                WebKit.dll!WebCore::RenderBlockFlow::layoutBlockChildren(bool relayoutChildren, WebCore::LayoutUnit & maxFloatLogicalBottom) Line 632              C++
>                WebKit.dll!WebCore::RenderBlockFlow::layoutBlock(bool relayoutChildren, WebCore::LayoutUnit pageLogicalHeight) Line 485        C++
>                WebKit.dll!WebCore::RenderBlock::layout() Line 930      C++
>                WebKit.dll!WebCore::RenderBlockFlow::layoutBlockChild(WebCore::RenderBox & child, WebCore::RenderBlockFlow::MarginInfo & marginInfo, WebCore::LayoutUnit & previousFloatLogicalBottom, WebCore::LayoutUnit & maxFloatLogicalBottom) Line 712            C++
>                WebKit.dll!WebCore::RenderBlockFlow::layoutBlockChildren(bool relayoutChildren, WebCore::LayoutUnit & maxFloatLogicalBottom) Line 632              C++
>                WebKit.dll!WebCore::RenderBlockFlow::layoutBlock(bool relayoutChildren, WebCore::LayoutUnit pageLogicalHeight) Line 485        C++
>                WebKit.dll!WebCore::RenderBlock::layout() Line 930      C++
>                WebKit.dll!WebCore::RenderBlockFlow::layoutBlockChild(WebCore::RenderBox & child, WebCore::RenderBlockFlow::MarginInfo & marginInfo, WebCore::LayoutUnit & previousFloatLogicalBottom, WebCore::LayoutUnit & maxFloatLogicalBottom) Line 712            C++
>                WebKit.dll!WebCore::RenderBlockFlow::layoutBlockChildren(bool relayoutChildren, WebCore::LayoutUnit & maxFloatLogicalBottom) Line 632              C++
>                WebKit.dll!WebCore::RenderBlockFlow::layoutBlock(bool relayoutChildren, WebCore::LayoutUnit pageLogicalHeight) Line 485        C++
>                WebKit.dll!WebCore::RenderBlock::layout() Line 930      C++
>                WebKit.dll!WebCore::RenderBlockFlow::layoutBlockChild(WebCore::RenderBox & child, WebCore::RenderBlockFlow::MarginInfo & marginInfo, WebCore::LayoutUnit & previousFloatLogicalBottom, WebCore::LayoutUnit & maxFloatLogicalBottom) Line 712            C++
>                WebKit.dll!WebCore::RenderBlockFlow::layoutBlockChildren(bool relayoutChildren, WebCore::LayoutUnit & maxFloatLogicalBottom) Line 632              C++
>                WebKit.dll!WebCore::RenderBlockFlow::layoutBlock(bool relayoutChildren, WebCore::LayoutUnit pageLogicalHeight) Line 485        C++
>                WebKit.dll!WebCore::RenderBlock::layout() Line 930      C++
>                WebKit.dll!WebCore::RenderBlockFlow::layoutBlockChild(WebCore::RenderBox & child, WebCore::RenderBlockFlow::MarginInfo & marginInfo, WebCore::LayoutUnit & previousFloatLogicalBottom, WebCore::LayoutUnit & maxFloatLogicalBottom) Line 712            C++
>                WebKit.dll!WebCore::RenderBlockFlow::layoutBlockChildren(bool relayoutChildren, WebCore::LayoutUnit & maxFloatLogicalBottom) Line 632              C++
>                WebKit.dll!WebCore::RenderBlockFlow::layoutBlock(bool relayoutChildren, WebCore::LayoutUnit pageLogicalHeight) Line 485        C++
>                WebKit.dll!WebCore::RenderBlock::layout() Line 930      C++
>                WebKit.dll!WebCore::RenderBlockFlow::layoutBlockChild(WebCore::RenderBox & child, WebCore::RenderBlockFlow::MarginInfo & marginInfo, WebCore::LayoutUnit & previousFloatLogicalBottom, WebCore::LayoutUnit & maxFloatLogicalBottom) Line 712            C++
>                WebKit.dll!WebCore::RenderBlockFlow::layoutBlockChildren(bool relayoutChildren, WebCore::LayoutUnit & maxFloatLogicalBottom) Line 632              C++
>                WebKit.dll!WebCore::RenderBlockFlow::layoutBlock(bool relayoutChildren, WebCore::LayoutUnit pageLogicalHeight) Line 485        C++
>                WebKit.dll!WebCore::RenderBlock::layout() Line 930      C++
>                WebKit.dll!WebCore::RenderBlockFlow::layoutBlockChild(WebCore::RenderBox & child, WebCore::RenderBlockFlow::MarginInfo & marginInfo, WebCore::LayoutUnit & previousFloatLogicalBottom, WebCore::LayoutUnit & maxFloatLogicalBottom) Line 712            C++
>                WebKit.dll!WebCore::RenderBlockFlow::layoutBlockChildren(bool relayoutChildren, WebCore::LayoutUnit & maxFloatLogicalBottom) Line 632              C++
>                WebKit.dll!WebCore::RenderBlockFlow::layoutBlock(bool relayoutChildren, WebCore::LayoutUnit pageLogicalHeight) Line 485        C++
>                WebKit.dll!WebCore::RenderBlock::layout() Line 930      C++
>                WebKit.dll!WebCore::RenderBlockFlow::layoutBlockChild(WebCore::RenderBox & child, WebCore::RenderBlockFlow::MarginInfo & marginInfo, WebCore::LayoutUnit & previousFloatLogicalBottom, WebCore::LayoutUnit & maxFloatLogicalBottom) Line 712            C++
>                WebKit.dll!WebCore::RenderBlockFlow::layoutBlockChildren(bool relayoutChildren, WebCore::LayoutUnit & maxFloatLogicalBottom) Line 632              C++
>                WebKit.dll!WebCore::RenderBlockFlow::layoutBlock(bool relayoutChildren, WebCore::LayoutUnit pageLogicalHeight) Line 485        C++
>                WebKit.dll!WebCore::RenderBlock::layout() Line 930      C++
>                WebKit.dll!WebCore::RenderBlockFlow::layoutBlockChild(WebCore::RenderBox & child, WebCore::RenderBlockFlow::MarginInfo & marginInfo, WebCore::LayoutUnit & previousFloatLogicalBottom, WebCore::LayoutUnit & maxFloatLogicalBottom) Line 712            C++
>                WebKit.dll!WebCore::RenderBlockFlow::layoutBlockChildren(bool relayoutChildren, WebCore::LayoutUnit & maxFloatLogicalBottom) Line 632              C++
>                WebKit.dll!WebCore::RenderBlockFlow::layoutBlock(bool relayoutChildren, WebCore::LayoutUnit pageLogicalHeight) Line 485        C++
>                WebKit.dll!WebCore::RenderBlock::layout() Line 930      C++
>                WebKit.dll!WebCore::RenderView::layoutContent(const WebCore::LayoutState & state) Line 256           C++
>                WebKit.dll!WebCore::RenderView::layout() Line 382      C++
>                WebKit.dll!WebCore::FrameView::layout(bool allowSubtree) Line 1429 C++
>                WebKit.dll!WebCore::Document::updateLayout() Line 1889        C++
>                 WebKit.dll!WebCore::Document::updateLayoutIgnorePendingStylesheets(WebCore::Document::RunPostLayoutTasks runPostLayoutTasks) Line 1922  C++
>                WebKit.dll!WebCore::Element::getBoundingClientRect() Line 1071          C++
>                WebKit.dll!WebCore::jsElementPrototypeFunctionGetBoundingClientRect(JSC::ExecState * exec) Line 5165                C++
>                [External Code] 
>                JavaScriptCore.dll!llint_entry() Line 8217               Unknown
>                [External Code] 
>                JavaScriptCore.dll!llint_entry() Line 8217               Unknown
>  
>  
> From: Vienneau, Christopher 
> Sent: Friday, November 20, 2015 5:20 PM
> To: 'WebKit Development' <webkit-dev at lists.webkit.org <mailto:webkit-dev at lists.webkit.org>>
> Subject: RE: Memory leak tracking in WebKit
>  
> To add some more information to this, the allocation that seems to have the largest delta amount of allocations between test iterations is:
> \wtf\local\wtf\hashtable.h(1248): WTF::HashTable<WTF::RefPtr<WTF::UniquedStringImpl>,WTF::KeyValuePair<WTF::RefPtr<WTF::UniquedStringImpl>,JSC::VariableEnvironmentEntry>,WTF::KeyValuePairKeyExtractor<WTF::KeyValuePair<WTF::RefPtr<WTF::UniquedStringImpl>,JSC::VariableEnvironmentEntry> >,JSC::IdentifierRepHash,WTF::HashMap<WTF::RefPtr<WTF::UniquedStringImpl>,JSC::VariableEnvironmentEntry,JSC::IdentifierRepHash,WTF::HashTraits<WTF::RefPtr<WTF::UniquedStringImpl> >,JSC::VariableEnvironmentEntryHashTraits>::KeyValuePairTraits,WTF::HashTraits<WTF::RefPtr<WTF::UniquedStringImpl> > >::HashTable<WTF::RefPtr<WTF::UniquedStringImpl>,WTF::KeyValuePair<WTF::RefPtr<WTF::UniquedStringImpl>,JSC::VariableEnvironmentEntry>,WTF::KeyValuePairKeyExtractor<WTF::KeyValuePair<WTF::RefPtr<WTF::UniquedStringImpl>,JSC::VariableEnvironmentEntry> >,JSC::IdentifierRepHash,WTF::HashMap<WTF::RefPtr<WTF::UniquedStringImpl>,JSC::VariableEnvironmentEntry,JSC::IdentifierRepHash,WTF::HashTraits<WTF::RefPtr<WTF::UniquedStringImpl> >,JSC::VariableEnvironmentEntryHashTraits>::KeyValuePairTraits,WTF::HashTraits<WTF::RefPtr<WTF::UniquedStringImpl> > > + 153
> \javascriptcore\local\javascriptcore\parser\parser.cpp(1347): JSC::Parser<JSC::Lexer<unsigned char> >::parseTryStatement<JSC::ASTBuilder> + 1984
> \javascriptcore\local\javascriptcore\parser\parser.cpp(1480): JSC::Parser<JSC::Lexer<unsigned char> >::parseStatement<JSC::ASTBuilder> + 671
> \javascriptcore\local\javascriptcore\parser\parser.cpp(497): JSC::Parser<JSC::Lexer<unsigned char> >::parseStatementListItem<JSC::ASTBuilder> + 100
> \javascriptcore\local\javascriptcore\parser\parser.cpp(379): JSC::Parser<JSC::Lexer<unsigned char> >::parseSourceElements<JSC::ASTBuilder> + 745
> \javascriptcore\local\javascriptcore\parser\parser.cpp(1406): JSC::Parser<JSC::Lexer<unsigned char> >::parseBlockStatement<JSC::ASTBuilder> + 741
> \javascriptcore\local\javascriptcore\parser\parser.cpp(1433): JSC::Parser<JSC::Lexer<unsigned char> >::parseStatement<JSC::ASTBuilder> + 179
> \javascriptcore\local\javascriptcore\parser\parser.cpp(497): JSC::Parser<JSC::Lexer<unsigned char> >::parseStatementListItem<JSC::ASTBuilder> + 100
> \javascriptcore\local\javascriptcore\parser\parser.cpp(379): JSC::Parser<JSC::Lexer<unsigned char> >::parseSourceElements<JSC::ASTBuilder> + 171
> \javascriptcore\local\javascriptcore\parser\parser.cpp(277): JSC::Parser<JSC::Lexer<unsigned char> >::parseInner + 654
>  
> To me this likely indicates this is what is leaking, does this bring up any ideas for anyone?
>  
> Chris
>  
> From: Vienneau, Christopher 
> Sent: Thursday, November 19, 2015 10:25 PM
> To: WebKit Development <webkit-dev at lists.webkit.org <mailto:webkit-dev at lists.webkit.org>>
> Subject: Memory leak tracking in WebKit
>  
> Hi,
>  
> I’m currently trying to track a leak in our port of WebKit.  If left to soak in an automated test, looping over 100 websites, visiting each for 10 seconds, for an evening, I’m finding that memory usage goes up to well over a gigabyte (eventually crashing).  I know that a lot of things could remain cached but I’m calling code very similar to MemoryPressureHandler::releaseMemory(Critical::Yes, Synchronous::Yes) before checking the memory counters built into our application.  Manually trying to reproduce the leak, I find that many pages don’t seem to exhibit any identifiable increase in memory when; starting from a simple page, clearing the cache, visiting the test page, returning to the simple page and finally clearing the cache.  I have identified some pages which seem to be causing a problem such as cnn.com <http://cnn.com/>, when visiting this page it appears I can expect to lose 100-500k.
>  
> Our current code is based off of 188436:
> -Are there any known memory leaks that I should pick up a fix for? (I searched but nothing seemed relevant to the current code I have).
> -Are there any tools or techniques that can be recommended for identifying a leak?  I’ve been improving our debug features of our memory system, but I’ve been unable to solidly identify where the memory is going.
> -I have the WinCairo sample built at the same revision, are there any memory tools that can be used with it to identify if the leak exists there too?
>  
> Thanks for any suggestions
>  
> Chris Vienneau
> <WebKitMessageLoop.cpp><Common.cpp>_______________________________________________
> webkit-dev mailing list
> webkit-dev at lists.webkit.org <mailto:webkit-dev at lists.webkit.org>
> https://lists.webkit.org/mailman/listinfo/webkit-dev <https://lists.webkit.org/mailman/listinfo/webkit-dev>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-dev/attachments/20151130/39c420b0/attachment.html>


More information about the webkit-dev mailing list