WebKit Bugzilla
Attachment 340666 Details for
Bug 185754
: Remove shrinkFootprint test from apitests since it's flaky
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch
a-backup.diff (text/plain), 2.86 KB, created by
Saam Barati
on 2018-05-17 16:42:49 PDT
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Saam Barati
Created:
2018-05-17 16:42:49 PDT
Size:
2.86 KB
patch
obsolete
>Index: Source/JavaScriptCore/ChangeLog >=================================================================== >--- Source/JavaScriptCore/ChangeLog (revision 231930) >+++ Source/JavaScriptCore/ChangeLog (working copy) >@@ -1,3 +1,17 @@ >+2018-05-17 Saam Barati <sbarati@apple.com> >+ >+ Remove shrinkFootprint test from apitests since it's flaky >+ https://bugs.webkit.org/show_bug.cgi?id=185754 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ 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 <sbarati@apple.com> > > defaultConstructorSourceCode needs to makeSource every time it's called >Index: Source/JavaScriptCore/API/tests/testapi.mm >=================================================================== >--- Source/JavaScriptCore/API/tests/testapi.mm (revision 231929) >+++ Source/JavaScriptCore/API/tests/testapi.mm (working copy) >@@ -1472,33 +1472,6 @@ static void testObjectiveCAPIMain() > 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();
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 185754
: 340666