Changeset 169094 in webkit
- Timestamp:
- May 19, 2014 7:03:47 PM (10 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r169092 r169094 1 2014-05-19 Mark Lam <mark.lam@apple.com> 2 3 operationOptimize() should defer the GC for a while. 4 <https://webkit.org/b/133103> 5 6 Reviewed by Filip Pizlo. 7 8 Currently, operationOptimize() only defers the GC until its end. As a result, 9 a GC may be triggered just before we return from operationOptimize(), and it may 10 jettison the optimize codeBlock that we're planning to OSR enter into when we 11 return from this function. This is because the OSR entry on-ramp code hasn't 12 been executed yet, and hence, there is not yet a reference to this new codeBlock 13 from the stack, and there won't be until we've had a chance to return out of 14 operationOptimize() to run the OSR entry on-ramp code. 15 16 This issue is now fixed by using DeferGCForAWhile instead of DeferGC. This 17 ensures that the GC will be deferred until after the OSR entry on-ramp can be 18 executed. 19 20 * jit/JITOperations.cpp: 21 1 22 2014-05-19 Filip Pizlo <fpizlo@apple.com> 2 23 -
trunk/Source/JavaScriptCore/jit/JITOperations.cpp
r168335 r169094 1020 1020 NativeCallFrameTracer tracer(&vm, exec); 1021 1021 1022 // Defer GC so that it doesn't run between when we enter into this slow path and1023 // when we figure out the state of our code block. This prevents a number of1024 // a wkward reentrancy scenarios, including:1022 // Defer GC for a while so that it doesn't run between when we enter into this 1023 // slow path and when we figure out the state of our code block. This prevents 1024 // a number of awkward reentrancy scenarios, including: 1025 1025 // 1026 1026 // - The optimized version of our code block being jettisoned by GC right after 1027 // we concluded that we wanted to use it. 1027 // we concluded that we wanted to use it, but have not planted it into the JS 1028 // stack yet. 1028 1029 // 1029 1030 // - An optimized version of our code block being installed just as we decided 1030 1031 // that it wasn't ready yet. 1031 1032 // 1032 // This still leaves the following: anytime we return from cti_optimize, we may1033 // GC, and the GC may either jettison the optimized version of our code block,1034 // or it may install the optimized version of our code block even though we1035 // concluded that it wasn't ready yet.1036 //1037 1033 // Note that jettisoning won't happen if we already initiated OSR, because in 1038 1034 // that case we would have already planted the optimized code block into the JS 1039 1035 // stack. 1040 DeferGC deferGC(vm.heap);1036 DeferGCForAWhile deferGC(vm.heap); 1041 1037 1042 1038 CodeBlock* codeBlock = exec->codeBlock();
Note: See TracChangeset
for help on using the changeset viewer.