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

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

Issue 2783713002: Separate module max memory pages counter for asm.js/WASM. (Closed)
Patch Set: Fix merge conflicts with master 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/wasm-module.cc
diff --git a/src/wasm/wasm-module.cc b/src/wasm/wasm-module.cc
index d880547868055450f4ea5a904cb68b9c58898268..cfffcec07e7d7dd5aa83ba9e115e7b0ebb5b552a 100644
--- a/src/wasm/wasm-module.cc
+++ b/src/wasm/wasm-module.cc
@@ -2347,9 +2347,12 @@ uint32_t GetMaxInstanceMemoryPages(Isolate* isolate,
if (maximum < FLAG_wasm_max_mem_pages) return maximum;
}
}
- uint32_t compiled_max_pages = instance->compiled_module()->max_mem_pages();
- isolate->counters()->wasm_max_mem_pages_count()->AddSample(
- compiled_max_pages);
+ WasmCompiledModule* compiled_module = instance->compiled_module();
+ uint32_t compiled_max_pages = compiled_module->max_mem_pages();
+ (compiled_module->module()->is_wasm()
+ ? isolate->counters()->wasm_wasm_max_mem_pages_count()
+ : isolate->counters()->wasm_asm_max_mem_pages_count())
+ ->AddSample(compiled_max_pages);
if (compiled_max_pages != 0) return compiled_max_pages;
return FLAG_wasm_max_mem_pages;
}
« 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