Re: [v8-users] Streams and InternalPackedArray queue scalability

2017-01-17 Thread Jochen Eisinger
+Domenic Denicola 

On Wed, Jan 18, 2017 at 4:25 AM Adam Rice  wrote:

> I work on the Chrome implementation of ReadableStream and WritableStream
> . They are implemented in Javascript
> using v8 extras.
>
> They currently use an InternalPackedArray to implement a queue structure,
> however I have found a scalability issue. The benchmarks and repro can be
> found at http://crbug.com/681493 ("ReadableStream, WritableStream get
> dramatically slower when queue grows to 56720 chunks").
>
> I have a proposed fix at http://crrev.com/2637863002. If possible, I
> would like someone who is familiar with the implementation of
> InternalPackedArray to review it.
>
> Particular things I'd like to know:
>
>- Is it worth worrying about deopt or would it be better to use
>InternalPackedArray for small queues and only switch to Queue for larger
>ones?
>- Is 32768 a good size to split the arrays at? Can we be reasonably
>sure that it is small enough to get good behaviour on all platforms and
>architectures?
>
> and if possible
>
>- why does performance change so dramatically at a threshold?
>
> Thanks,
> Adam Rice
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> http://groups.google.com/group/v8-users
> ---
> You received this message because you are subscribed to the Google Groups
> "v8-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
http://groups.google.com/group/v8-users
--- 
You received this message because you are subscribed to the Google Groups 
"v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] Implication of the context parameter in v8::Object::Set().

2017-01-17 Thread Jochen Eisinger
right. also, it makes it explicit in which context a possible exception
should be thrown

On Wed, Jan 18, 2017 at 8:19 AM Ben Noordhuis  wrote:

> On Tue, Jan 17, 2017 at 9:03 PM, Jane Chen  wrote:
> > Why does v8::Object::Set() takes a context parameter now?  Does it mean
> that
> > if an object is created in one context, it can only be used in that
> context?
> >
> > Thanks.
>
> The rules for object and property access didn't change.  I think the
> context parameter is to disambiguate between method overloads that
> return Local and MaybeLocal, since C++ doesn't allow overloading of
> just the return value.
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> http://groups.google.com/group/v8-users
> ---
> You received this message because you are subscribed to the Google Groups
> "v8-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to v8-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
http://groups.google.com/group/v8-users
--- 
You received this message because you are subscribed to the Google Groups 
"v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] Implication of the context parameter in v8::Object::Set().

2017-01-17 Thread Ben Noordhuis
On Tue, Jan 17, 2017 at 9:03 PM, Jane Chen  wrote:
> Why does v8::Object::Set() takes a context parameter now?  Does it mean that
> if an object is created in one context, it can only be used in that context?
>
> Thanks.

The rules for object and property access didn't change.  I think the
context parameter is to disambiguate between method overloads that
return Local and MaybeLocal, since C++ doesn't allow overloading of
just the return value.

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
http://groups.google.com/group/v8-users
--- 
You received this message because you are subscribed to the Google Groups 
"v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[v8-users] Streams and InternalPackedArray queue scalability

2017-01-17 Thread Adam Rice
I work on the Chrome implementation of ReadableStream and WritableStream
. They are implemented in Javascript
using v8 extras.

They currently use an InternalPackedArray to implement a queue structure,
however I have found a scalability issue. The benchmarks and repro can be
found at http://crbug.com/681493 ("ReadableStream, WritableStream get
dramatically slower when queue grows to 56720 chunks").

I have a proposed fix at http://crrev.com/2637863002. If possible, I would
like someone who is familiar with the implementation of InternalPackedArray
to review it.

Particular things I'd like to know:

   - Is it worth worrying about deopt or would it be better to use
   InternalPackedArray for small queues and only switch to Queue for larger
   ones?
   - Is 32768 a good size to split the arrays at? Can we be reasonably sure
   that it is small enough to get good behaviour on all platforms and
   architectures?

