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

Issue 6821009: Introduce runtime function %OptimizeFunctionOnNextCall to manually trigger optimization. (Closed)

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

Description

Introduce runtime function %OptimizeFunctionOnNextCall to manually trigger optimization. TEST=existing unit tests still pass Committed: http://code.google.com/p/v8/source/detail?r=7572

Patch Set 1 #

Total comments: 29

Patch Set 2 : address comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+340 lines, -105 lines) Patch
M src/objects.h View 1 1 chunk +3 lines, -0 lines 0 comments Download
M src/objects-inl.h View 1 1 chunk +5 lines, -0 lines 0 comments Download
M src/runtime.h View 1 chunk +2 lines, -1 line 0 comments Download
M src/runtime.cc View 1 chunk +10 lines, -0 lines 0 comments Download
M src/runtime-profiler.cc View 1 5 chunks +4 lines, -10 lines 0 comments Download
M test/mjsunit/compiler/array-length.js View 2 chunks +9 lines, -2 lines 0 comments Download
M test/mjsunit/compiler/assignment-deopt.js View 7 chunks +50 lines, -16 lines 0 comments Download
M test/mjsunit/compiler/count-deopt.js View 7 chunks +46 lines, -16 lines 0 comments Download
M test/mjsunit/compiler/deopt-args.js View 2 chunks +5 lines, -1 line 0 comments Download
M test/mjsunit/compiler/inline-compare.js View 2 chunks +5 lines, -1 line 0 comments Download
M test/mjsunit/compiler/inline-global-access.js View 2 chunks +5 lines, -1 line 0 comments Download
M test/mjsunit/compiler/inline-param.js View 3 chunks +8 lines, -2 lines 0 comments Download
M test/mjsunit/compiler/inline-two.js View 4 chunks +11 lines, -3 lines 0 comments Download
M test/mjsunit/compiler/optimized-function-calls.js View 1 2 chunks +4 lines, -2 lines 0 comments Download
M test/mjsunit/compiler/pic.js View 2 chunks +7 lines, -1 line 0 comments Download
M test/mjsunit/compiler/property-calls.js View 1 chunk +5 lines, -1 line 0 comments Download
M test/mjsunit/compiler/property-refs.js View 1 2 chunks +5 lines, -1 line 0 comments Download
M test/mjsunit/compiler/property-stores.js View 2 chunks +11 lines, -3 lines 0 comments Download
M test/mjsunit/compiler/recursive-deopt.js View 1 2 chunks +5 lines, -8 lines 0 comments Download
M test/mjsunit/compiler/regress-3218915.js View 2 chunks +5 lines, -1 line 0 comments Download
M test/mjsunit/compiler/regress-loadfield.js View 1 2 chunks +5 lines, -1 line 0 comments Download
M test/mjsunit/compiler/regress-max.js View 1 chunk +6 lines, -1 line 0 comments Download
M test/mjsunit/compiler/regress-stacktrace-methods.js View 3 chunks +10 lines, -5 lines 0 comments Download
M test/mjsunit/compiler/simple-deopt.js View 3 chunks +8 lines, -2 lines 0 comments Download
M test/mjsunit/compiler/simple-inlining.js View 7 chunks +20 lines, -6 lines 0 comments Download
M test/mjsunit/compiler/switch-bailout.js View 1 2 chunks +5 lines, -1 line 0 comments Download
M test/mjsunit/const-eval-init.js View 2 chunks +5 lines, -1 line 0 comments Download
M test/mjsunit/external-array.js View 2 chunks +5 lines, -1 line 0 comments Download
M test/mjsunit/regress/regress-1079.js View 2 chunks +5 lines, -2 lines 0 comments Download
M test/mjsunit/regress/regress-1106.js View 2 chunks +9 lines, -2 lines 0 comments Download
M test/mjsunit/regress/regress-1166.js View 1 chunk +6 lines, -1 line 0 comments Download
M test/mjsunit/regress/regress-1167.js View 2 chunks +5 lines, -1 line 0 comments Download
M test/mjsunit/regress/regress-1210.js View 2 chunks +4 lines, -0 lines 0 comments Download
M test/mjsunit/regress/regress-1229.js View 1 2 chunks +12 lines, -4 lines 0 comments Download
M test/mjsunit/regress/regress-1237.js View 1 2 chunks +6 lines, -1 line 0 comments Download
M test/mjsunit/regress/regress-3218915.js View 2 chunks +5 lines, -1 line 0 comments Download
M test/mjsunit/regress/regress-962.js View 1 2 chunks +5 lines, -1 line 0 comments Download
M test/mjsunit/string-charcodeat.js View 3 chunks +8 lines, -2 lines 0 comments Download
M test/mjsunit/sum-0-plus-undefined-is-NaN.js View 3 chunks +6 lines, -2 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
Jakob Kummerow
Please review. This fixes a bunch of tests that didn't trigger optimization before because their ...
9 years, 8 months ago (2011-04-08 17:31:06 UTC) #1
Mads Ager (chromium)
Looks great. One suggestion for replacing the contents of a test. A number of explicit ...
9 years, 8 months ago (2011-04-11 11:06:38 UTC) #2
Jakob Kummerow
I agree with most of your comments, but a few of the methods do not ...
9 years, 8 months ago (2011-04-11 12:55:51 UTC) #3
Mads Ager (chromium)
LGTM http://codereview.chromium.org/6821009/diff/1/test/mjsunit/compiler/regress-max.js File test/mjsunit/compiler/regress-max.js (right): http://codereview.chromium.org/6821009/diff/1/test/mjsunit/compiler/regress-max.js#newcode34 test/mjsunit/compiler/regress-max.js:34: %OptimizeFunctionOnNextCall(Math.max); On 2011/04/11 12:55:51, jkummerow wrote: > On ...
9 years, 8 months ago (2011-04-11 13:03:44 UTC) #4
Jakob Kummerow
9 years, 8 months ago (2011-04-11 13:27:04 UTC) #5
...and landed.

