Commit 00803fe0 authored by mtrofin's avatar mtrofin Committed by Commit bot

[wasm] record stats at compile time

We were losing the stats for the first instance. Recording them
as soon as code objects are produced. This way, we have them available
for compile-only benchmarks.

Review-Url: https://codereview.chromium.org/2556963003
Cr-Commit-Position: refs/heads/master@{#41574}
parent 0df85278
......@@ -883,6 +883,7 @@ MaybeHandle<WasmCompiledModule> WasmModule::CompileFunctions(
i < temp_instance.function_code.size(); ++i) {
Code* code = *temp_instance.function_code[i];
code_table->set(static_cast<int>(i), code);
RecordStats(isolate, code);
}
// Link the functions in the module.
......@@ -921,6 +922,7 @@ MaybeHandle<WasmCompiledModule> WasmModule::CompileFunctions(
compiler::CompileJSToWasmWrapper(isolate, this, wasm_code, exp.index);
int export_index = static_cast<int>(functions.size() + func_index);
code_table->set(export_index, *wrapper_code);
RecordStats(isolate, *wrapper_code);
func_index++;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment