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

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

Issue 2887193002: Create a thread safe version of StatsCounters and use. (Closed)
Patch Set: fix nits of mtrofin Created 3 years, 7 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
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 #ifndef V8_WASM_MODULE_H_ 5 #ifndef V8_WASM_MODULE_H_
6 #define V8_WASM_MODULE_H_ 6 #define V8_WASM_MODULE_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "src/api.h" 10 #include "src/api.h"
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after
494 Handle<Code> CompileLazy(Isolate* isolate); 494 Handle<Code> CompileLazy(Isolate* isolate);
495 495
496 // This class orchestrates the lazy compilation of wasm functions. It is 496 // This class orchestrates the lazy compilation of wasm functions. It is
497 // triggered by the WasmCompileLazy builtin. 497 // triggered by the WasmCompileLazy builtin.
498 // It contains the logic for compiling and specializing wasm functions, and 498 // It contains the logic for compiling and specializing wasm functions, and
499 // patching the calling wasm code. 499 // patching the calling wasm code.
500 // Once we support concurrent lazy compilation, this class will contain the 500 // Once we support concurrent lazy compilation, this class will contain the
501 // logic to actually orchestrate parallel execution of wasm compilation jobs. 501 // logic to actually orchestrate parallel execution of wasm compilation jobs.
502 // TODO(clemensh): Implement concurrent lazy compilation. 502 // TODO(clemensh): Implement concurrent lazy compilation.
503 class LazyCompilationOrchestrator { 503 class LazyCompilationOrchestrator {
504 void CompileFunction(Isolate*, Handle<WasmInstanceObject>, int func_index); 504 void CompileFunction(Isolate*, Handle<WasmInstanceObject>, int func_index,
505 Counters* counters);
505 506
506 public: 507 public:
507 Handle<Code> CompileLazy(Isolate*, Handle<WasmInstanceObject>, 508 Handle<Code> CompileLazy(Isolate*, Handle<WasmInstanceObject>,
508 Handle<Code> caller, int call_offset, 509 Handle<Code> caller, int call_offset,
509 int exported_func_index, bool patch_caller); 510 int exported_func_index, bool patch_caller);
510 }; 511 };
511 512
512 namespace testing { 513 namespace testing {
513 void ValidateInstancesChain(Isolate* isolate, 514 void ValidateInstancesChain(Isolate* isolate,
514 Handle<WasmModuleObject> module_obj, 515 Handle<WasmModuleObject> module_obj,
515 int instance_count); 516 int instance_count);
516 void ValidateModuleState(Isolate* isolate, Handle<WasmModuleObject> module_obj); 517 void ValidateModuleState(Isolate* isolate, Handle<WasmModuleObject> module_obj);
517 void ValidateOrphanedInstance(Isolate* isolate, 518 void ValidateOrphanedInstance(Isolate* isolate,
518 Handle<WasmInstanceObject> instance); 519 Handle<WasmInstanceObject> instance);
519 } // namespace testing 520 } // namespace testing
520 } // namespace wasm 521 } // namespace wasm
521 } // namespace internal 522 } // namespace internal
522 } // namespace v8 523 } // namespace v8
523 524
524 #endif // V8_WASM_MODULE_H_ 525 #endif // V8_WASM_MODULE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698