From Gavin: WebKit’s memory pressure handler is currently calling malloc_zone_pressure_relief twice; for apps using WK1 this can cause a large stall on the app’s main thread. The call under ReliefLogger::platformMemoryUsage is something we’re doing purely for logging purposes – this is not a reasonable burder to incur. We should remove this, and adjust our logging appropriately. <rdar://problem/29048286>
Logging now looks like this by default: 14:37:33.447467 -0700 Memory pressure relief: Empty the PageCache 14:37:33.447537 -0700 Memory pressure relief: Prune MemoryCache live resources 14:37:33.447744 -0700 Memory pressure relief: Drain CSSValuePool 14:37:33.447806 -0700 Memory pressure relief: Discard StyleResolvers 14:37:33.467145 -0700 Memory pressure relief: Discard all JIT-compiled code 14:37:33.467235 -0700 Memory pressure relief: Dropping buffered data from paused media elements ... It looks as it used it if someone manually enables it with `defaults write -g LogMemoryJetsamDetails 1`: 14:40:34.698681 -0700 Memory pressure relief: Empty the PageCache: -dirty 94208 bytes (from 25477120 to 25382912) 14:40:34.699715 -0700 Memory pressure relief: Prune MemoryCache live resources: -dirty 491520 bytes (from 25382912 to 24891392) 14:40:34.700456 -0700 Memory pressure relief: Drain CSSValuePool: -dirty 4096 bytes (from 24891392 to 24887296) 14:40:34.702059 -0700 Memory pressure relief: Discard StyleResolvers: -dirty 57344 bytes (from 24887296 to 24829952) 14:40:34.703430 -0700 Memory pressure relief: Discard all JIT-compiled code: -dirty 28672 bytes (from 24829952 to 24801280) 14:40:34.703950 -0700 Memory pressure relief: Dropping buffered data from paused media elements: =dirty (at 24801280 bytes) ...
Created attachment 293808 [details] Patch
Comment on attachment 293808 [details] Patch Attachment 293808 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: http://webkit-queues.webkit.org/results/2456820 New failing tests: media/controls/ipad/close-page-with-picture-in-picture-video-assertion-failure.html
Created attachment 293821 [details] Archive of layout-test-results from ews123 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews123 Port: ios-simulator-wk2 Platform: Mac OS X 10.11.6
Created attachment 294425 [details] Crash not reproducing locally so retrying EWS.
Comment on attachment 294425 [details] Crash not reproducing locally so retrying EWS. r=me
Comment on attachment 294425 [details] Crash not reproducing locally so retrying EWS. Clearing flags on attachment: 294425 Committed r208607: <http://trac.webkit.org/changeset/208607>
All reviewed patches have been landed. Closing bug.
Reverted r208607 for reason: The actual changes aren't inline with what was requested. Committed r209014: <http://trac.webkit.org/changeset/209014>
Created attachment 295638 [details] Patch
Comment on attachment 295638 [details] Patch Looks fine. Did Kling look at this too?
Comment on attachment 295638 [details] Patch Looks fine to me, although the bug title is wrong since we're not changing the number of calls to platformMemoryUsage() :)
Comment on attachment 295638 [details] Patch Clearing flags on attachment: 295638 Committed r209360: <http://trac.webkit.org/changeset/209360>