Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(223)

Side by Side Diff: src/wasm/wasm-module.cc

Issue 2778493002: Separate module compile counter for asm and wasm. (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/counters.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <memory> 5 #include <memory>
6 6
7 #include "src/assembler-inl.h" 7 #include "src/assembler-inl.h"
8 #include "src/base/adapters.h" 8 #include "src/base/adapters.h"
9 #include "src/base/atomic-utils.h" 9 #include "src/base/atomic-utils.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after
507 Handle<FixedArray> signature_tables = 507 Handle<FixedArray> signature_tables =
508 factory->NewFixedArray(function_table_count, TENURED); 508 factory->NewFixedArray(function_table_count, TENURED);
509 for (int i = 0; i < function_table_count; ++i) { 509 for (int i = 0; i < function_table_count; ++i) {
510 temp_instance.function_tables[i] = factory->NewFixedArray(1, TENURED); 510 temp_instance.function_tables[i] = factory->NewFixedArray(1, TENURED);
511 temp_instance.signature_tables[i] = factory->NewFixedArray(1, TENURED); 511 temp_instance.signature_tables[i] = factory->NewFixedArray(1, TENURED);
512 function_tables->set(i, *temp_instance.function_tables[i]); 512 function_tables->set(i, *temp_instance.function_tables[i]);
513 signature_tables->set(i, *temp_instance.signature_tables[i]); 513 signature_tables->set(i, *temp_instance.signature_tables[i]);
514 } 514 }
515 515
516 HistogramTimerScope wasm_compile_module_time_scope( 516 HistogramTimerScope wasm_compile_module_time_scope(
517 isolate_->counters()->wasm_compile_module_time()); 517 module_->origin == ModuleOrigin::kWasmOrigin
bbudge 2017/03/24 19:19:01 Since we'll be doing this check all over the place
Karl 2017/03/24 21:19:58 Part of the problem is that the origin field is NO
518 ? isolate_->counters()->wasm_compile_wasm_module_time()
519 : isolate_->counters()->wasm_compile_asm_module_time());
518 520
519 ModuleBytesEnv module_env(module_, &temp_instance, wire_bytes); 521 ModuleBytesEnv module_env(module_, &temp_instance, wire_bytes);
520 522
521 // The {code_table} array contains import wrappers and functions (which 523 // The {code_table} array contains import wrappers and functions (which
522 // are both included in {functions.size()}, and export wrappers. 524 // are both included in {functions.size()}, and export wrappers.
523 int code_table_size = static_cast<int>(module_->functions.size() + 525 int code_table_size = static_cast<int>(module_->functions.size() +
524 module_->num_exported_functions); 526 module_->num_exported_functions);
525 Handle<FixedArray> code_table = 527 Handle<FixedArray> code_table =
526 factory->NewFixedArray(static_cast<int>(code_table_size), TENURED); 528 factory->NewFixedArray(static_cast<int>(code_table_size), TENURED);
527 529
(...skipping 2681 matching lines...) Expand 10 before | Expand all | Expand 10 after
3209 callee_compiled->instruction_start()); 3211 callee_compiled->instruction_start());
3210 } 3212 }
3211 DCHECK_EQ(non_compiled_functions.size(), idx); 3213 DCHECK_EQ(non_compiled_functions.size(), idx);
3212 } 3214 }
3213 3215
3214 Code* ret = 3216 Code* ret =
3215 Code::cast(compiled_module->code_table()->get(func_to_return_idx)); 3217 Code::cast(compiled_module->code_table()->get(func_to_return_idx));
3216 DCHECK_EQ(Code::WASM_FUNCTION, ret->kind()); 3218 DCHECK_EQ(Code::WASM_FUNCTION, ret->kind());
3217 return handle(ret, isolate); 3219 return handle(ret, isolate);
3218 } 3220 }
OLDNEW
« no previous file with comments | « src/counters.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698