http://codereview.chromium.org/6821009/diff/1/test/mjsunit/compiler/regress-m...
File test/mjsunit/compiler/regress-max.js (right):

http://codereview.chromium.org/6821009/diff/1/test/mjsunit/compiler/regress-m...
test/mjsunit/compiler/regress-max.js:34: %OptimizeFunctionOnNextCall(Math.max);
On 2011/04/11 13:03:44, Mads Ager wrote:
> On 2011/04/11 12:55:51, jkummerow wrote:
> > On 2011/04/11 11:06:38, Mads Ager wrote:
> > > This should get inlined if you just optimize f I think.
> > 
> > No: "Did not inline max called from f (target not inlineable).", and it
> doesn't
> > get optimized either without the explicit statement.
> > Want me to remove %OptimizeFunctionOnNextCall(f); instead? I guess that's
not
> > really required for this test.
> 
> I agree with you. What should matter here is that Math.max gets optimize.
> Introducing f just to give Math.max a shorter name seems unnecessary. Replace
> all calls to f with calls to Math.max, optimize that and check the results? 

Done.

http://codereview.chromium.org/6821009/diff/1/test/mjsunit/regress/regress-11...
File test/mjsunit/regress/regress-1106.js (right):

http://codereview.chromium.org/6821009/diff/1/test/mjsunit/regress/regress-11...
test/mjsunit/regress/regress-1106.js:56: %OptimizeFunctionOnNextCall(x.gee);
On 2011/04/11 13:03:44, Mads Ager wrote:
> On 2011/04/11 12:55:51, jkummerow wrote:
> > On 2011/04/11 11:06:38, Mads Ager wrote:
> > > Shouldn't be necessary. Should be inlined.
> > 
> > Not according to --trace-inlining. I therefore left the line in there.
> 
> For this test it doesn't matter whether or not gee is optimized. I'd remove
the
> call in this case.

Done.

Powered by Google App Engine
This is Rietveld 408576698