diff options
Diffstat (limited to 'WebKit/mac/Misc/WebCoreStatistics.mm')
-rw-r--r-- | WebKit/mac/Misc/WebCoreStatistics.mm | 34 |
1 files changed, 25 insertions, 9 deletions
diff --git a/WebKit/mac/Misc/WebCoreStatistics.mm b/WebKit/mac/Misc/WebCoreStatistics.mm index 2fe5710..57b59a4 100644 --- a/WebKit/mac/Misc/WebCoreStatistics.mm +++ b/WebKit/mac/Misc/WebCoreStatistics.mm @@ -38,6 +38,7 @@ #import <WebCore/GlyphPageTreeNode.h> #import <WebCore/IconDatabase.h> #import <WebCore/JSDOMWindow.h> +#import <WebCore/PageCache.h> #import <WebCore/RenderTreeAsText.h> #import <WebCore/RenderView.h> @@ -53,31 +54,31 @@ using namespace WebCore; + (size_t)javaScriptObjectsCount { - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); return JSDOMWindow::commonJSGlobalData()->heap.objectCount(); } + (size_t)javaScriptGlobalObjectsCount { - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); return JSDOMWindow::commonJSGlobalData()->heap.globalObjectCount(); } + (size_t)javaScriptProtectedObjectsCount { - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); return JSDOMWindow::commonJSGlobalData()->heap.protectedObjectCount(); } + (size_t)javaScriptProtectedGlobalObjectsCount { - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); return JSDOMWindow::commonJSGlobalData()->heap.protectedGlobalObjectCount(); } + (NSCountedSet *)javaScriptProtectedObjectTypeCounts { - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); NSCountedSet *result = [NSCountedSet set]; @@ -142,13 +143,13 @@ using namespace WebCore; + (BOOL)shouldPrintExceptions { - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); return Console::shouldPrintExceptions(); } + (void)setShouldPrintExceptions:(BOOL)print { - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); Console::setShouldPrintExceptions(print); } @@ -175,7 +176,7 @@ using namespace WebCore; + (NSDictionary *)memoryStatistics { WTF::FastMallocStatistics fastMallocStatistics = WTF::fastMallocStatistics(); - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); Heap::Statistics jsHeapStatistics = JSDOMWindow::commonJSGlobalData()->heap.statistics(); return [NSDictionary dictionaryWithObjectsAndKeys: [NSNumber numberWithInt:fastMallocStatistics.heapSize], @"FastMallocHeapSize", @@ -192,6 +193,21 @@ using namespace WebCore; WTF::releaseFastMallocFreeMemory(); } ++ (int)cachedPageCount +{ + return pageCache()->pageCount(); +} + ++ (int)cachedFrameCount +{ + return pageCache()->frameCount(); +} + ++ (int)autoreleasedPageCount +{ + return pageCache()->autoreleasedPageCount(); +} + // Deprecated + (size_t)javaScriptNoGCAllowedObjectsCount { @@ -200,7 +216,7 @@ using namespace WebCore; + (size_t)javaScriptReferencedObjectsCount { - JSLock lock(false); + JSLock lock(SilenceAssertionsOnly); return JSDOMWindow::commonJSGlobalData()->heap.protectedObjectCount(); } |