diff options
author | Steve Block <steveblock@google.com> | 2010-09-29 17:32:26 +0100 |
---|---|---|
committer | Steve Block <steveblock@google.com> | 2010-09-29 17:35:08 +0100 |
commit | 68513a70bcd92384395513322f1b801e7bf9c729 (patch) | |
tree | 161b50f75a5921d61731bb25e730005994fcec85 /WebKit/mac/Misc/WebCoreStatistics.mm | |
parent | fd5c6425ce58eb75211be7718d5dee960842a37e (diff) | |
download | external_webkit-68513a70bcd92384395513322f1b801e7bf9c729.zip external_webkit-68513a70bcd92384395513322f1b801e7bf9c729.tar.gz external_webkit-68513a70bcd92384395513322f1b801e7bf9c729.tar.bz2 |
Merge WebKit at r67908: Initial merge by Git
Change-Id: I43a553e7b3299b28cb6ee8aa035ed70fe342b972
Diffstat (limited to 'WebKit/mac/Misc/WebCoreStatistics.mm')
-rw-r--r-- | WebKit/mac/Misc/WebCoreStatistics.mm | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/WebKit/mac/Misc/WebCoreStatistics.mm b/WebKit/mac/Misc/WebCoreStatistics.mm index cc68cef..5b5a1bc 100644 --- a/WebKit/mac/Misc/WebCoreStatistics.mm +++ b/WebKit/mac/Misc/WebCoreStatistics.mm @@ -29,11 +29,10 @@ #import "WebCoreStatistics.h" #import "DOMElementInternal.h" -#import <JavaScriptCore/RegisterFile.h> -#import <JavaScriptCore/ExecutableAllocator.h> #import "WebCache.h" #import "WebFrameInternal.h" -#import <runtime/JSLock.h> +#import <JavaScriptCore/JSLock.h> +#import <JavaScriptCore/MemoryStatistics.h> #import <WebCore/Console.h> #import <WebCore/FontCache.h> #import <WebCore/Frame.h> @@ -196,18 +195,19 @@ using namespace WebCore; + (NSDictionary *)memoryStatistics { WTF::FastMallocStatistics fastMallocStatistics = WTF::fastMallocStatistics(); + JSLock lock(SilenceAssertionsOnly); - Heap::Statistics jsHeapStatistics = JSDOMWindow::commonJSGlobalData()->heap.statistics(); - size_t jscStackBytes = RegisterFile::committedByteCount(); - size_t jscJITBytes = ExecutableAllocator::committedByteCount(); + Heap::Statistics heapMemoryStats = heapStatistics(JSDOMWindow::commonJSGlobalData()); + GlobalMemoryStatistics globalMemoryStats = globalMemoryStatistics(); + return [NSDictionary dictionaryWithObjectsAndKeys: [NSNumber numberWithInt:fastMallocStatistics.reservedVMBytes], @"FastMallocReservedVMBytes", [NSNumber numberWithInt:fastMallocStatistics.committedVMBytes], @"FastMallocCommittedVMBytes", [NSNumber numberWithInt:fastMallocStatistics.freeListBytes], @"FastMallocFreeListBytes", - [NSNumber numberWithInt:jsHeapStatistics.size], @"JavaScriptHeapSize", - [NSNumber numberWithInt:jsHeapStatistics.free], @"JavaScriptFreeSize", - [NSNumber numberWithUnsignedInt:(unsigned int)jscStackBytes], @"JavaScriptStackSize", - [NSNumber numberWithUnsignedInt:(unsigned int)jscJITBytes], @"JavaScriptJITSize", + [NSNumber numberWithInt:heapMemoryStats.size], @"JavaScriptHeapSize", + [NSNumber numberWithInt:heapMemoryStats.free], @"JavaScriptFreeSize", + [NSNumber numberWithUnsignedInt:(unsigned int)globalMemoryStats.stackBytes], @"JavaScriptStackSize", + [NSNumber numberWithUnsignedInt:(unsigned int)globalMemoryStats.JITBytes], @"JavaScriptJITSize", nil]; } |