Index: src/wasm/module-decoder.cc |
diff --git a/src/wasm/module-decoder.cc b/src/wasm/module-decoder.cc |
index b772e3fea9877593ba6804df9cd6841d08206388..d79f2dae6cc9d3e44318d86cc5d9f86574ba78da 100644 |
--- a/src/wasm/module-decoder.cc |
+++ b/src/wasm/module-decoder.cc |
@@ -1162,8 +1162,9 @@ ModuleResult DecodeWasmModule(Isolate* isolate, const byte* module_start, |
if (size >= kV8MaxWasmModuleSize) |
return ModuleError("size > maximum module size"); |
// TODO(bradnelson): Improve histogram handling of size_t. |
- isolate->counters()->wasm_module_size_bytes()->AddSample( |
- static_cast<int>(size)); |
+ (IsWasm(origin) ? isolate->counters()->wasm_wasm_module_size_bytes() |
+ : isolate->counters()->wasm_asm_module_size_bytes()) |
+ ->AddSample(static_cast<int>(size)); |
// Signatures are stored in zone memory, which have the same lifetime |
// as the {module}. |
Zone* zone = new Zone(isolate->allocator(), ZONE_NAME); |