Title: [231938] trunk/Source/_javascript_Core
Revision
231938
Author
sbar...@apple.com
Date
2018-05-17 18:41:58 -0700 (Thu, 17 May 2018)

Log Message

Remove shrinkFootprint test from apitests since it's flaky
https://bugs.webkit.org/show_bug.cgi?id=185754

Reviewed by Mark Lam.

This test is flaky as it keeps failing on certain people's machines.
Having a test about OS footprint seems like it'll forever be doomed
to being flaky.

* API/tests/testapi.mm:
(testObjectiveCAPIMain):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/API/tests/testapi.mm (231937 => 231938)


--- trunk/Source/_javascript_Core/API/tests/testapi.mm	2018-05-18 01:27:48 UTC (rev 231937)
+++ trunk/Source/_javascript_Core/API/tests/testapi.mm	2018-05-18 01:41:58 UTC (rev 231938)
@@ -1472,33 +1472,6 @@
         checkResult(@"Ran code in five concurrent VMs that GC'd", ok);
     }
 
-    @autoreleasepool {
-        JSContext *context = [[JSContext alloc] init];
-        JSVirtualMachine *vm = [context virtualMachine];
-        [vm shrinkFootprint]; // Make sure that when we allocate a ton of memory below we reuse at little as possible.
-
-        std::optional<size_t> footprintBefore = WTF::memoryFootprint();
-        RELEASE_ASSERT(footprintBefore);
-
-        [context evaluateScript:@"for (let i = 0; i < 10000; ++i) { eval(`myVariable_${i} = [i]`); }"];
-
-        static constexpr size_t approximateBytes = 10000 * sizeof(int);
-        std::optional<size_t> footprintMiddle = WTF::memoryFootprint();
-        RELEASE_ASSERT(footprintMiddle);
-        checkResult(@"Footprint is larger than what we allocated", *footprintMiddle > approximateBytes);
-        checkResult(@"Footprint got larger as we allocated a ton of stuff", *footprintMiddle > *footprintBefore);
-        size_t allocationDelta = *footprintMiddle - *footprintBefore;
-        checkResult(@"We allocated as much or more memory than what we expected to", allocationDelta >= approximateBytes);
-
-        [context evaluateScript:@"for (let i = 0; i < 10000; ++i) { eval(`myVariable_${i} = null`); }"];
-        [vm shrinkFootprint];
-        std::optional<size_t> footprintAfter = WTF::memoryFootprint();
-        RELEASE_ASSERT(footprintAfter);
-        checkResult(@"Footprint got smaller after we shrank the VM", *footprintAfter < *footprintMiddle);
-        size_t freeDelta = *footprintMiddle - *footprintAfter;
-        checkResult(@"Shrinking the footprint of the VM actually freed memory", freeDelta > (approximateBytes / 2));
-    }
-
     currentThisInsideBlockGetterTest();
     runDateTests();
     runJSExportTests();

Modified: trunk/Source/_javascript_Core/ChangeLog (231937 => 231938)


--- trunk/Source/_javascript_Core/ChangeLog	2018-05-18 01:27:48 UTC (rev 231937)
+++ trunk/Source/_javascript_Core/ChangeLog	2018-05-18 01:41:58 UTC (rev 231938)
@@ -1,5 +1,19 @@
 2018-05-17  Saam Barati  <sbar...@apple.com>
 
+        Remove shrinkFootprint test from apitests since it's flaky
+        https://bugs.webkit.org/show_bug.cgi?id=185754
+
+        Reviewed by Mark Lam.
+
+        This test is flaky as it keeps failing on certain people's machines.
+        Having a test about OS footprint seems like it'll forever be doomed
+        to being flaky.
+
+        * API/tests/testapi.mm:
+        (testObjectiveCAPIMain):
+
+2018-05-17  Saam Barati  <sbar...@apple.com>
+
         defaultConstructorSourceCode needs to makeSource every time it's called
         https://bugs.webkit.org/show_bug.cgi?id=185753
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to