Commit dfffde4a authored by Michael Starzinger's avatar Michael Starzinger Committed by Commit Bot

[wasm] Add proper --turbo-stats-wasm flag.

This gathers TurboFan compilation statistics for WebAssembly separately
from the JavaScript statistics. It is a preparation to having multiple
Isolates trigger TurboFan compilations in a shared engine. By adding
compilation statistics to the engine, their lifetime is independent of
any particular Isolate.

R=ahaas@chromium.org

Change-Id: I1bd0fbe6d6bde65ca813ccfd1154558ea6cddb07
Reviewed-on: https://chromium-review.googlesource.com/1131121
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54357}
parent 8442795a
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
#include "src/compiler/pipeline-statistics.h" #include "src/compiler/pipeline-statistics.h"
#include "src/compiler/zone-stats.h" #include "src/compiler/zone-stats.h"
#include "src/isolate.h"
#include "src/objects/shared-function-info.h" #include "src/objects/shared-function-info.h"
#include "src/objects/string.h" #include "src/objects/string.h"
#include "src/optimized-compilation-info.h" #include "src/optimized-compilation-info.h"
...@@ -46,11 +45,11 @@ void PipelineStatistics::CommonStats::End( ...@@ -46,11 +45,11 @@ void PipelineStatistics::CommonStats::End(
} }
PipelineStatistics::PipelineStatistics(OptimizedCompilationInfo* info, PipelineStatistics::PipelineStatistics(OptimizedCompilationInfo* info,
Isolate* isolate, ZoneStats* zone_stats) CompilationStatistics* compilation_stats,
: isolate_(isolate), ZoneStats* zone_stats)
outer_zone_(info->zone()), : outer_zone_(info->zone()),
zone_stats_(zone_stats), zone_stats_(zone_stats),
compilation_stats_(isolate_->GetTurboStatistics()), compilation_stats_(compilation_stats),
source_size_(0), source_size_(0),
phase_kind_name_(nullptr), phase_kind_name_(nullptr),
phase_name_(nullptr) { phase_name_(nullptr) {
......
...@@ -20,8 +20,8 @@ class PhaseScope; ...@@ -20,8 +20,8 @@ class PhaseScope;
class PipelineStatistics : public Malloced { class PipelineStatistics : public Malloced {
public: public:
PipelineStatistics(OptimizedCompilationInfo* info, Isolate* isolate, PipelineStatistics(OptimizedCompilationInfo* info,
ZoneStats* zone_stats); CompilationStatistics* turbo_stats, ZoneStats* zone_stats);
~PipelineStatistics(); ~PipelineStatistics();
void BeginPhaseKind(const char* phase_kind_name); void BeginPhaseKind(const char* phase_kind_name);
...@@ -56,7 +56,6 @@ class PipelineStatistics : public Malloced { ...@@ -56,7 +56,6 @@ class PipelineStatistics : public Malloced {
void BeginPhase(const char* name); void BeginPhase(const char* name);
void EndPhase(); void EndPhase();
Isolate* isolate_;
Zone* outer_zone_; Zone* outer_zone_;
ZoneStats* zone_stats_; ZoneStats* zone_stats_;
CompilationStatistics* compilation_stats_; CompilationStatistics* compilation_stats_;
......
...@@ -760,7 +760,8 @@ PipelineStatistics* CreatePipelineStatistics(Handle<Script> script, ...@@ -760,7 +760,8 @@ PipelineStatistics* CreatePipelineStatistics(Handle<Script> script,
PipelineStatistics* pipeline_statistics = nullptr; PipelineStatistics* pipeline_statistics = nullptr;
if (FLAG_turbo_stats || FLAG_turbo_stats_nvp) { if (FLAG_turbo_stats || FLAG_turbo_stats_nvp) {
pipeline_statistics = new PipelineStatistics(info, isolate, zone_stats); pipeline_statistics =
new PipelineStatistics(info, isolate->GetTurboStatistics(), zone_stats);
pipeline_statistics->BeginPhaseKind("initializing"); pipeline_statistics->BeginPhaseKind("initializing");
} }
...@@ -775,15 +776,16 @@ PipelineStatistics* CreatePipelineStatistics(Handle<Script> script, ...@@ -775,15 +776,16 @@ PipelineStatistics* CreatePipelineStatistics(Handle<Script> script,
return pipeline_statistics; return pipeline_statistics;
} }
PipelineStatistics* CreatePipelineStatistics(wasm::FunctionBody function_body, PipelineStatistics* CreatePipelineStatistics(wasm::WasmEngine* wasm_engine,
wasm::FunctionBody function_body,
wasm::WasmModule* wasm_module, wasm::WasmModule* wasm_module,
OptimizedCompilationInfo* info, OptimizedCompilationInfo* info,
Isolate* isolate,
ZoneStats* zone_stats) { ZoneStats* zone_stats) {
PipelineStatistics* pipeline_statistics = nullptr; PipelineStatistics* pipeline_statistics = nullptr;
if (FLAG_turbo_stats || FLAG_turbo_stats_nvp) { if (FLAG_turbo_stats_wasm) {
pipeline_statistics = new PipelineStatistics(info, isolate, zone_stats); pipeline_statistics = new PipelineStatistics(
info, wasm_engine->GetOrCreateTurboStatistics(), zone_stats);
pipeline_statistics->BeginPhaseKind("initializing"); pipeline_statistics->BeginPhaseKind("initializing");
} }
...@@ -973,16 +975,17 @@ void PipelineCompilationJob::RegisterWeakObjectsInOptimizedCode( ...@@ -973,16 +975,17 @@ void PipelineCompilationJob::RegisterWeakObjectsInOptimizedCode(
class PipelineWasmCompilationJob final : public OptimizedCompilationJob { class PipelineWasmCompilationJob final : public OptimizedCompilationJob {
public: public:
explicit PipelineWasmCompilationJob( explicit PipelineWasmCompilationJob(
OptimizedCompilationInfo* info, Isolate* isolate, MachineGraph* mcgraph, OptimizedCompilationInfo* info, wasm::WasmEngine* wasm_engine,
CallDescriptor* call_descriptor, SourcePositionTable* source_positions, Isolate* isolate, MachineGraph* mcgraph, CallDescriptor* call_descriptor,
NodeOriginTable* node_origins, WasmCompilationData* wasm_compilation_data, SourcePositionTable* source_positions, NodeOriginTable* node_origins,
WasmCompilationData* wasm_compilation_data,
wasm::FunctionBody function_body, wasm::WasmModule* wasm_module, wasm::FunctionBody function_body, wasm::WasmModule* wasm_module,
wasm::NativeModule* native_module, int function_index, bool asmjs_origin) wasm::NativeModule* native_module, int function_index, bool asmjs_origin)
: OptimizedCompilationJob(isolate->stack_guard()->real_climit(), info, : OptimizedCompilationJob(isolate->stack_guard()->real_climit(), info,
"TurboFan", State::kReadyToExecute), "TurboFan", State::kReadyToExecute),
zone_stats_(isolate->allocator()), zone_stats_(isolate->allocator()),
pipeline_statistics_(CreatePipelineStatistics( pipeline_statistics_(CreatePipelineStatistics(
function_body, wasm_module, info, isolate, &zone_stats_)), wasm_engine, function_body, wasm_module, info, &zone_stats_)),
data_(&zone_stats_, isolate, info, mcgraph, pipeline_statistics_.get(), data_(&zone_stats_, isolate, info, mcgraph, pipeline_statistics_.get(),
source_positions, node_origins, wasm_compilation_data, source_positions, node_origins, wasm_compilation_data,
function_index, WasmAssemblerOptions(isolate)), function_index, WasmAssemblerOptions(isolate)),
...@@ -1019,8 +1022,9 @@ PipelineWasmCompilationJob::ExecuteJobImpl() { ...@@ -1019,8 +1022,9 @@ PipelineWasmCompilationJob::ExecuteJobImpl() {
pipeline_.RunPrintAndVerify("Machine", true); pipeline_.RunPrintAndVerify("Machine", true);
PipelineData* data = &data_; PipelineData* data = &data_;
PipelineRunScope scope(data, "wasm optimization"); data->BeginPhaseKind("wasm optimization");
if (FLAG_wasm_opt || asmjs_origin_) { if (FLAG_wasm_opt || asmjs_origin_) {
PipelineRunScope scope(data, "wasm full optimization");
GraphReducer graph_reducer(scope.zone(), data->graph(), GraphReducer graph_reducer(scope.zone(), data->graph(),
data->mcgraph()->Dead()); data->mcgraph()->Dead());
DeadCodeElimination dead_code_elimination(&graph_reducer, data->graph(), DeadCodeElimination dead_code_elimination(&graph_reducer, data->graph(),
...@@ -1036,6 +1040,7 @@ PipelineWasmCompilationJob::ExecuteJobImpl() { ...@@ -1036,6 +1040,7 @@ PipelineWasmCompilationJob::ExecuteJobImpl() {
AddReducer(data, &graph_reducer, &value_numbering); AddReducer(data, &graph_reducer, &value_numbering);
graph_reducer.ReduceGraph(); graph_reducer.ReduceGraph();
} else { } else {
PipelineRunScope scope(data, "wasm base optimization");
GraphReducer graph_reducer(scope.zone(), data->graph(), GraphReducer graph_reducer(scope.zone(), data->graph(),
data->mcgraph()->Dead()); data->mcgraph()->Dead());
ValueNumberingReducer value_numbering(scope.zone(), data->graph()->zone()); ValueNumberingReducer value_numbering(scope.zone(), data->graph()->zone());
...@@ -2124,8 +2129,8 @@ MaybeHandle<Code> Pipeline::GenerateCodeForCodeStub( ...@@ -2124,8 +2129,8 @@ MaybeHandle<Code> Pipeline::GenerateCodeForCodeStub(
data.set_verify_graph(FLAG_verify_csa); data.set_verify_graph(FLAG_verify_csa);
std::unique_ptr<PipelineStatistics> pipeline_statistics; std::unique_ptr<PipelineStatistics> pipeline_statistics;
if (FLAG_turbo_stats || FLAG_turbo_stats_nvp) { if (FLAG_turbo_stats || FLAG_turbo_stats_nvp) {
pipeline_statistics.reset( pipeline_statistics.reset(new PipelineStatistics(
new PipelineStatistics(&info, isolate, &zone_stats)); &info, isolate->GetTurboStatistics(), &zone_stats));
pipeline_statistics->BeginPhaseKind("stub codegen"); pipeline_statistics->BeginPhaseKind("stub codegen");
} }
...@@ -2195,8 +2200,8 @@ MaybeHandle<Code> Pipeline::GenerateCodeForTesting( ...@@ -2195,8 +2200,8 @@ MaybeHandle<Code> Pipeline::GenerateCodeForTesting(
source_positions, node_positions, nullptr, options); source_positions, node_positions, nullptr, options);
std::unique_ptr<PipelineStatistics> pipeline_statistics; std::unique_ptr<PipelineStatistics> pipeline_statistics;
if (FLAG_turbo_stats || FLAG_turbo_stats_nvp) { if (FLAG_turbo_stats || FLAG_turbo_stats_nvp) {
pipeline_statistics.reset( pipeline_statistics.reset(new PipelineStatistics(
new PipelineStatistics(info, isolate, &zone_stats)); info, isolate->GetTurboStatistics(), &zone_stats));
pipeline_statistics->BeginPhaseKind("test codegen"); pipeline_statistics->BeginPhaseKind("test codegen");
} }
...@@ -2233,16 +2238,17 @@ OptimizedCompilationJob* Pipeline::NewCompilationJob( ...@@ -2233,16 +2238,17 @@ OptimizedCompilationJob* Pipeline::NewCompilationJob(
// static // static
OptimizedCompilationJob* Pipeline::NewWasmCompilationJob( OptimizedCompilationJob* Pipeline::NewWasmCompilationJob(
OptimizedCompilationInfo* info, Isolate* isolate, MachineGraph* mcgraph, OptimizedCompilationInfo* info, wasm::WasmEngine* wasm_engine,
CallDescriptor* call_descriptor, SourcePositionTable* source_positions, Isolate* isolate, MachineGraph* mcgraph, CallDescriptor* call_descriptor,
NodeOriginTable* node_origins, WasmCompilationData* wasm_compilation_data, SourcePositionTable* source_positions, NodeOriginTable* node_origins,
WasmCompilationData* wasm_compilation_data,
wasm::FunctionBody function_body, wasm::WasmModule* wasm_module, wasm::FunctionBody function_body, wasm::WasmModule* wasm_module,
wasm::NativeModule* native_module, int function_index, wasm::NativeModule* native_module, int function_index,
wasm::ModuleOrigin asmjs_origin) { wasm::ModuleOrigin asmjs_origin) {
return new PipelineWasmCompilationJob( return new PipelineWasmCompilationJob(
info, isolate, mcgraph, call_descriptor, source_positions, node_origins, info, wasm_engine, isolate, mcgraph, call_descriptor, source_positions,
wasm_compilation_data, function_body, wasm_module, native_module, node_origins, wasm_compilation_data, function_body, wasm_module,
function_index, asmjs_origin); native_module, function_index, asmjs_origin);
} }
bool Pipeline::AllocateRegistersForTesting(const RegisterConfiguration* config, bool Pipeline::AllocateRegistersForTesting(const RegisterConfiguration* config,
......
...@@ -24,6 +24,7 @@ namespace wasm { ...@@ -24,6 +24,7 @@ namespace wasm {
enum ModuleOrigin : uint8_t; enum ModuleOrigin : uint8_t;
struct FunctionBody; struct FunctionBody;
class NativeModule; class NativeModule;
class WasmEngine;
struct WasmModule; struct WasmModule;
} // namespace wasm } // namespace wasm
...@@ -47,9 +48,10 @@ class Pipeline : public AllStatic { ...@@ -47,9 +48,10 @@ class Pipeline : public AllStatic {
// Returns a new compilation job for the WebAssembly compilation info. // Returns a new compilation job for the WebAssembly compilation info.
static OptimizedCompilationJob* NewWasmCompilationJob( static OptimizedCompilationJob* NewWasmCompilationJob(
OptimizedCompilationInfo* info, Isolate* isolate, MachineGraph* mcgraph, OptimizedCompilationInfo* info, wasm::WasmEngine* wasm_engine,
CallDescriptor* call_descriptor, SourcePositionTable* source_positions, Isolate* isolate, MachineGraph* mcgraph, CallDescriptor* call_descriptor,
NodeOriginTable* node_origins, WasmCompilationData* wasm_compilation_data, SourcePositionTable* source_positions, NodeOriginTable* node_origins,
WasmCompilationData* wasm_compilation_data,
wasm::FunctionBody function_body, wasm::WasmModule* wasm_module, wasm::FunctionBody function_body, wasm::WasmModule* wasm_module,
wasm::NativeModule* native_module, int function_index, wasm::NativeModule* native_module, int function_index,
wasm::ModuleOrigin wasm_origin); wasm::ModuleOrigin wasm_origin);
......
...@@ -5211,9 +5211,9 @@ void TurbofanWasmCompilationUnit::ExecuteCompilation() { ...@@ -5211,9 +5211,9 @@ void TurbofanWasmCompilationUnit::ExecuteCompilation() {
} }
job_.reset(Pipeline::NewWasmCompilationJob( job_.reset(Pipeline::NewWasmCompilationJob(
info_.get(), wasm_unit_->isolate_, mcgraph_, call_descriptor, info_.get(), wasm_unit_->isolate_->wasm_engine(), wasm_unit_->isolate_,
source_positions, node_origins, &wasm_compilation_data_, mcgraph_, call_descriptor, source_positions, node_origins,
wasm_unit_->func_body_, &wasm_compilation_data_, wasm_unit_->func_body_,
const_cast<wasm::WasmModule*>(wasm_unit_->env_->module), const_cast<wasm::WasmModule*>(wasm_unit_->env_->module),
wasm_unit_->native_module_, wasm_unit_->func_index_, wasm_unit_->native_module_, wasm_unit_->func_index_,
wasm_unit_->env_->module->origin)); wasm_unit_->env_->module->origin));
......
...@@ -430,6 +430,8 @@ DEFINE_STRING(csa_trap_on_node, nullptr, ...@@ -430,6 +430,8 @@ DEFINE_STRING(csa_trap_on_node, nullptr,
DEFINE_BOOL(turbo_stats, false, "print TurboFan statistics") DEFINE_BOOL(turbo_stats, false, "print TurboFan statistics")
DEFINE_BOOL(turbo_stats_nvp, false, DEFINE_BOOL(turbo_stats_nvp, false,
"print TurboFan statistics in machine-readable format") "print TurboFan statistics in machine-readable format")
DEFINE_BOOL(turbo_stats_wasm, false,
"print TurboFan statistics of wasm compilations")
DEFINE_BOOL(turbo_splitting, true, "split nodes during scheduling in TurboFan") DEFINE_BOOL(turbo_splitting, true, "split nodes during scheduling in TurboFan")
DEFINE_BOOL(function_context_specialization, false, DEFINE_BOOL(function_context_specialization, false,
"enable function context specialization in TurboFan") "enable function context specialization in TurboFan")
...@@ -528,8 +530,6 @@ DEFINE_BOOL(wasm_async_compilation, true, ...@@ -528,8 +530,6 @@ DEFINE_BOOL(wasm_async_compilation, true,
"enable actual asynchronous compilation for WebAssembly.compile") "enable actual asynchronous compilation for WebAssembly.compile")
DEFINE_BOOL(wasm_test_streaming, false, DEFINE_BOOL(wasm_test_streaming, false,
"use streaming compilation instead of async compilation for tests") "use streaming compilation instead of async compilation for tests")
// Parallel compilation confuses turbo_stats, force single threaded.
DEFINE_VALUE_IMPLICATION(turbo_stats, wasm_num_compilation_tasks, 0)
DEFINE_UINT(wasm_max_mem_pages, v8::internal::wasm::kV8MaxWasmMemoryPages, DEFINE_UINT(wasm_max_mem_pages, v8::internal::wasm::kV8MaxWasmMemoryPages,
"maximum memory size of a wasm instance") "maximum memory size of a wasm instance")
DEFINE_UINT(wasm_max_table_size, v8::internal::wasm::kV8MaxWasmTableSize, DEFINE_UINT(wasm_max_table_size, v8::internal::wasm::kV8MaxWasmTableSize,
......
...@@ -3233,7 +3233,6 @@ void Isolate::UnlinkDeferredHandles(DeferredHandles* deferred) { ...@@ -3233,7 +3233,6 @@ void Isolate::UnlinkDeferredHandles(DeferredHandles* deferred) {
void Isolate::DumpAndResetStats() { void Isolate::DumpAndResetStats() {
if (turbo_statistics() != nullptr) { if (turbo_statistics() != nullptr) {
DCHECK(FLAG_turbo_stats || FLAG_turbo_stats_nvp); DCHECK(FLAG_turbo_stats || FLAG_turbo_stats_nvp);
StdoutStream os; StdoutStream os;
if (FLAG_turbo_stats) { if (FLAG_turbo_stats) {
AsPrintableStatistics ps = {*turbo_statistics(), false}; AsPrintableStatistics ps = {*turbo_statistics(), false};
...@@ -3243,9 +3242,14 @@ void Isolate::DumpAndResetStats() { ...@@ -3243,9 +3242,14 @@ void Isolate::DumpAndResetStats() {
AsPrintableStatistics ps = {*turbo_statistics(), true}; AsPrintableStatistics ps = {*turbo_statistics(), true};
os << ps << std::endl; os << ps << std::endl;
} }
}
delete turbo_statistics_; delete turbo_statistics_;
turbo_statistics_ = nullptr; turbo_statistics_ = nullptr;
}
// TODO(7424): There is no public API for the {WasmEngine} yet. So for now we
// just dump and reset the engines statistics together with the Isolate.
if (FLAG_turbo_stats_wasm) {
wasm_engine()->DumpAndResetTurboStatistics();
}
if (V8_UNLIKELY(FLAG_runtime_stats == if (V8_UNLIKELY(FLAG_runtime_stats ==
v8::tracing::TracingCategoryObserver::ENABLED_BY_NATIVE)) { v8::tracing::TracingCategoryObserver::ENABLED_BY_NATIVE)) {
counters()->runtime_call_stats()->Print(); counters()->runtime_call_stats()->Print();
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
#include "src/wasm/wasm-engine.h" #include "src/wasm/wasm-engine.h"
#include "src/compilation-statistics.h"
#include "src/objects-inl.h" #include "src/objects-inl.h"
#include "src/objects/js-promise.h" #include "src/objects/js-promise.h"
#include "src/wasm/module-compiler.h" #include "src/wasm/module-compiler.h"
...@@ -15,6 +16,11 @@ namespace v8 { ...@@ -15,6 +16,11 @@ namespace v8 {
namespace internal { namespace internal {
namespace wasm { namespace wasm {
WasmEngine::WasmEngine(std::unique_ptr<WasmCodeManager> code_manager)
: code_manager_(std::move(code_manager)) {}
WasmEngine::~WasmEngine() = default;
bool WasmEngine::SyncValidate(Isolate* isolate, const ModuleWireBytes& bytes) { bool WasmEngine::SyncValidate(Isolate* isolate, const ModuleWireBytes& bytes) {
// TODO(titzer): remove dependency on the isolate. // TODO(titzer): remove dependency on the isolate.
if (bytes.start() == nullptr || bytes.length() == 0) return false; if (bytes.start() == nullptr || bytes.length() == 0) return false;
...@@ -151,6 +157,21 @@ std::shared_ptr<StreamingDecoder> WasmEngine::StartStreamingCompilation( ...@@ -151,6 +157,21 @@ std::shared_ptr<StreamingDecoder> WasmEngine::StartStreamingCompilation(
return job->CreateStreamingDecoder(); return job->CreateStreamingDecoder();
} }
CompilationStatistics* WasmEngine::GetOrCreateTurboStatistics() {
if (compilation_stats_ == nullptr) {
compilation_stats_.reset(new CompilationStatistics());
}
return compilation_stats_.get();
}
void WasmEngine::DumpAndResetTurboStatistics() {
if (compilation_stats_ != nullptr) {
StdoutStream os;
os << AsPrintableStatistics{*compilation_stats_.get(), false} << std::endl;
}
compilation_stats_.reset();
}
void WasmEngine::Register(CancelableTaskManager* task_manager) { void WasmEngine::Register(CancelableTaskManager* task_manager) {
task_managers_.emplace_back(task_manager); task_managers_.emplace_back(task_manager);
} }
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
namespace v8 { namespace v8 {
namespace internal { namespace internal {
class CompilationStatistics;
class WasmModuleObject; class WasmModuleObject;
class WasmInstanceObject; class WasmInstanceObject;
...@@ -40,8 +41,8 @@ class V8_EXPORT_PRIVATE InstantiationResultResolver { ...@@ -40,8 +41,8 @@ class V8_EXPORT_PRIVATE InstantiationResultResolver {
// loading, instantiating, and executing WASM code. // loading, instantiating, and executing WASM code.
class V8_EXPORT_PRIVATE WasmEngine { class V8_EXPORT_PRIVATE WasmEngine {
public: public:
explicit WasmEngine(std::unique_ptr<WasmCodeManager> code_manager) explicit WasmEngine(std::unique_ptr<WasmCodeManager> code_manager);
: code_manager_(std::move(code_manager)) {} ~WasmEngine();
// Synchronously validates the given bytes that represent an encoded WASM // Synchronously validates the given bytes that represent an encoded WASM
// module. // module.
...@@ -92,6 +93,12 @@ class V8_EXPORT_PRIVATE WasmEngine { ...@@ -92,6 +93,12 @@ class V8_EXPORT_PRIVATE WasmEngine {
AccountingAllocator* allocator() { return &allocator_; } AccountingAllocator* allocator() { return &allocator_; }
// Compilation statistics for TurboFan compilations.
CompilationStatistics* GetOrCreateTurboStatistics();
// Prints the gathered compilation statistics, then resets them.
void DumpAndResetTurboStatistics();
// We register and unregister CancelableTaskManagers that run engine-dependent // We register and unregister CancelableTaskManagers that run engine-dependent
// tasks. These tasks need to be shutdown if the engine is shut down. // tasks. These tasks need to be shutdown if the engine is shut down.
void Register(CancelableTaskManager* task_manager); void Register(CancelableTaskManager* task_manager);
...@@ -120,6 +127,7 @@ class V8_EXPORT_PRIVATE WasmEngine { ...@@ -120,6 +127,7 @@ class V8_EXPORT_PRIVATE WasmEngine {
// job from the map when it is finished. // job from the map when it is finished.
std::unordered_map<AsyncCompileJob*, std::unique_ptr<AsyncCompileJob>> jobs_; std::unordered_map<AsyncCompileJob*, std::unique_ptr<AsyncCompileJob>> jobs_;
std::unique_ptr<WasmCodeManager> code_manager_; std::unique_ptr<WasmCodeManager> code_manager_;
std::unique_ptr<CompilationStatistics> compilation_stats_;
WasmMemoryTracker memory_tracker_; WasmMemoryTracker memory_tracker_;
AccountingAllocator allocator_; AccountingAllocator allocator_;
......
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