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

Issue 10534063: Reland r11425 "Re-enable optimization for hot functions that have optimization disabled due to many… (Closed)

Created:
8 years, 6 months ago by ulan
Modified:
8 years, 6 months ago
Reviewers:
Jakob Kummerow
CC:
v8-dev
Visibility:
Public.

Description

Reland r11425 "Re-enable optimization for hot functions that have optimization disabled due to many deopts." Fix performance regressions introduced in r11425 by - counting number of function deoptimizations instead of function optimizations, - packing several counters into one field of shared function info. BUG=v8:2040, 121196 R=jkummerow@chromium.org Committed: https://code.google.com/p/v8/source/detail?r=11766

Patch Set 1 #

Total comments: 6

Patch Set 2 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+138 lines, -33 lines) Patch
M src/deoptimizer.cc View 1 chunk +1 line, -0 lines 0 comments Download
M src/heap.h View 1 1 chunk +1 line, -1 line 0 comments Download
M src/heap.cc View 1 1 chunk +2 lines, -2 lines 0 comments Download
M src/ia32/lithium-codegen-ia32.cc View 1 1 chunk +6 lines, -3 lines 0 comments Download
M src/objects.h View 1 7 chunks +35 lines, -14 lines 0 comments Download
M src/objects.cc View 1 1 chunk +1 line, -0 lines 0 comments Download
M src/objects-inl.h View 1 4 chunks +61 lines, -5 lines 0 comments Download
M src/runtime-profiler.cc View 3 chunks +31 lines, -8 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
ulan
Please take a look.
8 years, 6 months ago (2012-06-11 10:10:39 UTC) #1
Jakob Kummerow
LGTM with comments. http://codereview.chromium.org/10534063/diff/1/src/heap.h File src/heap.h (right): http://codereview.chromium.org/10534063/diff/1/src/heap.h#newcode1601 src/heap.h:1601: global_ic_age_ = global_ic_age_ < kMaxICAge ? ...
8 years, 6 months ago (2012-06-11 12:13:59 UTC) #2
ulan
8 years, 6 months ago (2012-06-11 16:07:31 UTC) #3
Addressed comments, landing.

http://codereview.chromium.org/10534063/diff/1/src/heap.h
File src/heap.h (right):

http://codereview.chromium.org/10534063/diff/1/src/heap.h#newcode1601
src/heap.h:1601: global_ic_age_ = global_ic_age_ < kMaxICAge ? global_ic_age_ +
1 : 0;
On 2012/06/11 12:13:59, Jakob wrote:
> I guess it doesn't really matter, but the following would be slightly faster:
> ASSERT((kMaxICAge & (kMaxICAge+1)) == 0);  // kMaxICAge is (2^n)-1.
> global_ic_age_ = (global_ic_age_ + 1) & kMaxICAge;

Done. Left out ASSERT, since BitField<> guarantees that kMax is 2^n-1.

http://codereview.chromium.org/10534063/diff/1/src/objects-inl.h
File src/objects-inl.h (right):

http://codereview.chromium.org/10534063/diff/1/src/objects-inl.h#newcode3928
src/objects-inl.h:3928: int SharedFunctionInfo::ic_age() {
On 2012/06/11 12:13:59, Jakob wrote:
> Y U NO use BitField<type, shift, size>? That'd automate these custom
> implementations. Note that you'd still have to manually do the masking before
> storing, as the BitField implementation ASSERTs that the provided value fits
> into the bit field.

Yeah, BitField is cleaner. Done.

http://codereview.chromium.org/10534063/diff/1/src/objects.h
File src/objects.h (right):

http://codereview.chromium.org/10534063/diff/1/src/objects.h#newcode5698
src/objects.h:5698: kDeoptCountShift,
On 2012/06/11 12:13:59, Jakob wrote:
> Don't you want to set kDeoptCountShift = kCountersSmiTagSize (as defined a few
> lines down)? Does this survive a GC on ia32 if the deopt_count value ends with
a
> 1-bit?
set_counters takes care of this, removed kCountersSmiTagSize.

Powered by Google App Engine
This is Rietveld 408576698