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

Unified Diff: src/wasm/module-decoder.cc

Issue 2777203005: Separate module byte size counter for asm.js/wasm. (Closed)
Patch Set: Remove files that shouldn't be in CL. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/counters.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« 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