Can I override a V8 flag from gyp?

50 views
Skip to first unread message

Erik Arvidsson

unread,
May 16, 2012, 1:48:55 PM5/16/12
to chromium-dev
I'm wondering if it is possible, and if so how, to override a V8 flag
(from v8/src/flag-definitions.h) at build time?

--
erik

Paweł Hajdan, Jr.

unread,
May 16, 2012, 2:04:10 PM5/16/12
to a...@chromium.org, chromium-dev
Why do you need that? I'm afraid that would break build with system v8.


--
erik

--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
   http://groups.google.com/a/chromium.org/group/chromium-dev

Erik Arvidsson

unread,
May 16, 2012, 2:56:36 PM5/16/12
to Paweł Hajdan, Jr., chromium-dev
On Wed, May 16, 2012 at 11:04 AM, Paweł Hajdan, Jr.
<phajd...@chromium.org> wrote:
> Why do you need that? I'm afraid that would break build with system v8.

V8 wants to change a flag but they want us to do it in the chrome
build because the latency with the v8 roll (and the timezone diff)
keeps getting the v8 roll getting reverted. By changing it it in the
chromium build they believe we can change the flag and update the
layout tests in one single pass.

I think I'm just going to push harder on the original plan which was
to add the new failing tests due to the v8 change to
test_expectations.

> On Wed, May 16, 2012 at 7:48 PM, Erik Arvidsson <a...@chromium.org> wrote:
>>
>> I'm wondering if it is possible, and if so how, to override a V8 flag
>> (from v8/src/flag-definitions.h) at build time?
>>
>> --
>> erik
>>
>> --
>> Chromium Developers mailing list: chromi...@chromium.org
>> View archives, change email options, or unsubscribe:
>>    http://groups.google.com/a/chromium.org/group/chromium-dev
>
>



--
erik

Paweł Hajdan, Jr.

unread,
May 17, 2012, 6:09:10 AM5/17/12
to Erik Arvidsson, chromium-dev
On Wed, May 16, 2012 at 8:56 PM, Erik Arvidsson <a...@chromium.org> wrote:
On Wed, May 16, 2012 at 11:04 AM, Paweł Hajdan, Jr.
<phajd...@chromium.org> wrote:
> Why do you need that? I'm afraid that would break build with system v8.

V8 wants to change a flag but they want us to do it in the chrome
build because the latency with the v8 roll (and the timezone diff)
keeps getting the v8 roll getting reverted. By changing it it in the
chromium build they believe we can change the flag and update the
layout tests in one single pass.

I'm not familiar with the details here, but how about adding a layout tests bot to the v8 waterfall? Maybe even a webkit canary bot too? That should help prevent regressions caused by the rolls.

Jakob Kummerow

unread,
May 18, 2012, 5:41:28 AM5/18/12
to phajd...@chromium.org, Erik Arvidsson, chromium-dev
I think there's been a misunderstanding about V8 flags. The flags in V8's src/flag-definitions.h are *runtime* flags. That's why there's no mechanism to override them in gyp. Their default values are obviously hard-coded; but they can be overridden any time chrome is started: 
/path/to/chrome --js-flags="--foo=bar --there-you-go"
So the way to override a V8 flag in Chromium would be to patch the place where the command-line flags for renderer processes are assembled (I don't know where that is). Once tests pass with the flag value in question, we can flip the hard-coded default value in V8's source code.

I don't see how this approach could cause issues with system V8 installations (assuming the system V8 has the right version to know the flag that's being set, but there are pretty strict version dependencies anyway).

On Thu, May 17, 2012 at 12:09 PM, Paweł Hajdan, Jr. <phajd...@chromium.org> wrote:
I'm not familiar with the details here, but how about adding a layout tests bot to the v8 waterfall? Maybe even a webkit canary bot too? That should help prevent regressions caused by the rolls.

There are webkit bots on the V8 waterfall. They're red most of the time, and nobody has figured out yet how to improve their signal-to-noise ratio. But that's a separate issue.

 
> On Wed, May 16, 2012 at 7:48 PM, Erik Arvidsson <a...@chromium.org> wrote:
>>
>> I'm wondering if it is possible, and if so how, to override a V8 flag
>> (from v8/src/flag-definitions.h) at build time?
>>
>> --
>> erik
>>
>

--
erik

Paweł Hajdan, Jr.

unread,
May 18, 2012, 9:37:09 AM5/18/12
to Jakob Kummerow, Erik Arvidsson, chromium-dev
On Fri, May 18, 2012 at 11:41 AM, Jakob Kummerow <jkum...@chromium.org> wrote:
I don't see how this approach could cause issues with system V8 installations (assuming the system V8 has the right version to know the flag that's being set, but there are pretty strict version dependencies anyway).

Sounds good to me. We have proper dependencies in place for system V8. Thanks for explaining!
Reply all
Reply to author
Forward
0 new messages