Bug 99805

Summary: Add Stack statistics collection mechanism
Product: WebKit Reporter: Mark Lam <mark.lam>
Component: Web Template FrameworkAssignee: Mark Lam <mark.lam>
Status: RESOLVED FIXED    
Severity: Normal CC: barraclough, benjamin, eric.carlson, eric, feature-media-reviews, fmalita, fpizlo, ggaren, levin+threading, mhahnenberg, mifenton, msaboff, oliver, pdr, schenney, tkent, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Fix. ggaren: review+

Mark Lam
Reported 2012-10-18 22:04:37 PDT
Adding a utility to collect statistics on native stack usage in JSC and WebCore. This code is disabled by default, and should effectively be a no-op. Also made use of the mechanism and applied it in JSC and WebCore to do some of the necessary stack sampling. Again, this added code are effectively no-op unless the mechanism is enabled.
Attachments
Fix. (59.83 KB, patch)
2012-10-18 23:10 PDT, Mark Lam
ggaren: review+
Mark Lam
Comment 1 2012-10-18 23:10:11 PDT
Created attachment 169552 [details] Fix. Also renamed StackBounds::recursiveCheck() to StackBounds::isSafeToRecurse().
Geoffrey Garen
Comment 2 2012-10-19 11:21:32 PDT
Comment on attachment 169552 [details] Fix. View in context: https://bugs.webkit.org/attachment.cgi?id=169552&action=review Please remove the change to Options.cpp. > Source/WTF/wtf/StackStats.cpp:43 > +FILE* StackStats::s_logFile = 0; Can we use dataLog() instead? > Source/WTF/wtf/StackStats.cpp:60 > +#define STACK_STATS_LOG_FILE "/tmp/stack-stats.log" We typically prefer "static const char* const" vs macro. > Source/WTF/wtf/StackStats.cpp:312 > + fprintf(log, " LAYOUT %p diff %d/%.1fk/max %.1fk | reentry %d/max %d | height %.1fk/max %.1fk | stack %p size %.1fk\n", and here too
Mark Lam
Comment 3 2012-10-19 13:11:51 PDT
Changes made, and landed in r131938: <http://trac.webkit.org/changeset/131938>.
Note You need to log in before you can comment on or make changes to this bug.