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

Issue 19384011: Revamp v8_optimized_debug options (Closed)

Created:
7 years, 5 months ago by Dirk Pranke
Modified:
7 years, 4 months ago
CC:
chromium-reviews, Nico, scottmg
Base URL:
https://chromium.googlesource.com/external/v8.git@master
Visibility:
Public.

Description

Revamp v8_optimized_debug options This patch changes the definition of v8_optimized_debug==1 to match the release-mode compiler optimization settings (generally, going from -O1 to -O3 on Linux, similar switches for Mac/Win). This produces a minor speed up on Linux, but significant speedups on Mac and Win. This may make it much harder to debug, though. It also adds a v8_optimized_debug==2 that, in addition to the compiler optimizations, undef's DEBUG and defines DEBUG. This leaves V8_ENABLE_CHECKS alone (so that the assertions are still enabled), but otherwise basically matches a release mode build. Builds with v8_optimized_debug==2 roughly match a Release mode build for speed; the V8_ENABLE_CHECKS checks appear to have minimal performance impact (maybe 5-10%, unlike what was previously thought). In addition, switching from the previous optimization settings makes a significant improvement on Mac and Win (50% or more), and switching from DEBUG to NDEBUG makes a significant improvement (another 50% or more). Note that using v8_optimized_debug==2 may also cause some v8 tests to fail. This is currently is believed to be acceptable. R=machenbach@chromium.org BUG=254188 Committed: https://code.google.com/p/v8/source/detail?r=15937

Patch Set 1 #

Total comments: 2

Patch Set 2 : clean up which flags are set when #

Total comments: 3

Patch Set 3 : simplify back to the original v8_optimized_debug flag #

Patch Set 4 : clean up linux slightly #

Patch Set 5 : add v8_optimized_debug==2 back in #

Patch Set 6 : fix optdebug settings to compile w/ standalone v8 #

Patch Set 7 : use -O3 when v8_optimized_debug==2 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+78 lines, -12 lines) Patch
M build/toolchain.gypi View 1 2 3 4 5 6 4 chunks +78 lines, -12 lines 0 comments Download

Messages

