RESOLVED FIXED185931
Make JSC have a mini mode that kicks in when the JIT is disabled
https://bugs.webkit.org/show_bug.cgi?id=185931
Summary Make JSC have a mini mode that kicks in when the JIT is disabled
Saam Barati
Reported 2018-05-23 19:56:05 PDT
...
Attachments
patch (7.84 KB, patch)
2018-05-25 13:56 PDT, Saam Barati
mark.lam: review+
Saam Barati
Comment 1 2018-05-25 13:56:54 PDT
Mark Lam
Comment 2 2018-05-25 14:00:13 PDT
Comment on attachment 341322 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=341322&action=review r=me > Source/JavaScriptCore/ChangeLog:11 > + - We always sweep synchronously. You should also add "disable generational GC" because that's what the code below does.
Saam Barati
Comment 3 2018-05-25 15:26:44 PDT
Comment on attachment 341322 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=341322&action=review >> Source/JavaScriptCore/ChangeLog:11 >> + - We always sweep synchronously. > > You should also add "disable generational GC" because that's what the code below does. Will do
Saam Barati
Comment 4 2018-05-25 15:48:32 PDT
Radar WebKit Bug Importer
Comment 5 2018-05-25 15:49:20 PDT
Basuke Suzuki
Comment 6 2019-03-18 15:37:09 PDT
Comment on attachment 341322 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=341322&action=review > Source/JavaScriptCore/heap/Heap.cpp:131 > + return Options::miniVMHeapGrowthFactor() * heapSize; Question. What is the reason to use fixed growth factor here for mini mode? I guess that is because mini mode returns memory to the system more than other environment. Are there any other reason for specific platform? i.e. WatchOS?
Saam Barati
Comment 7 2019-03-18 16:52:49 PDT
(In reply to Basuke Suzuki from comment #6) > Comment on attachment 341322 [details] > patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=341322&action=review > > > Source/JavaScriptCore/heap/Heap.cpp:131 > > + return Options::miniVMHeapGrowthFactor() * heapSize; > > Question. What is the reason to use fixed growth factor here for mini mode? > I guess that is because mini mode returns memory to the system more than > other environment. Are there any other reason for specific platform? i.e. > WatchOS? We currently only tie this to running with the JIT or not. You could imagine implementing this in other ways. The main idea here is that when you run without the JIT, your rate of allocation is smaller. So you can afford to be more aggressive about collecting. IIRC, the main idea was to have: GC % = (time running GC) / (time running code) to be more or less the constant irrespective of using the JIT or not. If we kept the non-mini mode growth factors, we'd have decreased our GC%.
Basuke Suzuki
Comment 8 2019-03-19 11:21:32 PDT
Saam, > We currently only tie this to running with the JIT or not. > > You could imagine implementing this in other ways. The main idea here is > that when you run without the JIT, your rate of allocation is smaller. So > you can afford to be more aggressive about collecting. Make sense. > IIRC, the main idea was to have: > GC % = (time running GC) / (time running code) > > to be more or less the constant irrespective of using the JIT or not. If we > kept the non-mini mode growth factors, we'd have decreased our GC%. Thanks. The idea above is very reasonable. We start with this rate and if we find a better number for our platform, we'll think about that.
Note You need to log in before you can comment on or make changes to this bug.