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

Issue 2759033002: Generate less code in v8::internal::Counters constructor (Closed)

Created:
3 years, 9 months ago by jbroman
Modified:
3 years, 9 months ago
CC:
v8-reviews_googlegroups.com
Target Ref:
refs/heads/master
Project:
v8
Visibility:
Public.

Description

Generate less code in v8::internal::Counters constructor This saves 72 KiB (approximately 0.1%) of the Chrome APK size of for ARM/Android. In Counters, each similar group of counters generates a compact data structure, which a loop then iterates over, rather than having the full loop unrolled (though the compiler will automatically unroll small ones). In RuntimeCallStats, the compiler was not being clever enough to avoid initializing count_ and time_ to zero individually, even after the initialization of names was moved into a loop. As a result, RuntimeCallCounter was modified to have a non-initializing constructor for exclusive use by RuntimeCallStats, which explicitly initializes the counters in a loop. Since v8::base::TimeDelta does not support an uninitialized state, time_ was changed to be stored as int64_t microseconds internally, which generates the same code (it's the same representation as TimeDelta). BUG=v8:6119 Review-Url: https://codereview.chromium.org/2759033002 Cr-Commit-Position: refs/heads/master@{#43996} Committed: https://chromium.googlesource.com/v8/v8/+/53562fd9fbd4a268bd196c93ce3955006097974a

Patch Set 1 #

Patch Set 2 : export for win component build #

Unified diffs Side-by-side diffs Delta from patch set Stats (+161 lines, -80 lines) Patch
M src/counters.h View 1 3 chunks +19 lines, -19 lines 0 comments Download
M src/counters.cc View 3 chunks +142 lines, -61 lines 0 comments Download

Messages

Total messages: 22 (15 generated)
jbroman
WDYT? I'm not eager to make this code slightly messier, but this constructor is surprisingly ...
3 years, 9 months ago (2017-03-20 15:06:06 UTC) #9
fmeawad
3 years, 9 months ago (2017-03-20 15:13:32 UTC) #11
Camillo Bruni
The runtime call stats changes look definitely good. Not so sure about the other timers ...
3 years, 9 months ago (2017-03-20 17:04:08 UTC) #13
Igor Sheludko
lgtm
3 years, 9 months ago (2017-03-21 17:39:43 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2759033002/20001
3 years, 9 months ago (2017-03-21 19:03:57 UTC) #18
lpy
LGTM
3 years, 9 months ago (2017-03-21 19:08:56 UTC) #19
commit-bot: I haz the power
3 years, 9 months ago (2017-03-21 19:31:25 UTC) #22
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://chromium.googlesource.com/v8/v8/+/53562fd9fbd4a268bd196c93ce395500609...

Powered by Google App Engine
This is Rietveld 408576698