and if possible

   - why does performance change so dramatically at a threshold?

Thanks,
Adam Rice

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
http://groups.google.com/group/v8-users
--- 
You received this message because you are subscribed to the Google Groups 
"v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] Re: Building V8 on FreeBSD

2017-01-17 Thread Alessandro Crugnola
I have the same problem and running the command:
python -u tools/mb/mb.py gen -f infra/mb/mb_config.pyl -m developer_default 
-b x64.release out.gn/x64.release

I got this error:
Writing """\
is_debug = false
target_cpu = "x64"
""" to /home/crugnola/Documents/git/public/v8/out.gn/x64.release/args.gn.

/home/crugnola/Documents/git/public/v8/buildtools/linux64/gn gen 
out.gn/x64.release --check
  -> returned 1
ERROR at //build/config/BUILDCONFIG.gn:134:15: Reading a variable defined 
in the same declare_args() call.

If you need to set the value of one arg based on another, put
them in two separate declare_args() calls, one after the other.

  is_debug = !is_official_build
  ^


On Wednesday, October 5, 2016 at 1:04:18 AM UTC-4, Jochen Eisinger wrote:
>
> If you run the mb.py command directly (python -u tools/mb/mb.py gen -f 
> infra/mb/mb_config.pyl -m developer_default -b x64.release 
> out.gn/x64.release) does it print a more verbose error message?
>
> On Tue, Oct 4, 2016 at 9:17 PM Jose Madrigal  > wrote:
>
>> I been trying follow the instructions shown in 
>> https://github.com/v8/v8/wiki/Building%20with%20GN
>>
>> At the point where I must use: 
>>
>>  > tools/dev/v8gen.py x64.release 
>>
>> raise a error:
>>
>> Traceback (most recent call last):
>>   File "tools/dev/v8gen.py", line 304, in 
>> sys.exit(gen.main())
>>   File "tools/dev/v8gen.py", line 298, in main
>> return self._options.func()
>>   File "tools/dev/v8gen.py", line 166, in cmd_gen
>> gn_outdir,
>>   File "tools/dev/v8gen.py", line 208, in _call_cmd
>> stderr=subprocess.STDOUT,
>>   File "/usr/local/lib/python2.7/subprocess.py", line 573, in check_output
>> raise CalledProcessError(retcode, cmd, output=output)
>> subprocess.CalledProcessError: Command '['/usr/local/bin/python', '-u', 
>> 'tools/mb/mb.py', 'gen', '-f', 'infra/mb/mb_config.pyl', '-m', 
>> 'developer_default', '-b', 'x64.release', 'out.gn/x64.release']' 
>> returned non-zero exit status 1
>>
>>
>> Any ideas ?
>>
>>
>> El martes, 4 de octubre de 2016, 10:57:18 (UTC-5), Jose Madrigal escribió:
>>>
>>> Hello !!!
>>>
>>> I been trying to build V8 on FreeBSD due the ports are not updated to 
>>> the recent version of v8 but I have struggled a lot. I wonder if someone 
>>> already build v8 on FreeBSD that could point me out in the right direction 
>>> to achieve it.
>>>
>>> Thanks in advance !!
>>>
>> -- 
>> -- 
>> v8-users mailing list
>> v8-u...@googlegroups.com 
>> http://groups.google.com/group/v8-users
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "v8-users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to v8-users+u...@googlegroups.com .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
http://groups.google.com/group/v8-users
--- 
You received this message because you are subscribed to the Google Groups 
"v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[v8-users] Implication of the context parameter in v8::Object::Set().

2017-01-17 Thread Jane Chen
Why does v8::Object::Set() takes a context parameter now?  Does it mean 
that if an object is created in one context, it can only be used in that 
context?

Thanks.

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
http://groups.google.com/group/v8-users
--- 
You received this message because you are subscribed to the Google Groups 
"v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.