RESOLVED FIXED Bug 164375
Reduce number of malloc_zone_pressure_relief calls
https://bugs.webkit.org/show_bug.cgi?id=164375
Summary Reduce number of malloc_zone_pressure_relief calls
Keith Rollin
Reported 2016-11-03 13:15:50 PDT
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>
Attachments
Patch (5.08 KB, patch)
2016-11-03 15:00 PDT, Keith Rollin
no flags
Archive of layout-test-results from ews123 for ios-simulator-wk2 (11.00 MB, application/zip)
2016-11-03 16:18 PDT, Build Bot
no flags
Crash not reproducing locally so retrying EWS. (5.15 KB, patch)
2016-11-10 15:44 PST, Keith Rollin
no flags
Patch (1.91 KB, patch)
2016-11-29 14:18 PST, Keith Rollin
no flags
Keith Rollin
Comment 1 2016-11-03 15:00:40 PDT
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) ...
Keith Rollin
Comment 2 2016-11-03 15:00:50 PDT
Build Bot
Comment 3 2016-11-03 16:18:04 PDT
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
Build Bot
Comment 4 2016-11-03 16:18:07 PDT
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
Keith Rollin
Comment 5 2016-11-10 15:44:51 PST
Created attachment 294425 [details] Crash not reproducing locally so retrying EWS.
Andreas Kling
Comment 6 2016-11-11 13:17:17 PST
Comment on attachment 294425 [details] Crash not reproducing locally so retrying EWS. r=me
WebKit Commit Bot
Comment 7 2016-11-11 13:53:17 PST
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>
WebKit Commit Bot
Comment 8 2016-11-11 13:53:21 PST
All reviewed patches have been landed. Closing bug.
Keith Rollin
Comment 9 2016-11-28 13:58:50 PST
Reverted r208607 for reason: The actual changes aren't inline with what was requested. Committed r209014: <http://trac.webkit.org/changeset/209014>
Keith Rollin
Comment 10 2016-11-29 14:18:42 PST
Darin Adler
Comment 11 2016-12-03 12:41:51 PST
Comment on attachment 295638 [details] Patch Looks fine. Did Kling look at this too?
Andreas Kling
Comment 12 2016-12-03 13:46:57 PST
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() :)
WebKit Commit Bot
Comment 13 2016-12-05 15:28:15 PST
Comment on attachment 295638 [details] Patch Clearing flags on attachment: 295638 Committed r209360: <http://trac.webkit.org/changeset/209360>
WebKit Commit Bot
Comment 14 2016-12-05 15:28:20 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.