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

Unified Diff: src/heap/object-stats.cc

Issue 2194843002: object-stats.cc: Annotate PrintJSONArray with V8_NOINLINE (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add comment 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/heap/object-stats.cc
diff --git a/src/heap/object-stats.cc b/src/heap/object-stats.cc
index 271d1783548c95c371bdcd78a5b0178eebf4dff1..34621a95a92bb72b6dfb756b3e781562b22bdd8e 100644
--- a/src/heap/object-stats.cc
+++ b/src/heap/object-stats.cc
@@ -29,7 +29,10 @@ void ObjectStats::ClearObjectStats(bool clear_last_time_stats) {
visited_fixed_array_sub_types_.clear();
}
-static void PrintJSONArray(size_t* array, const int len) {
+// Tell the compiler to never inline this: occasionally, the optimizer will
+// decide to inline this and unroll the loop, making the compiled code more than
+// 100KB larger.
+V8_NOINLINE static void PrintJSONArray(size_t* array, const int len) {
PrintF("[ ");
for (int i = 0; i < len; i++) {
PrintF("%zu", array[i]);
« 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