Changeset 233378 in webkit
- Timestamp:
- Jun 29, 2018 5:05:36 PM (6 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r233377 r233378 1 2018-06-29 Saam Barati <sbarati@apple.com> 2 3 Don't use tracePoints in JS/Wasm entry 4 https://bugs.webkit.org/show_bug.cgi?id=187196 5 6 Reviewed by Mark Lam. 7 8 This puts VM entry and Wasm entry tracePoints behind a runtime 9 option. This is a ~4x speedup on a soon to be released Wasm 10 benchmark. tracePoints should basically never run more than 50 11 times a second. Entering the VM and entering Wasm are user controlled, 12 and can happen hundreds of thousands of times in a second. Depending 13 on how the Wasm/JS code is structured, this can be disastrous for 14 performance. 15 16 * runtime/Options.h: 17 * runtime/VMEntryScope.cpp: 18 (JSC::VMEntryScope::VMEntryScope): 19 (JSC::VMEntryScope::~VMEntryScope): 20 * wasm/WasmBBQPlan.cpp: 21 (JSC::Wasm::BBQPlan::compileFunctions): 22 * wasm/js/WebAssemblyFunction.cpp: 23 (JSC::callWebAssemblyFunction): 24 1 25 2018-06-29 Saam Barati <sbarati@apple.com> 2 26 -
trunk/Source/JavaScriptCore/runtime/Options.h
r232526 r233378 513 513 v(bool, useArrayAllocationProfiling, true, Normal, "If true, we will use our normal array allocation profiling. If false, the allocation profile will always claim to be undecided.") \ 514 514 v(bool, forcePolyProto, false, Normal, "If true, create_this will always create an object with a poly proto structure.") \ 515 v(bool, forceMiniVMMode, false, Normal, "If true, it will force mini VM mode on.") 515 v(bool, forceMiniVMMode, false, Normal, "If true, it will force mini VM mode on.") \ 516 v(bool, useTracePoints, false, Normal, nullptr) 516 517 517 518 -
trunk/Source/JavaScriptCore/runtime/VMEntryScope.cpp
r232490 r233378 58 58 samplingProfiler->noticeVMEntry(); 59 59 #endif 60 tracePoint(VMEntryScopeStart); 60 if (Options::useTracePoints()) 61 tracePoint(VMEntryScopeStart); 61 62 } 62 63 … … 74 75 return; 75 76 76 tracePoint(VMEntryScopeEnd); 77 if (Options::useTracePoints()) 78 tracePoint(VMEntryScopeEnd); 77 79 78 80 if (m_vm.watchdog()) -
trunk/Source/JavaScriptCore/wasm/WasmBBQPlan.cpp
r230748 r233378 236 236 return; 237 237 238 TraceScope traceScope(WebAssemblyCompileStart, WebAssemblyCompileEnd); 238 std::optional<TraceScope> traceScope; 239 if (Options::useTracePoints()) 240 traceScope.emplace(WebAssemblyCompileStart, WebAssemblyCompileEnd); 239 241 ThreadCountHolder holder(*this); 240 242 -
trunk/Source/JavaScriptCore/wasm/js/WebAssemblyFunction.cpp
r231839 r233378 80 80 } 81 81 82 TraceScope traceScope(WebAssemblyExecuteStart, WebAssemblyExecuteEnd); 82 std::optional<TraceScope> traceScope; 83 if (Options::useTracePoints()) 84 traceScope.emplace(WebAssemblyExecuteStart, WebAssemblyExecuteEnd); 83 85 84 86 Vector<JSValue> boxedArgs;
Note: See TracChangeset
for help on using the changeset viewer.