Chromium Code Reviews| Index: src/compiler/wasm-compiler.cc |
| diff --git a/src/compiler/wasm-compiler.cc b/src/compiler/wasm-compiler.cc |
| index 531fef51f8a2bdff8bbcc6ae45746dc328bee6ce..68be6f7b9c3f4ad21ec4a4e88dd62707c89bed72 100644 |
| --- a/src/compiler/wasm-compiler.cc |
| +++ b/src/compiler/wasm-compiler.cc |
| @@ -3908,27 +3908,24 @@ Vector<const char> GetDebugName(Zone* zone, wasm::WasmName name, int index) { |
| WasmCompilationUnit::WasmCompilationUnit(Isolate* isolate, |
| wasm::ModuleBytesEnv* module_env, |
| - const wasm::WasmFunction* function, |
| - bool is_sync) |
| + const wasm::WasmFunction* function) |
| : WasmCompilationUnit( |
| isolate, &module_env->module_env, |
| wasm::FunctionBody{ |
| function->sig, module_env->wire_bytes.start(), |
| module_env->wire_bytes.start() + function->code_start_offset, |
| module_env->wire_bytes.start() + function->code_end_offset}, |
| - module_env->wire_bytes.GetNameOrNull(function), function->func_index, |
| - is_sync) {} |
| + module_env->wire_bytes.GetNameOrNull(function), |
| + function->func_index) {} |
| WasmCompilationUnit::WasmCompilationUnit(Isolate* isolate, |
| wasm::ModuleEnv* module_env, |
| wasm::FunctionBody body, |
| - wasm::WasmName name, int index, |
| - bool is_sync) |
| + wasm::WasmName name, int index) |
| : isolate_(isolate), |
| module_env_(module_env), |
| func_body_(body), |
| func_name_(name), |
| - is_sync_(is_sync), |
| graph_zone_(new Zone(isolate->allocator(), ZONE_NAME)), |
| jsgraph_(new (graph_zone()) JSGraph( |
| isolate, new (graph_zone()) Graph(graph_zone()), |
| @@ -3956,18 +3953,8 @@ void WasmCompilationUnit::InitializeHandles() { |
| void WasmCompilationUnit::ExecuteCompilation() { |
| DCHECK(handles_initialized_); |
| - if (is_sync_) { |
| - // TODO(karlschimpf): Make this work when asynchronous. |
| - // https://bugs.chromium.org/p/v8/issues/detail?id=6361 |
| - HistogramTimerScope wasm_compile_function_time_scope( |
| - isolate_->counters()->wasm_compile_function_time()); |
| - ExecuteCompilationInternal(); |
| - return; |
| - } |
| - ExecuteCompilationInternal(); |
| -} |
| - |
| -void WasmCompilationUnit::ExecuteCompilationInternal() { |
| + HistogramTimerScope wasm_compile_function_time_scope( |
| + isolate_->counters()->wasm_compile_function_time()); |
|
jochen (gone - plz use gerrit)
2017/06/12 09:18:34
no isolate_ deref on background threads
kschimpf
2017/06/12 16:47:04
It turns out that this step is not run in the back
|
| if (FLAG_trace_wasm_compiler) { |
| if (func_name_.start() != nullptr) { |
| PrintF("Compiling wasm function %d:'%.*s'\n\n", func_index(), |
| @@ -4006,11 +3993,8 @@ void WasmCompilationUnit::ExecuteCompilationInternal() { |
| !module_env_->module->is_wasm())); |
| ok_ = job_->ExecuteJob() == CompilationJob::SUCCEEDED; |
| // TODO(bradnelson): Improve histogram handling of size_t. |
| - if (is_sync_) |
| - // TODO(karlschimpf): Make this work when asynchronous. |
| - // https://bugs.chromium.org/p/v8/issues/detail?id=6361 |
| - isolate_->counters()->wasm_compile_function_peak_memory_bytes()->AddSample( |
| - static_cast<int>(jsgraph_->graph()->zone()->allocation_size())); |
| + isolate_->counters()->wasm_compile_function_peak_memory_bytes()->AddSample( |
| + static_cast<int>(jsgraph_->graph()->zone()->allocation_size())); |
| if (FLAG_trace_wasm_decode_time) { |
| double pipeline_ms = pipeline_timer.Elapsed().InMillisecondsF(); |