| Index: src/wasm/module-decoder.cc
|
| diff --git a/src/wasm/module-decoder.cc b/src/wasm/module-decoder.cc
|
| index 491a6ccf11d36693d6451676fd5a26cd74ec6403..b772e3fea9877593ba6804df9cd6841d08206388 100644
|
| --- a/src/wasm/module-decoder.cc
|
| +++ b/src/wasm/module-decoder.cc
|
| @@ -1173,8 +1173,10 @@ ModuleResult DecodeWasmModule(Isolate* isolate, const byte* module_start,
|
| // TODO(titzer): this isn't accurate, since it doesn't count the data
|
| // allocated on the C++ heap.
|
| // https://bugs.chromium.org/p/chromium/issues/detail?id=657320
|
| - isolate->counters()->wasm_decode_module_peak_memory_bytes()->AddSample(
|
| - static_cast<int>(zone->allocation_size()));
|
| + (IsWasm(origin)
|
| + ? isolate->counters()->wasm_decode_wasm_module_peak_memory_bytes()
|
| + : isolate->counters()->wasm_decode_asm_module_peak_memory_bytes())
|
| + ->AddSample(static_cast<int>(zone->allocation_size()));
|
| return result;
|
| }
|
|
|
|
|