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

Unified Diff: src/counters.cc

Issue 2188953003: Uninline RuntimeCallStatEntries::Add to save binary size. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Comment clarification Created 4 years, 5 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/counters.cc
diff --git a/src/counters.cc b/src/counters.cc
index 57dad3db1d9a22409a163d3218794b384180a044..797630833a35025aa7e64de22fc04045f71b64b3 100644
--- a/src/counters.cc
+++ b/src/counters.cc
@@ -212,7 +212,10 @@ class RuntimeCallStatEntries {
Entry("Total", total_time, total_call_count).Print(os);
}
- void Add(RuntimeCallCounter* counter) {
+ // By default, the compiler will usually inline this, which results in a large
+ // binary size increase: std::vector::push_back expands to a large amount of
+ // instructions, and this function is invoked repeatedly by macros.
+ V8_NOINLINE void Add(RuntimeCallCounter* counter) {
if (counter->count == 0) return;
entries.push_back(Entry(counter->name, counter->time, counter->count));
total_time += counter->time;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698