Total messages: 35 (0 generated)
jochen (gone - plz use gerrit)
+jkummerow Jakob, wdyt?
7 years, 5 months ago (2013-07-22 11:08:14 UTC) #1
Michael Achenbach
https://codereview.chromium.org/19384011/diff/1/build/toolchain.gypi File build/toolchain.gypi (right): https://codereview.chromium.org/19384011/diff/1/build/toolchain.gypi#newcode66 build/toolchain.gypi:66: # 3 - match release mode optimizations The issue ...
7 years, 5 months ago (2013-07-22 11:23:19 UTC) #2
Jakob Kummerow
Providing a way to enable further compiler optimizations is probably fine, as long as it's ...
7 years, 5 months ago (2013-07-22 12:41:50 UTC) #3
Dirk Pranke
Jochen sent this out for review before I was quite ready to have it reviewed ...
7 years, 5 months ago (2013-07-22 20:55:36 UTC) #4
Dirk Pranke
More notes, from only basic testing on Linux. I need to confirm these results on ...
7 years, 5 months ago (2013-07-23 02:02:00 UTC) #5
Dirk Pranke
Okay, this is a dramatically revised patch. From much more extensive testing, it looks like ...
7 years, 5 months ago (2013-07-24 00:51:50 UTC) #6
Michael Achenbach
> I've tested this on Linux/Mac/Win, both release and debug (and with both gcc and ...
7 years, 5 months ago (2013-07-24 08:12:23 UTC) #7
jochen (gone - plz use gerrit)
On 2013/07/24 08:12:23, machenbach wrote: > > I've tested this on Linux/Mac/Win, both release and ...
7 years, 5 months ago (2013-07-24 11:27:21 UTC) #8
Michael Achenbach
> What exactly is failing? Are the tests failing because of bugs in V8? No. ...
7 years, 5 months ago (2013-07-24 13:15:24 UTC) #9
Jakob Kummerow
Both examples can be summed up as: V8's test system has different expectations/behavior for Release ...
7 years, 5 months ago (2013-07-24 14:53:24 UTC) #10
Dirk Pranke
I had thought that chromium was the original motivation for v8_optimized_debug in the first place, ...
7 years, 5 months ago (2013-07-24 17:38:29 UTC) #11
Dirk Pranke
Okay, =2 setting added back in. Please take another look?
7 years, 5 months ago (2013-07-24 19:17:30 UTC) #12
Michael Achenbach
Still can't compile v8_optimized_debug=1 for the same reason as in https://codereview.chromium.org/18431003/ Can +1 developer check ...
7 years, 5 months ago (2013-07-25 09:19:34 UTC) #13
Jakob Kummerow
On 2013/07/25 09:19:34, machenbach wrote: > Still can't compile v8_optimized_debug=1 for the same reason as ...
7 years, 5 months ago (2013-07-25 16:46:09 UTC) #14
Dirk Pranke
Ah, I see. I'm not seeing this in the chromium builds because we turn off ...
7 years, 5 months ago (2013-07-25 19:54:42 UTC) #15
Dirk Pranke
It looks like it's some combination of -Wall (which enables the array bounds check), -O2/-O3, ...
7 years, 5 months ago (2013-07-25 22:26:34 UTC) #16
Dirk Pranke
On 2013/07/25 22:26:34, Dirk Pranke wrote: > It looks like it's some combination of -Wall ...
7 years, 5 months ago (2013-07-25 22:33:03 UTC) #17
Dirk Pranke
Okay, I've posted a patch that changes the linux setting to -O1 . Depending on ...
7 years, 5 months ago (2013-07-25 23:13:09 UTC) #18
Michael Achenbach
I can live with the v8_optimized_debug=1 setting for now. But I wonder where did the ...
7 years, 5 months ago (2013-07-26 12:05:24 UTC) #19
Dirk Pranke
I don't feel strongly about -O1 vs. -O3 in level 2; the performance difference is ...
7 years, 5 months ago (2013-07-26 16:50:25 UTC) #20
Michael Achenbach
LGTM
7 years, 5 months ago (2013-07-26 20:30:02 UTC) #21
Dirk Pranke
On 2013/07/26 20:30:02, machenbach wrote: > LGTM Thanks! I've posted the -O3 patch, so if ...
7 years, 5 months ago (2013-07-26 21:44:14 UTC) #22
Dmitry Lomov (no reviews)
On 2013/07/26 21:44:14, Dirk Pranke wrote: > On 2013/07/26 20:30:02, machenbach wrote: > > LGTM ...
7 years, 4 months ago (2013-07-29 13:59:48 UTC) #23
Dmitry Lomov (no reviews)
Committed patchset #7 manually as r15937 (presubmit successful).
7 years, 4 months ago (2013-07-29 14:00:16 UTC) #24
Michael Achenbach
On 2013/07/29 14:00:16, Dmitry Lomov (chromium) wrote: > Committed patchset #7 manually as r15937 (presubmit ...
7 years, 4 months ago (2013-07-31 16:48:25 UTC) #25
Jakob Kummerow
On 2013/07/31 16:48:25, machenbach wrote: > http://chromegw.corp.google.com/i/client.v8/builders/V8%2520Win32%2520-%2520debug%2520-%2520mozilla%2520-%25201?numbuilds=200 Proper URL: http://build.chromium.org/p/client.v8/builders/V8 Win32 - debug - mozilla ...
7 years, 4 months ago (2013-07-31 16:55:35 UTC) #26
Dirk Pranke
Well, you should certainly feel free to revert the change and see if that solves ...
7 years, 4 months ago (2013-07-31 16:57:30 UTC) #27
Michael Achenbach
I don't want to revert the whole thing (I love the speed up on mac). ...
7 years, 4 months ago (2013-07-31 17:01:27 UTC) #28
Dirk Pranke
On 2013/07/31 17:01:27, machenbach wrote: > I don't want to revert the whole thing (I ...
7 years, 4 months ago (2013-07-31 17:13:43 UTC) #29
Jakob Kummerow
On 2013/07/31 17:13:43, Dirk Pranke wrote: > Looks like danno did revert this in > ...
7 years, 4 months ago (2013-07-31 17:15:31 UTC) #30
Dirk Pranke
On 2013/07/31 17:15:31, Jakob wrote: > Nope, that was a trunk commit. This patch is ...
7 years, 4 months ago (2013-07-31 17:17:12 UTC) #31
Dirk Pranke
On 2013/07/31 16:48:25, machenbach wrote: > About this CL: > (1) There seems to be ...
7 years, 4 months ago (2013-07-31 17:27:33 UTC) #32
Dirk Pranke
On 2013/07/31 17:27:33, Dirk Pranke wrote: > I need to log in to my windows ...
7 years, 4 months ago (2013-07-31 17:37:35 UTC) #33
Dirk Pranke
Hm, in chromium, with v8_optimized_debug==2, I'm seeing both /MD (release dll) and _DEBUG set as ...
7 years, 4 months ago (2013-07-31 17:51:09 UTC) #34
Dirk Pranke
7 years, 4 months ago (2013-07-31 18:53:02 UTC) #35
Message was sent while issue was closed.
Thinking about this a bit more, I should probably split this into a couple of
patches that make smaller changes that are less disruptive (e.g., one that fixes
mac and win perf with v8_opt_debug==1, and then one or more for ==2). I'll work
up some patches along those lines. Let me know if you end up reverting this in
the meantime, so I can rebase them, but I'll for now I'll assume you won't
revert anything before I can post new patches.

Powered by Google App Engine
This is Rietveld 408576698