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

Issue 18214005: Added %NeverOptimize runtime call that can disable optimizations for a method for tests. (Closed)

Created:
7 years, 5 months ago by titzer
Modified:
7 years, 5 months ago
CC:
v8-dev
Visibility:
Public.

Description

Added %NeverOptimize runtime call that can disable optimizations for a method for tests. BUG= Committed: https://code.google.com/p/v8/source/detail?r=15632

Patch Set 1 #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+92 lines, -45 lines) Patch
M src/hydrogen.cc View 1 chunk +8 lines, -0 lines 0 comments Download
M src/runtime.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/runtime.cc View 1 chunk +31 lines, -0 lines 4 comments Download
M test/mjsunit/compiler/inline-arguments.js View 1 chunk +1 line, -1 line 0 comments Download
M test/mjsunit/elements-kind.js View 4 chunks +6 lines, -6 lines 0 comments Download
M test/mjsunit/elide-double-hole-check-9.js View 1 chunk +1 line, -1 line 0 comments Download
M test/mjsunit/generated-transition-stub.js View 1 chunk +1 line, -1 line 0 comments Download
A + test/mjsunit/never-optimize.js View 1 chunk +32 lines, -25 lines 0 comments Download
M test/mjsunit/opt-elements-kind.js View 3 chunks +3 lines, -3 lines 0 comments Download
M test/mjsunit/osr-elements-kind.js View 2 chunks +3 lines, -3 lines 0 comments Download
A + test/mjsunit/regress/regress-1713b.js View 1 chunk +1 line, -1 line 0 comments Download
A + test/mjsunit/regress/regress-97116b.js View 1 chunk +1 line, -1 line 0 comments Download
A + test/mjsunit/regress/regress-crbug-173907b.js View 1 chunk +1 line, -1 line 0 comments Download
A + test/mjsunit/regress/regress-deopt-gcb.js View 1 chunk +1 line, -1 line 0 comments Download
A + test/mjsunit/regress/regress-mul-canoverflowb.js View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 5 (0 generated)
titzer
7 years, 5 months ago (2013-07-11 13:11:52 UTC) #1
mvstanton
Nice improvement. lgtm.
7 years, 5 months ago (2013-07-11 13:16:16 UTC) #2
titzer
Committed patchset #1 manually as r15632 (presubmit successful).
7 years, 5 months ago (2013-07-11 14:18:11 UTC) #3
Jakob Kummerow
DBC https://codereview.chromium.org/18214005/diff/1/src/runtime.cc File src/runtime.cc (right): https://codereview.chromium.org/18214005/diff/1/src/runtime.cc#newcode8365 src/runtime.cc:8365: // mark the top frame as do not ...
7 years, 5 months ago (2013-07-11 15:23:33 UTC) #4
titzer
7 years, 5 months ago (2013-07-11 15:29:02 UTC) #5
Message was sent while issue was closed.
https://codereview.chromium.org/18214005/diff/1/src/runtime.cc
File src/runtime.cc (right):

https://codereview.chromium.org/18214005/diff/1/src/runtime.cc#newcode8365
src/runtime.cc:8365: // mark the top frame as do not optimize
On 2013/07/11 15:23:33, Jakob wrote:
> nit: Begin with capitalization, end with punctuation. Again below.

Done. (fixed this before submitting).

https://codereview.chromium.org/18214005/diff/1/src/runtime.cc#newcode8367
src/runtime.cc:8367: if (!it.done())
MarkNeverOptimize(JSFunction::cast(it.frame()->function()));
On 2013/07/11 15:23:33, Jakob wrote:
> Instead of rolling your own MarkNeverOptimize, I think you should just call:
>
JSFunction::cast(it.frame()->function())->shared()->DisableOptimization("%NeverOptimize");
> That function does all the right things.

I also did something similar prior to submit...as thankfully my
never-optimize.js unit test caught a bug with --always-opt :)

Powered by Google App Engine
This is Rietveld 408576698