Changeset 67265 in webkit


Ignore:
Timestamp:
Sep 10, 2010, 6:40:45 PM (15 years ago)
Author:
Stephanie Lewis
Message:

JavaScriptCore: Refactor JavaScriptCore memory statistics so that WebKit doesn't need to know
about the JIT and other implementation details of JavaScriptCore. Necessary
to fix PPC build.

Reviewed by Alexey Proskuryakov.

https://bugs.webkit.org/show_bug.cgi?id=45528

(JSC::memoryStatistics):

  • runtime/MemoryStatistics.h: Added.

WebKit/mac: Refactor JavaScriptCore memory statistics so that WebKit doesn't need to know about the JIT and
other implementation details of JavaScriptCore. Necessary to fix PPC build.

Reviewed by Alexey Proskuryakov.

https://bugs.webkit.org/show_bug.cgi?id=45528

  • Misc/WebCoreStatistics.mm:

(+[WebCoreStatistics memoryStatistics]):

Location:
trunk
Files:
2 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/ChangeLog

    r67146 r67265  
     12010-09-10  Stephanie Lewis  <slewis@apple.com>
     2
     3        Reviewed by Alexey Proskuryakov.
     4       
     5        Refactor JavaScriptCore memory statistics so that WebKit doesn't need to know
     6        about the JIT and other implementation details of JavaScriptCore.  Necessary
     7        to fix PPC build.
     8       
     9        https://bugs.webkit.org/show_bug.cgi?id=45528
     10
     11        * JavaScriptCore.exp:
     12        * JavaScriptCore.xcodeproj/project.pbxproj:
     13        * runtime/MemoryStatistics.cpp: Added.
     14        (JSC::memoryStatistics):
     15        * runtime/MemoryStatistics.h: Added.
     16
    1172010-09-09  Michael Saboff  <msaboff@apple.com>
    218
  • trunk/JavaScriptCore/JavaScriptCore.exp

    r67146 r67265  
    133133__ZN3JSC12JSGlobalData6createENS_15ThreadStackTypeE
    134134__ZN3JSC12JSGlobalDataD1Ev
    135 __ZN3JSC12RegisterFile18committedByteCountEv
    136135__ZN3JSC12SamplingTool5setupEv
    137136__ZN3JSC12SmallStrings17createEmptyStringEPNS_12JSGlobalDataE
     
    152151__ZN3JSC13SamplingFlags7s_flagsE
    153152__ZN3JSC13StatementNode6setLocEii
     153__ZN3JSC14heapStatisticsEPNS_12JSGlobalDataE
    154154__ZN3JSC14JSGlobalObject10globalExecEv
    155155__ZN3JSC14JSGlobalObject12defineGetterEPNS_9ExecStateERKNS_10IdentifierEPNS_8JSObjectEj
     
    194194__ZN3JSC18PropertyDescriptor9setGetterENS_7JSValueE
    195195__ZN3JSC18PropertyDescriptor9setSetterENS_7JSValueE
    196 __ZN3JSC19ExecutableAllocator18committedByteCountEv
    197196__ZN3JSC19initializeThreadingEv
    198197__ZN3JSC20MarkedArgumentBuffer10slowAppendENS_7JSValueE
    199198__ZN3JSC20createReferenceErrorEPNS_9ExecStateERKNS_7UStringE
     199__ZN3JSC22globalMemoryStatisticsEv
    200200__ZN3JSC23AbstractSamplingCounter4dumpEv
    201201__ZN3JSC23objectProtoFuncToStringEPNS_9ExecStateE
  • trunk/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj

    r66968 r67265  
    259259                86EAC49C0F93E8D1008EC948 /* RegexPattern.h in Headers */ = {isa = PBXBuildFile; fileRef = 86EAC4940F93E8D1008EC948 /* RegexPattern.h */; };
    260260                86F38859121130CA007A7CE3 /* AtomicStringHash.h in Headers */ = {isa = PBXBuildFile; fileRef = 86F38858121130CA007A7CE3 /* AtomicStringHash.h */; settings = {ATTRIBUTES = (Private, ); }; };
     261                90213E3D123A40C200D422F3 /* MemoryStatistics.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 90213E3B123A40C200D422F3 /* MemoryStatistics.cpp */; };
     262                90213E3E123A40C200D422F3 /* MemoryStatistics.h in Headers */ = {isa = PBXBuildFile; fileRef = 90213E3C123A40C200D422F3 /* MemoryStatistics.h */; settings = {ATTRIBUTES = (Private, ); }; };
    261263                905B02AE0E28640F006DF882 /* RefCountedLeakCounter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 905B02AD0E28640F006DF882 /* RefCountedLeakCounter.cpp */; };
    262264                90D3469C0E285280009492EE /* RefCountedLeakCounter.h in Headers */ = {isa = PBXBuildFile; fileRef = 90D3469B0E285280009492EE /* RefCountedLeakCounter.h */; settings = {ATTRIBUTES = (Private, ); }; };
     
    860862                86EAC4940F93E8D1008EC948 /* RegexPattern.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegexPattern.h; path = yarr/RegexPattern.h; sourceTree = "<group>"; };
    861863                86F38858121130CA007A7CE3 /* AtomicStringHash.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AtomicStringHash.h; path = text/AtomicStringHash.h; sourceTree = "<group>"; };
     864                90213E3B123A40C200D422F3 /* MemoryStatistics.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MemoryStatistics.cpp; sourceTree = "<group>"; };
     865                90213E3C123A40C200D422F3 /* MemoryStatistics.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MemoryStatistics.h; sourceTree = "<group>"; };
    862866                905B02AD0E28640F006DF882 /* RefCountedLeakCounter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RefCountedLeakCounter.cpp; sourceTree = "<group>"; };
    863867                90D3469B0E285280009492EE /* RefCountedLeakCounter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RefCountedLeakCounter.h; sourceTree = "<group>"; };
     
    17361740                                F692A86A0255597D01FF60F7 /* MathObject.cpp */,
    17371741                                F692A86B0255597D01FF60F7 /* MathObject.h */,
     1742                                90213E3B123A40C200D422F3 /* MemoryStatistics.cpp */,
     1743                                90213E3C123A40C200D422F3 /* MemoryStatistics.h */,
    17381744                                BC02E9080E1839DB000F9297 /* NativeErrorConstructor.cpp */,
    17391745                                BC02E9090E1839DB000F9297 /* NativeErrorConstructor.h */,
     
    23082314                                9714AF5F122F32070092D9F5 /* ParsedURL.h in Headers */,
    23092315                                9714AF60122F32070092D9F5 /* URLString.h in Headers */,
     2316                                90213E3E123A40C200D422F3 /* MemoryStatistics.h in Headers */,
    23102317                        );
    23112318                        runOnlyForDeploymentPostprocessing = 0;
     
    27612768                                9714AF46122F28850092D9F5 /* URLSegments.cpp in Sources */,
    27622769                                9714AF5E122F32070092D9F5 /* ParsedURL.cpp in Sources */,
     2770                                90213E3D123A40C200D422F3 /* MemoryStatistics.cpp in Sources */,
    27632771                        );
    27642772                        runOnlyForDeploymentPostprocessing = 0;
  • trunk/WebKit/mac/ChangeLog

    r67264 r67265  
     12010-09-10  Stephanie Lewis  <slewis@apple.com>
     2
     3        Reviewed by Alexey Proskuryakov.
     4
     5        Refactor JavaScriptCore memory statistics so that WebKit doesn't need to know about the JIT and
     6        other implementation details of JavaScriptCore.  Necessary to fix PPC build.
     7       
     8        https://bugs.webkit.org/show_bug.cgi?id=45528
     9
     10        * Misc/WebCoreStatistics.mm:
     11        (+[WebCoreStatistics memoryStatistics]):
     12
    1132010-09-10  Darin Adler  <darin@apple.com>
    214
  • trunk/WebKit/mac/Misc/WebCoreStatistics.mm

    r67130 r67265  
    3030
    3131#import "DOMElementInternal.h"
    32 #import <JavaScriptCore/RegisterFile.h>
    33 #import <JavaScriptCore/ExecutableAllocator.h>
    3432#import "WebCache.h"
    3533#import "WebFrameInternal.h"
    36 #import <runtime/JSLock.h>
     34#import <JavaScriptCore/JSLock.h>
     35#import <JavaScriptCore/MemoryStatistics.h>
    3736#import <WebCore/Console.h>
    3837#import <WebCore/FontCache.h>
     
    197196{
    198197    WTF::FastMallocStatistics fastMallocStatistics = WTF::fastMallocStatistics();
    199     JSLock lock(SilenceAssertionsOnly);
    200     Heap::Statistics jsHeapStatistics = JSDOMWindow::commonJSGlobalData()->heap.statistics();
    201     size_t jscStackBytes = RegisterFile::committedByteCount();
    202     size_t jscJITBytes = ExecutableAllocator::committedByteCount();
     198   
     199    JSLock lock(SilenceAssertionsOnly);
     200    Heap::Statistics heapMemoryStats = heapStatistics(JSDOMWindow::commonJSGlobalData());
     201    GlobalMemoryStatistics globalMemoryStats = globalMemoryStatistics();
     202   
    203203    return [NSDictionary dictionaryWithObjectsAndKeys:
    204204                [NSNumber numberWithInt:fastMallocStatistics.reservedVMBytes], @"FastMallocReservedVMBytes",
    205205                [NSNumber numberWithInt:fastMallocStatistics.committedVMBytes], @"FastMallocCommittedVMBytes",
    206206                [NSNumber numberWithInt:fastMallocStatistics.freeListBytes], @"FastMallocFreeListBytes",
    207                 [NSNumber numberWithInt:jsHeapStatistics.size], @"JavaScriptHeapSize",
    208                 [NSNumber numberWithInt:jsHeapStatistics.free], @"JavaScriptFreeSize",
    209                 [NSNumber numberWithUnsignedInt:(unsigned int)jscStackBytes], @"JavaScriptStackSize",
    210                 [NSNumber numberWithUnsignedInt:(unsigned int)jscJITBytes], @"JavaScriptJITSize",
     207                [NSNumber numberWithInt:heapMemoryStats.size], @"JavaScriptHeapSize",
     208                [NSNumber numberWithInt:heapMemoryStats.free], @"JavaScriptFreeSize",
     209                [NSNumber numberWithUnsignedInt:(unsigned int)globalMemoryStats.stackBytes], @"JavaScriptStackSize",
     210                [NSNumber numberWithUnsignedInt:(unsigned int)globalMemoryStats.JITBytes], @"JavaScriptJITSize",
    211211            nil];
    212212}
Note: See TracChangeset for help on using the changeset viewer.