Diff
Modified: trunk/Source/_javascript_Core/CMakeLists.txt (165281 => 165282)
--- trunk/Source/_javascript_Core/CMakeLists.txt 2014-03-07 21:15:15 UTC (rev 165281)
+++ trunk/Source/_javascript_Core/CMakeLists.txt 2014-03-07 21:28:43 UTC (rev 165282)
@@ -215,6 +215,7 @@
heap/CopiedSpace.cpp
heap/CopyVisitor.cpp
heap/DeferGC.cpp
+ heap/GCActivityCallback.cpp
heap/GCThread.cpp
heap/GCThreadSharedData.cpp
heap/HandleSet.cpp
@@ -372,7 +373,6 @@
runtime/FunctionConstructor.cpp
runtime/FunctionExecutableDump.cpp
runtime/FunctionPrototype.cpp
- runtime/GCActivityCallback.cpp
runtime/GetterSetter.cpp
runtime/Identifier.cpp
runtime/IndexingType.cpp
Modified: trunk/Source/_javascript_Core/ChangeLog (165281 => 165282)
--- trunk/Source/_javascript_Core/ChangeLog 2014-03-07 21:15:15 UTC (rev 165281)
+++ trunk/Source/_javascript_Core/ChangeLog 2014-03-07 21:28:43 UTC (rev 165282)
@@ -1,3 +1,22 @@
+2014-03-07 Mark Hahnenberg <[email protected]>
+
+ Move GCActivityCallback to heap
+ https://bugs.webkit.org/show_bug.cgi?id=129457
+
+ Reviewed by Geoffrey Garen.
+
+ All the other GC timer related stuff is there already.
+
+ * CMakeLists.txt:
+ * GNUmakefile.list.am:
+ * _javascript_Core.vcxproj/_javascript_Core.vcxproj:
+ * _javascript_Core.vcxproj/_javascript_Core.vcxproj.filters:
+ * _javascript_Core.xcodeproj/project.pbxproj:
+ * heap/GCActivityCallback.cpp: Copied from Source/_javascript_Core/runtime/GCActivityCallback.cpp.
+ * heap/GCActivityCallback.h: Copied from Source/_javascript_Core/runtime/GCActivityCallback.h.
+ * runtime/GCActivityCallback.cpp: Removed.
+ * runtime/GCActivityCallback.h: Removed.
+
2014-03-07 Andrew Trick <[email protected]>
Correct a comment typo from:
Modified: trunk/Source/_javascript_Core/GNUmakefile.list.am (165281 => 165282)
--- trunk/Source/_javascript_Core/GNUmakefile.list.am 2014-03-07 21:15:15 UTC (rev 165281)
+++ trunk/Source/_javascript_Core/GNUmakefile.list.am 2014-03-07 21:28:43 UTC (rev 165282)
@@ -557,6 +557,8 @@
Source/_javascript_Core/heap/DeferGC.cpp \
Source/_javascript_Core/heap/DeferGC.h \
Source/_javascript_Core/heap/DelayedReleaseScope.h \
+ Source/_javascript_Core/heap/GCActivityCallback.cpp \
+ Source/_javascript_Core/heap/GCActivityCallback.h \
Source/_javascript_Core/heap/GCSegmentedArray.h \
Source/_javascript_Core/heap/GCSegmentedArrayInlines.h \
Source/_javascript_Core/heap/GCAssertions.h \
@@ -995,8 +997,6 @@
Source/_javascript_Core/runtime/FunctionExecutableDump.h \
Source/_javascript_Core/runtime/FunctionPrototype.cpp \
Source/_javascript_Core/runtime/FunctionPrototype.h \
- Source/_javascript_Core/runtime/GCActivityCallback.cpp \
- Source/_javascript_Core/runtime/GCActivityCallback.h \
Source/_javascript_Core/runtime/GenericTypedArrayView.h \
Source/_javascript_Core/runtime/GenericTypedArrayViewInlines.h \
Source/_javascript_Core/runtime/GetterSetter.cpp \
Modified: trunk/Source/_javascript_Core/_javascript_Core.vcxproj/_javascript_Core.vcxproj (165281 => 165282)
--- trunk/Source/_javascript_Core/_javascript_Core.vcxproj/_javascript_Core.vcxproj 2014-03-07 21:15:15 UTC (rev 165281)
+++ trunk/Source/_javascript_Core/_javascript_Core.vcxproj/_javascript_Core.vcxproj 2014-03-07 21:28:43 UTC (rev 165282)
@@ -463,6 +463,7 @@
<ClCompile Include="..\heap\CopiedSpace.cpp" />
<ClCompile Include="..\heap\CopyVisitor.cpp" />
<ClCompile Include="..\heap\DeferGC.cpp" />
+ <ClCompile Include="..\heap\GCActivityCallback.cpp" />
<ClCompile Include="..\heap\GCThread.cpp" />
<ClCompile Include="..\heap\GCThreadSharedData.cpp" />
<ClCompile Include="..\heap\HandleSet.cpp" />
@@ -619,7 +620,6 @@
<ClCompile Include="..\runtime\FunctionConstructor.cpp" />
<ClCompile Include="..\runtime\FunctionExecutableDump.cpp" />
<ClCompile Include="..\runtime\FunctionPrototype.cpp" />
- <ClCompile Include="..\runtime\GCActivityCallback.cpp" />
<ClCompile Include="..\runtime\GetterSetter.cpp" />
<ClCompile Include="..\runtime\Identifier.cpp" />
<ClCompile Include="..\runtime\IndexingType.cpp" />
@@ -1043,6 +1043,7 @@
<ClInclude Include="..\heap\CopyWriteBarrier.h" />
<ClInclude Include="..\heap\DeferGC.h" />
<ClInclude Include="..\heap\DelayedReleaseScope.h" />
+ <ClInclude Include="..\heap\GCActivityCallback.h" />
<ClInclude Include="..\heap\GCSegmentedArray.h" />
<ClInclude Include="..\heap\GCSegmentedArrayInlines.h" />
<ClInclude Include="..\heap\GCAssertions.h" />
@@ -1267,7 +1268,6 @@
<ClInclude Include="..\runtime\FunctionConstructor.h" />
<ClInclude Include="..\runtime\FunctionExecutableDump.h" />
<ClInclude Include="..\runtime\FunctionPrototype.h" />
- <ClInclude Include="..\runtime\GCActivityCallback.h" />
<ClInclude Include="..\runtime\GenericTypedArrayView.h" />
<ClInclude Include="..\runtime\GenericTypedArrayViewInlines.h" />
<ClInclude Include="..\runtime\GetterSetter.h" />
Modified: trunk/Source/_javascript_Core/_javascript_Core.vcxproj/_javascript_Core.vcxproj.filters (165281 => 165282)
--- trunk/Source/_javascript_Core/_javascript_Core.vcxproj/_javascript_Core.vcxproj.filters 2014-03-07 21:15:15 UTC (rev 165281)
+++ trunk/Source/_javascript_Core/_javascript_Core.vcxproj/_javascript_Core.vcxproj.filters 2014-03-07 21:28:43 UTC (rev 165282)
@@ -228,6 +228,9 @@
<ClCompile Include="..\heap\CopyVisitor.cpp">
<Filter>heap</Filter>
</ClCompile>
+ <ClCompile Include="..\heap\GCActivityCallback.cpp">
+ <Filter>heap</Filter>
+ </ClCompile>
<ClCompile Include="..\heap\GCThread.cpp">
<Filter>heap</Filter>
</ClCompile>
@@ -570,9 +573,6 @@
<ClCompile Include="..\runtime\FunctionPrototype.cpp">
<Filter>runtime</Filter>
</ClCompile>
- <ClCompile Include="..\runtime\GCActivityCallback.cpp">
- <Filter>runtime</Filter>
- </ClCompile>
<ClCompile Include="..\runtime\GetterSetter.cpp">
<Filter>runtime</Filter>
</ClCompile>
@@ -1685,6 +1685,9 @@
<ClInclude Include="..\heap\DeferGC.h">
<Filter>heap</Filter>
</ClInclude>
+ <ClInclude Include="..\heap\GCActivityCallback.h">
+ <Filter>heap</Filter>
+ </ClInclude>
<ClInclude Include="..\heap\GCSegmentedArray.h">
<Filter>heap</Filter>
</ClInclude>
@@ -2198,9 +2201,6 @@
<ClInclude Include="..\runtime\FunctionPrototype.h">
<Filter>runtime</Filter>
</ClInclude>
- <ClInclude Include="..\runtime\GCActivityCallback.h">
- <Filter>runtime</Filter>
- </ClInclude>
<ClInclude Include="..\runtime\GetterSetter.h">
<Filter>runtime</Filter>
</ClInclude>
Modified: trunk/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj (165281 => 165282)
--- trunk/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj 2014-03-07 21:15:15 UTC (rev 165281)
+++ trunk/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj 2014-03-07 21:28:43 UTC (rev 165282)
@@ -784,6 +784,8 @@
2A6F462617E959CE00C45C98 /* HeapOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = 2A6F462517E959CE00C45C98 /* HeapOperation.h */; settings = {ATTRIBUTES = (Private, ); }; };
2A7A58EF1808A4C40020BDF7 /* DeferGC.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2A7A58EE1808A4C40020BDF7 /* DeferGC.cpp */; };
2AAAA31218BD49D100394CC8 /* StructureIDBlob.h in Headers */ = {isa = PBXBuildFile; fileRef = 2AAAA31018BD49D100394CC8 /* StructureIDBlob.h */; settings = {ATTRIBUTES = (Private, ); }; };
+ 2AACE63C18CA5A0300ED0191 /* GCActivityCallback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2AACE63A18CA5A0300ED0191 /* GCActivityCallback.cpp */; };
+ 2AACE63D18CA5A0300ED0191 /* GCActivityCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = 2AACE63B18CA5A0300ED0191 /* GCActivityCallback.h */; settings = {ATTRIBUTES = (Private, ); }; };
2AAD964A18569417001F93BE /* RecursiveAllocationScope.h in Headers */ = {isa = PBXBuildFile; fileRef = 2AAD964918569417001F93BE /* RecursiveAllocationScope.h */; };
2AC922BB18A16182003CE0FB /* FTLDWARFDebugLineInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2AC922B918A16182003CE0FB /* FTLDWARFDebugLineInfo.cpp */; };
2AC922BC18A16182003CE0FB /* FTLDWARFDebugLineInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 2AC922BA18A16182003CE0FB /* FTLDWARFDebugLineInfo.h */; };
@@ -1423,7 +1425,6 @@
C2C8D03114A3CEFC00578E65 /* HeapBlock.h in Headers */ = {isa = PBXBuildFile; fileRef = C2C8D02F14A3CEFC00578E65 /* HeapBlock.h */; settings = {ATTRIBUTES = (Private, ); }; };
C2CF39C116E15A8100DD69BE /* JSAPIWrapperObject.mm in Sources */ = {isa = PBXBuildFile; fileRef = C2CF39BF16E15A8100DD69BE /* JSAPIWrapperObject.mm */; };
C2CF39C216E15A8100DD69BE /* JSAPIWrapperObject.h in Headers */ = {isa = PBXBuildFile; fileRef = C2CF39C016E15A8100DD69BE /* JSAPIWrapperObject.h */; };
- C2D58C3415912FEE0021A844 /* GCActivityCallback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C2D58C3315912FEE0021A844 /* GCActivityCallback.cpp */; };
C2DF442F1707AC0100A5CA96 /* SuperRegion.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C2DF442D1707AC0100A5CA96 /* SuperRegion.cpp */; };
C2DF44301707AC0100A5CA96 /* SuperRegion.h in Headers */ = {isa = PBXBuildFile; fileRef = C2DF442E1707AC0100A5CA96 /* SuperRegion.h */; settings = {ATTRIBUTES = (Private, ); }; };
C2E526BD1590EF000054E48D /* HeapTimer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C2E526BB1590EF000054E48D /* HeapTimer.cpp */; };
@@ -1437,7 +1438,6 @@
C2FCAE1217A9C24E0034C735 /* BytecodeLivenessAnalysis.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C2FCAE0E17A9C24E0034C735 /* BytecodeLivenessAnalysis.cpp */; };
C2FCAE1317A9C24E0034C735 /* BytecodeLivenessAnalysis.h in Headers */ = {isa = PBXBuildFile; fileRef = C2FCAE0F17A9C24E0034C735 /* BytecodeLivenessAnalysis.h */; settings = {ATTRIBUTES = (Private, ); }; };
C2FE18A416BAEC4000AF3061 /* StructureRareData.h in Headers */ = {isa = PBXBuildFile; fileRef = C2FE18A316BAEC4000AF3061 /* StructureRareData.h */; settings = {ATTRIBUTES = (Private, ); }; };
- DDF7ABD411F60ED200108E36 /* GCActivityCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = DDF7ABD211F60ED200108E36 /* GCActivityCallback.h */; settings = {ATTRIBUTES = (Private, ); }; };
E124A8F70E555775003091F1 /* OpaqueJSString.h in Headers */ = {isa = PBXBuildFile; fileRef = E124A8F50E555775003091F1 /* OpaqueJSString.h */; settings = {ATTRIBUTES = (Private, ); }; };
E124A8F80E555775003091F1 /* OpaqueJSString.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E124A8F60E555775003091F1 /* OpaqueJSString.cpp */; };
E178636D0D9BEEC300D74E75 /* InitializeThreading.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E178636C0D9BEEC300D74E75 /* InitializeThreading.cpp */; };
@@ -2263,6 +2263,8 @@
2A6F462517E959CE00C45C98 /* HeapOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HeapOperation.h; sourceTree = "<group>"; };
2A7A58EE1808A4C40020BDF7 /* DeferGC.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DeferGC.cpp; sourceTree = "<group>"; };
2AAAA31018BD49D100394CC8 /* StructureIDBlob.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StructureIDBlob.h; sourceTree = "<group>"; };
+ 2AACE63A18CA5A0300ED0191 /* GCActivityCallback.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GCActivityCallback.cpp; sourceTree = "<group>"; };
+ 2AACE63B18CA5A0300ED0191 /* GCActivityCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GCActivityCallback.h; sourceTree = "<group>"; };
2AAD964918569417001F93BE /* RecursiveAllocationScope.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RecursiveAllocationScope.h; sourceTree = "<group>"; };
2AC922B918A16182003CE0FB /* FTLDWARFDebugLineInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FTLDWARFDebugLineInfo.cpp; path = ftl/FTLDWARFDebugLineInfo.cpp; sourceTree = "<group>"; };
2AC922BA18A16182003CE0FB /* FTLDWARFDebugLineInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FTLDWARFDebugLineInfo.h; path = ftl/FTLDWARFDebugLineInfo.h; sourceTree = "<group>"; };
@@ -2955,7 +2957,6 @@
C2C8D02F14A3CEFC00578E65 /* HeapBlock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HeapBlock.h; sourceTree = "<group>"; };
C2CF39BF16E15A8100DD69BE /* JSAPIWrapperObject.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = JSAPIWrapperObject.mm; sourceTree = "<group>"; };
C2CF39C016E15A8100DD69BE /* JSAPIWrapperObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSAPIWrapperObject.h; sourceTree = "<group>"; };
- C2D58C3315912FEE0021A844 /* GCActivityCallback.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GCActivityCallback.cpp; sourceTree = "<group>"; };
C2DF442D1707AC0100A5CA96 /* SuperRegion.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SuperRegion.cpp; sourceTree = "<group>"; };
C2DF442E1707AC0100A5CA96 /* SuperRegion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SuperRegion.h; sourceTree = "<group>"; };
C2E526BB1590EF000054E48D /* HeapTimer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HeapTimer.cpp; sourceTree = "<group>"; };
@@ -2971,7 +2972,6 @@
C2FE18A316BAEC4000AF3061 /* StructureRareData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StructureRareData.h; sourceTree = "<group>"; };
D21202280AD4310C00ED79B6 /* DateConversion.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = DateConversion.cpp; sourceTree = "<group>"; };
D21202290AD4310C00ED79B6 /* DateConversion.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = DateConversion.h; sourceTree = "<group>"; };
- DDF7ABD211F60ED200108E36 /* GCActivityCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GCActivityCallback.h; sourceTree = "<group>"; };
E124A8F50E555775003091F1 /* OpaqueJSString.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OpaqueJSString.h; sourceTree = "<group>"; };
E124A8F60E555775003091F1 /* OpaqueJSString.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = OpaqueJSString.cpp; sourceTree = "<group>"; };
E178633F0D9BEC0000D74E75 /* InitializeThreading.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InitializeThreading.h; sourceTree = "<group>"; };
@@ -3497,6 +3497,8 @@
142E312A134FF0A600AFADB5 /* heap */ = {
isa = PBXGroup;
children = (
+ 2AACE63A18CA5A0300ED0191 /* GCActivityCallback.cpp */,
+ 2AACE63B18CA5A0300ED0191 /* GCActivityCallback.h */,
14816E19154CC56C00B8054C /* BlockAllocator.cpp */,
14816E1A154CC56C00B8054C /* BlockAllocator.h */,
0FD8A31117D4326C00CA2C40 /* CodeBlockSet.cpp */,
@@ -3923,8 +3925,6 @@
0FB4B52216B6278D003F696B /* FunctionExecutableDump.h */,
F692A85C0255597D01FF60F7 /* FunctionPrototype.cpp */,
F692A85D0255597D01FF60F7 /* FunctionPrototype.h */,
- C2D58C3315912FEE0021A844 /* GCActivityCallback.cpp */,
- DDF7ABD211F60ED200108E36 /* GCActivityCallback.h */,
0F2B66B217B6B5AB00A7AE3F /* GenericTypedArrayView.h */,
0F2B66B317B6B5AB00A7AE3F /* GenericTypedArrayViewInlines.h */,
BC02E9B80E184545000F9297 /* GetterSetter.cpp */,
@@ -4912,6 +4912,7 @@
A1A009C11831A26E00CF8711 /* ARM64Assembler.h in Headers */,
86D3B2C410156BDE002865E7 /* ARMAssembler.h in Headers */,
A584032018BFFBE1005A0811 /* InspectorAgent.h in Headers */,
+ 2AACE63D18CA5A0300ED0191 /* GCActivityCallback.h in Headers */,
2AAAA31218BD49D100394CC8 /* StructureIDBlob.h in Headers */,
A54E8EB118BFFBBE00556D28 /* GCSegmentedArrayInlines.h in Headers */,
86ADD1450FDDEA980006EEC2 /* ARMv7Assembler.h in Headers */,
@@ -5229,7 +5230,6 @@
BC18C4040E16F5CD00B34460 /* FunctionConstructor.h in Headers */,
0FF0F1A016B72A1A005DF95B /* FunctionExecutableDump.h in Headers */,
BC18C4050E16F5CD00B34460 /* FunctionPrototype.h in Headers */,
- DDF7ABD411F60ED200108E36 /* GCActivityCallback.h in Headers */,
BCBE2CAE14E985AA000593AD /* GCAssertions.h in Headers */,
0F766D3015A8DCE2008F363E /* GCAwareJITStubRoutine.h in Headers */,
0F2B66AC17B6B53F00A7AE3F /* GCIncomingRefCounted.h in Headers */,
@@ -6217,6 +6217,7 @@
1428082E107EC0570013E7B2 /* ConstructData.cpp in Sources */,
A57D23F11891B5B40031C7FA /* ContentSearchUtilities.cpp in Sources */,
C240305514B404E60079EB64 /* CopiedSpace.cpp in Sources */,
+ 2AACE63C18CA5A0300ED0191 /* GCActivityCallback.cpp in Sources */,
C2239D1716262BDD005AC5FD /* CopyVisitor.cpp in Sources */,
0F2B66DE17B6B5AB00A7AE3F /* DataView.cpp in Sources */,
147F39C3107EC37600427A48 /* DateConstructor.cpp in Sources */,
@@ -6391,7 +6392,6 @@
147F39CB107EC37600427A48 /* FunctionConstructor.cpp in Sources */,
0FF0F19F16B72A17005DF95B /* FunctionExecutableDump.cpp in Sources */,
147F39CC107EC37600427A48 /* FunctionPrototype.cpp in Sources */,
- C2D58C3415912FEE0021A844 /* GCActivityCallback.cpp in Sources */,
0F766D2F15A8DCE0008F363E /* GCAwareJITStubRoutine.cpp in Sources */,
C2239D1A16262BDD005AC5FD /* GCThread.cpp in Sources */,
C21122E115DD9AB300790E3A /* GCThreadSharedData.cpp in Sources */,
Copied: trunk/Source/_javascript_Core/heap/GCActivityCallback.cpp (from rev 165280, trunk/Source/_javascript_Core/runtime/GCActivityCallback.cpp) (0 => 165282)
--- trunk/Source/_javascript_Core/heap/GCActivityCallback.cpp (rev 0)
+++ trunk/Source/_javascript_Core/heap/GCActivityCallback.cpp 2014-03-07 21:28:43 UTC (rev 165282)
@@ -0,0 +1,196 @@
+/*
+ * Copyright (C) 2010 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "GCActivityCallback.h"
+
+#include "Heap.h"
+#include "JSLock.h"
+#include "JSObject.h"
+#include "VM.h"
+
+#include <wtf/RetainPtr.h>
+#include <wtf/WTFThreadData.h>
+
+#if PLATFORM(EFL)
+#include <wtf/MainThread.h>
+#endif
+
+namespace JSC {
+
+bool GCActivityCallback::s_shouldCreateGCTimer = true;
+
+#if USE(CF) || PLATFORM(EFL)
+
+const double gcTimeSlicePerMB = 0.01; // Percentage of CPU time we will spend to reclaim 1 MB
+const double maxGCTimeSlice = 0.05; // The maximum amount of CPU time we want to use for opportunistic timer-triggered collections.
+const double timerSlop = 2.0; // Fudge factor to avoid performance cost of resetting timer.
+
+#if !PLATFORM(IOS)
+const double pagingTimeOut = 0.1; // Time in seconds to allow opportunistic timer to iterate over all blocks to see if the Heap is paged out.
+#endif
+
+#if !USE(CF)
+const double hour = 60 * 60;
+#endif
+
+#if USE(CF)
+DefaultGCActivityCallback::DefaultGCActivityCallback(Heap* heap)
+ : GCActivityCallback(heap->vm(), CFRunLoopGetCurrent())
+ , m_delay(s_decade)
+{
+}
+
+DefaultGCActivityCallback::DefaultGCActivityCallback(Heap* heap, CFRunLoopRef runLoop)
+ : GCActivityCallback(heap->vm(), runLoop)
+ , m_delay(s_decade)
+{
+}
+#elif PLATFORM(EFL)
+DefaultGCActivityCallback::DefaultGCActivityCallback(Heap* heap)
+ : GCActivityCallback(heap->vm(), WTF::isMainThread())
+ , m_delay(hour)
+{
+}
+#endif
+
+void DefaultGCActivityCallback::doWork()
+{
+ Heap* heap = &m_vm->heap;
+ if (!isEnabled())
+ return;
+
+ JSLockHolder locker(m_vm);
+ if (heap->isDeferred()) {
+ scheduleTimer(0);
+ return;
+ }
+
+#if !PLATFORM(IOS)
+ double startTime = WTF::monotonicallyIncreasingTime();
+ if (heap->isPagedOut(startTime + pagingTimeOut)) {
+ heap->activityCallback()->cancel();
+ heap->increaseLastGCLength(pagingTimeOut);
+ return;
+ }
+#endif
+ heap->gcTimerDidFire();
+ heap->collect();
+}
+
+#if USE(CF)
+void DefaultGCActivityCallback::scheduleTimer(double newDelay)
+{
+ if (newDelay * timerSlop > m_delay)
+ return;
+ double delta = m_delay - newDelay;
+ m_delay = newDelay;
+ CFRunLoopTimerSetNextFireDate(m_timer.get(), CFRunLoopTimerGetNextFireDate(m_timer.get()) - delta);
+}
+
+void DefaultGCActivityCallback::cancelTimer()
+{
+ m_delay = s_decade;
+ CFRunLoopTimerSetNextFireDate(m_timer.get(), CFAbsoluteTimeGetCurrent() + s_decade);
+}
+#elif PLATFORM(EFL)
+void DefaultGCActivityCallback::scheduleTimer(double newDelay)
+{
+ if (newDelay * timerSlop > m_delay)
+ return;
+
+ stop();
+ m_delay = newDelay;
+
+ ASSERT(!m_timer);
+ m_timer = add(newDelay, this);
+}
+
+void DefaultGCActivityCallback::cancelTimer()
+{
+ m_delay = hour;
+ stop();
+}
+#endif
+
+void DefaultGCActivityCallback::didAllocate(size_t bytes)
+{
+#if PLATFORM(EFL)
+ if (!isEnabled())
+ return;
+
+ ASSERT(WTF::isMainThread());
+#endif
+
+ // The first byte allocated in an allocation cycle will report 0 bytes to didAllocate.
+ // We pretend it's one byte so that we don't ignore this allocation entirely.
+ if (!bytes)
+ bytes = 1;
+ Heap* heap = static_cast<Heap*>(&m_vm->heap);
+ double gcTimeSlice = std::min((static_cast<double>(bytes) / MB) * gcTimeSlicePerMB, maxGCTimeSlice);
+ double newDelay = heap->lastGCLength() / gcTimeSlice;
+ scheduleTimer(newDelay);
+}
+
+void DefaultGCActivityCallback::willCollect()
+{
+ cancelTimer();
+}
+
+void DefaultGCActivityCallback::cancel()
+{
+ cancelTimer();
+}
+
+#else
+
+DefaultGCActivityCallback::DefaultGCActivityCallback(Heap* heap)
+ : GCActivityCallback(heap->vm())
+{
+}
+
+void DefaultGCActivityCallback::doWork()
+{
+}
+
+void DefaultGCActivityCallback::didAllocate(size_t)
+{
+}
+
+void DefaultGCActivityCallback::willCollect()
+{
+}
+
+void DefaultGCActivityCallback::cancel()
+{
+}
+
+#endif
+
+}
+
Copied: trunk/Source/_javascript_Core/heap/GCActivityCallback.h (from rev 165280, trunk/Source/_javascript_Core/runtime/GCActivityCallback.h) (0 => 165282)
--- trunk/Source/_javascript_Core/heap/GCActivityCallback.h (rev 0)
+++ trunk/Source/_javascript_Core/heap/GCActivityCallback.h 2014-03-07 21:28:43 UTC (rev 165282)
@@ -0,0 +1,112 @@
+/*
+ * Copyright (C) 2010 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef GCActivityCallback_h
+#define GCActivityCallback_h
+
+#include "HeapTimer.h"
+#include <wtf/OwnPtr.h>
+#include <wtf/PassOwnPtr.h>
+
+#if USE(CF)
+#include <CoreFoundation/CoreFoundation.h>
+#endif
+
+namespace JSC {
+
+class Heap;
+
+class GCActivityCallback : public HeapTimer {
+ WTF_MAKE_FAST_ALLOCATED;
+public:
+ virtual void didAllocate(size_t) { }
+ virtual void willCollect() { }
+ virtual void cancel() { }
+ bool isEnabled() const { return m_enabled; }
+ void setEnabled(bool enabled) { m_enabled = enabled; }
+
+ static bool s_shouldCreateGCTimer;
+
+protected:
+#if USE(CF)
+ GCActivityCallback(VM* vm, CFRunLoopRef runLoop)
+ : HeapTimer(vm, runLoop)
+ , m_enabled(true)
+ {
+ }
+#elif PLATFORM(EFL)
+ GCActivityCallback(VM* vm, bool flag)
+ : HeapTimer(vm)
+ , m_enabled(flag)
+ {
+ }
+#else
+ GCActivityCallback(VM* vm)
+ : HeapTimer(vm)
+ , m_enabled(true)
+ {
+ }
+#endif
+
+ bool m_enabled;
+};
+
+class DefaultGCActivityCallback : public GCActivityCallback {
+public:
+ static PassOwnPtr<DefaultGCActivityCallback> create(Heap*);
+
+ DefaultGCActivityCallback(Heap*);
+
+ JS_EXPORT_PRIVATE virtual void didAllocate(size_t) override;
+ JS_EXPORT_PRIVATE virtual void willCollect() override;
+ JS_EXPORT_PRIVATE virtual void cancel() override;
+
+ JS_EXPORT_PRIVATE virtual void doWork() override;
+
+#if USE(CF)
+protected:
+ JS_EXPORT_PRIVATE DefaultGCActivityCallback(Heap*, CFRunLoopRef);
+#endif
+#if USE(CF) || PLATFORM(EFL)
+protected:
+ void cancelTimer();
+ void scheduleTimer(double);
+
+private:
+ double m_delay;
+#endif
+};
+
+inline PassOwnPtr<DefaultGCActivityCallback> DefaultGCActivityCallback::create(Heap* heap)
+{
+ return GCActivityCallback::s_shouldCreateGCTimer ? adoptPtr(new DefaultGCActivityCallback(heap)) : nullptr;
+}
+
+}
+
+#endif
Deleted: trunk/Source/_javascript_Core/runtime/GCActivityCallback.cpp (165281 => 165282)
--- trunk/Source/_javascript_Core/runtime/GCActivityCallback.cpp 2014-03-07 21:15:15 UTC (rev 165281)
+++ trunk/Source/_javascript_Core/runtime/GCActivityCallback.cpp 2014-03-07 21:28:43 UTC (rev 165282)
@@ -1,196 +0,0 @@
-/*
- * Copyright (C) 2010 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
- * its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "GCActivityCallback.h"
-
-#include "Heap.h"
-#include "VM.h"
-#include "JSLock.h"
-#include "JSObject.h"
-
-#include <wtf/RetainPtr.h>
-#include <wtf/WTFThreadData.h>
-
-#if PLATFORM(EFL)
-#include <wtf/MainThread.h>
-#endif
-
-namespace JSC {
-
-bool GCActivityCallback::s_shouldCreateGCTimer = true;
-
-#if USE(CF) || PLATFORM(EFL)
-
-const double gcTimeSlicePerMB = 0.01; // Percentage of CPU time we will spend to reclaim 1 MB
-const double maxGCTimeSlice = 0.05; // The maximum amount of CPU time we want to use for opportunistic timer-triggered collections.
-const double timerSlop = 2.0; // Fudge factor to avoid performance cost of resetting timer.
-
-#if !PLATFORM(IOS)
-const double pagingTimeOut = 0.1; // Time in seconds to allow opportunistic timer to iterate over all blocks to see if the Heap is paged out.
-#endif
-
-#if !USE(CF)
-const double hour = 60 * 60;
-#endif
-
-#if USE(CF)
-DefaultGCActivityCallback::DefaultGCActivityCallback(Heap* heap)
- : GCActivityCallback(heap->vm(), CFRunLoopGetCurrent())
- , m_delay(s_decade)
-{
-}
-
-DefaultGCActivityCallback::DefaultGCActivityCallback(Heap* heap, CFRunLoopRef runLoop)
- : GCActivityCallback(heap->vm(), runLoop)
- , m_delay(s_decade)
-{
-}
-#elif PLATFORM(EFL)
-DefaultGCActivityCallback::DefaultGCActivityCallback(Heap* heap)
- : GCActivityCallback(heap->vm(), WTF::isMainThread())
- , m_delay(hour)
-{
-}
-#endif
-
-void DefaultGCActivityCallback::doWork()
-{
- Heap* heap = &m_vm->heap;
- if (!isEnabled())
- return;
-
- JSLockHolder locker(m_vm);
- if (heap->isDeferred()) {
- scheduleTimer(0);
- return;
- }
-
-#if !PLATFORM(IOS)
- double startTime = WTF::monotonicallyIncreasingTime();
- if (heap->isPagedOut(startTime + pagingTimeOut)) {
- heap->activityCallback()->cancel();
- heap->increaseLastGCLength(pagingTimeOut);
- return;
- }
-#endif
- heap->gcTimerDidFire();
- heap->collect();
-}
-
-#if USE(CF)
-void DefaultGCActivityCallback::scheduleTimer(double newDelay)
-{
- if (newDelay * timerSlop > m_delay)
- return;
- double delta = m_delay - newDelay;
- m_delay = newDelay;
- CFRunLoopTimerSetNextFireDate(m_timer.get(), CFRunLoopTimerGetNextFireDate(m_timer.get()) - delta);
-}
-
-void DefaultGCActivityCallback::cancelTimer()
-{
- m_delay = s_decade;
- CFRunLoopTimerSetNextFireDate(m_timer.get(), CFAbsoluteTimeGetCurrent() + s_decade);
-}
-#elif PLATFORM(EFL)
-void DefaultGCActivityCallback::scheduleTimer(double newDelay)
-{
- if (newDelay * timerSlop > m_delay)
- return;
-
- stop();
- m_delay = newDelay;
-
- ASSERT(!m_timer);
- m_timer = add(newDelay, this);
-}
-
-void DefaultGCActivityCallback::cancelTimer()
-{
- m_delay = hour;
- stop();
-}
-#endif
-
-void DefaultGCActivityCallback::didAllocate(size_t bytes)
-{
-#if PLATFORM(EFL)
- if (!isEnabled())
- return;
-
- ASSERT(WTF::isMainThread());
-#endif
-
- // The first byte allocated in an allocation cycle will report 0 bytes to didAllocate.
- // We pretend it's one byte so that we don't ignore this allocation entirely.
- if (!bytes)
- bytes = 1;
- Heap* heap = static_cast<Heap*>(&m_vm->heap);
- double gcTimeSlice = std::min((static_cast<double>(bytes) / MB) * gcTimeSlicePerMB, maxGCTimeSlice);
- double newDelay = heap->lastGCLength() / gcTimeSlice;
- scheduleTimer(newDelay);
-}
-
-void DefaultGCActivityCallback::willCollect()
-{
- cancelTimer();
-}
-
-void DefaultGCActivityCallback::cancel()
-{
- cancelTimer();
-}
-
-#else
-
-DefaultGCActivityCallback::DefaultGCActivityCallback(Heap* heap)
- : GCActivityCallback(heap->vm())
-{
-}
-
-void DefaultGCActivityCallback::doWork()
-{
-}
-
-void DefaultGCActivityCallback::didAllocate(size_t)
-{
-}
-
-void DefaultGCActivityCallback::willCollect()
-{
-}
-
-void DefaultGCActivityCallback::cancel()
-{
-}
-
-#endif
-
-}
-
Deleted: trunk/Source/_javascript_Core/runtime/GCActivityCallback.h (165281 => 165282)
--- trunk/Source/_javascript_Core/runtime/GCActivityCallback.h 2014-03-07 21:15:15 UTC (rev 165281)
+++ trunk/Source/_javascript_Core/runtime/GCActivityCallback.h 2014-03-07 21:28:43 UTC (rev 165282)
@@ -1,112 +0,0 @@
-/*
- * Copyright (C) 2010 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
- * its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef GCActivityCallback_h
-#define GCActivityCallback_h
-
-#include "HeapTimer.h"
-#include <wtf/OwnPtr.h>
-#include <wtf/PassOwnPtr.h>
-
-#if USE(CF)
-#include <CoreFoundation/CoreFoundation.h>
-#endif
-
-namespace JSC {
-
-class Heap;
-
-class GCActivityCallback : public HeapTimer {
- WTF_MAKE_FAST_ALLOCATED;
-public:
- virtual void didAllocate(size_t) { }
- virtual void willCollect() { }
- virtual void cancel() { }
- bool isEnabled() const { return m_enabled; }
- void setEnabled(bool enabled) { m_enabled = enabled; }
-
- static bool s_shouldCreateGCTimer;
-
-protected:
-#if USE(CF)
- GCActivityCallback(VM* vm, CFRunLoopRef runLoop)
- : HeapTimer(vm, runLoop)
- , m_enabled(true)
- {
- }
-#elif PLATFORM(EFL)
- GCActivityCallback(VM* vm, bool flag)
- : HeapTimer(vm)
- , m_enabled(flag)
- {
- }
-#else
- GCActivityCallback(VM* vm)
- : HeapTimer(vm)
- , m_enabled(true)
- {
- }
-#endif
-
- bool m_enabled;
-};
-
-class DefaultGCActivityCallback : public GCActivityCallback {
-public:
- static PassOwnPtr<DefaultGCActivityCallback> create(Heap*);
-
- DefaultGCActivityCallback(Heap*);
-
- JS_EXPORT_PRIVATE virtual void didAllocate(size_t) override;
- JS_EXPORT_PRIVATE virtual void willCollect() override;
- JS_EXPORT_PRIVATE virtual void cancel() override;
-
- JS_EXPORT_PRIVATE virtual void doWork() override;
-
-#if USE(CF)
-protected:
- JS_EXPORT_PRIVATE DefaultGCActivityCallback(Heap*, CFRunLoopRef);
-#endif
-#if USE(CF) || PLATFORM(EFL)
-protected:
- void cancelTimer();
- void scheduleTimer(double);
-
-private:
- double m_delay;
-#endif
-};
-
-inline PassOwnPtr<DefaultGCActivityCallback> DefaultGCActivityCallback::create(Heap* heap)
-{
- return GCActivityCallback::s_shouldCreateGCTimer ? adoptPtr(new DefaultGCActivityCallback(heap)) : nullptr;
-}
-
-}
-
-#endif