HeapStatistics::s_pauseTimeStarts and s_pauseTimeEnds should be Vectors
authorandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 8 Nov 2012 23:32:16 +0000 (23:32 +0000)
committerandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 8 Nov 2012 23:32:16 +0000 (23:32 +0000)
https://bugs.webkit.org/show_bug.cgi?id=101651

Reviewed by Andreas Kling.

HeapStatistics uses Deques when Vectors would work just as good.

* heap/HeapStatistics.cpp:
* heap/HeapStatistics.h:
(HeapStatistics):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@133959 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/heap/HeapStatistics.cpp
Source/JavaScriptCore/heap/HeapStatistics.h

index c6d8266..f4e478d 100644 (file)
@@ -1,3 +1,16 @@
+2012-11-08  Anders Carlsson  <andersca@apple.com>
+
+        HeapStatistics::s_pauseTimeStarts and s_pauseTimeEnds should be Vectors
+        https://bugs.webkit.org/show_bug.cgi?id=101651
+
+        Reviewed by Andreas Kling.
+
+        HeapStatistics uses Deques when Vectors would work just as good.
+
+        * heap/HeapStatistics.cpp:
+        * heap/HeapStatistics.h:
+        (HeapStatistics):
+
 2012-11-07  Filip Pizlo  <fpizlo@apple.com>
 
         DFG should not assume that something is a double just because it might be undefined
index 8340bfa..3876215 100644 (file)
@@ -41,8 +41,8 @@ namespace JSC {
 
 double HeapStatistics::s_startTime = 0.0;
 double HeapStatistics::s_endTime = 0.0;
-Deque<double>* HeapStatistics::s_pauseTimeStarts = 0;
-Deque<double>* HeapStatistics::s_pauseTimeEnds = 0;
+Vector<double>* HeapStatistics::s_pauseTimeStarts = 0;
+Vector<double>* HeapStatistics::s_pauseTimeEnds = 0;
 
 #if OS(UNIX) 
 
@@ -50,8 +50,8 @@ void HeapStatistics::initialize()
 {
     ASSERT(Options::recordGCPauseTimes());
     s_startTime = WTF::monotonicallyIncreasingTime();
-    s_pauseTimeStarts = new Deque<double>();
-    s_pauseTimeEnds = new Deque<double>();
+    s_pauseTimeStarts = new Vector<double>();
+    s_pauseTimeEnds = new Vector<double>();
 }
 
 void HeapStatistics::recordGCPauseTime(double start, double end)
@@ -82,8 +82,8 @@ void HeapStatistics::logStatistics()
 
     if (Options::recordGCPauseTimes()) {
         dataLog(", \"pause_times\": [");
-        Deque<double>::iterator startIt = s_pauseTimeStarts->begin();
-        Deque<double>::iterator endIt = s_pauseTimeEnds->begin();
+        Vector<double>::iterator startIt = s_pauseTimeStarts->begin();
+        Vector<double>::iterator endIt = s_pauseTimeEnds->begin();
         if (startIt != s_pauseTimeStarts->end() && endIt != s_pauseTimeEnds->end()) {
             dataLog("[%f, %f]", *startIt, *endIt);
             ++startIt;
index 0800f0c..ce7a40a 100644 (file)
@@ -49,8 +49,8 @@ public:
 
 private:
     static void logStatistics();
-    static Deque<double>* s_pauseTimeStarts;
-    static Deque<double>* s_pauseTimeEnds;
+    static Vector<double>* s_pauseTimeStarts;
+    static Vector<double>* s_pauseTimeEnds;
     static double s_startTime;
     static double s_endTime;
 };