Re: [v8-users] How do you set a limit for the memory an isolate can use and deal with it trying to go above that limit without killing your process?

2016-09-23 Thread Jakob Kummerow
Handling (self-imposed, as opposed to OS-dictated) OOM without crashing is in theory possible, but in practice complicated enough that V8's current decision is not to support it. As issue 3060 says: if you have a patch that adds such support, is not overly complicated, and does not incur

Re: [v8-users] v8 crashes in garbage collection.

2016-09-02 Thread Jakob Kummerow
When the garbage collector crashes like that, that indicates that there's a broken object on the heap. This could have any number of reasons (notably including V8 bugs, embedder bugs, flaky hardware), so without further data it's impossible to tell if this particular instance is known and/or

Re: [v8-users] Re: Possible to optimize an array of numbers with some undefined values?

2016-08-16 Thread Jakob Kummerow
Well, "undefined" is not a number, so arrays with some undefined values are not number-only arrays. Sticking to number-only arrays provides massive speed benefits, so doing that is the best advice to give here. Since you "treat undefined to be like 0" anyway, why don't you put 0 into the array in

Re: [v8-users] Re: Question: how to improve performances for proxies?

2016-08-05 Thread Jakob Kummerow
I wouldn't say it's due to current implementation details. The specification for most Proxy operations just demands very complicated (and therefore slow) internal workflows. In performance-sensitive code, it's probably better to avoid using Proxies -- usually the same functionality can also be

Re: [v8-users] How does the JS -> ASM generation work for ia32

2016-08-01 Thread Jakob Kummerow
On Sun, Jul 31, 2016 at 8:41 PM, D T wrote: > Hi there! > > This mailing list helped me so many times, so I will give it another try :) > I am executing a javascript file containing a simple addition program as > follows: > user@debugbox: v8/out/ia32.release/d8

Re: [v8-users] Re: gyp_v8 error when building

2016-07-28 Thread Jakob Kummerow
On Thu, Jul 28, 2016 at 12:00 PM, wrote: > On a final note I just did a search and read what a "googler" is. > > Would have been nice to know v8 compilation isn't intended for non google > employees. > That's not true. Many non-Google-employees are compiling V8

Re: [v8-users] make native stops with error

2016-06-29 Thread Jakob Kummerow
Updating past 4267a2ebe7af9aa5d64e141f0a6492761fb37e95 should do it. Or simply specify the target architecture manually (probably "make x64.release"). (Side note: I wouldn't run things as root.) On Wed, Jun 29, 2016 at 1:03 PM, Danny

Re: [v8-users] Re: Compile V8 for Android

2016-05-20 Thread Jakob Kummerow
On Wed, May 18, 2016 at 10:45 AM, Jakob Kummerow <jkumme...@chromium.org> wrote: > The gyp files moved recently (from build/ to gypfiles/), maybe there were > a few commits where not everything was working correctly. > Turns out there was a small update to Makefile.android mis

Re: [v8-users] Re: Compile V8 for Android

2016-05-18 Thread Jakob Kummerow
I'm not sure what else to try, sorry. I haven't seen this error before and can't reproduce it. On Tue, May 17, 2016 at 7:37 PM, Yann Bonnetain wrote: > I have branched of V8 master > That doesn't mean anything; everything is branched off master. Maybe try updating? The

Re: [v8-users] d8 needs a function similar to JSC's `drainMicrotasks()`

2016-05-17 Thread Jakob Kummerow
that need to call %Natives. As I said, I don't know whether we need or should have any microtasks related helper(s) in mjsunit.js, I just wanted to point out that it's technically possible to use %Natives there. On Tue, May 17, 2016 at 6:29 PM, Michael Starzinger < mstarzin...@chromium.org>

Re: [v8-users] Compile V8 for Android

2016-05-17 Thread Jakob Kummerow
Works for me. Which version of V8 do yo have checked out? What does "which gyp" say? If you have /usr/bin/gyp or something installed by your distro, that could interfere; make sure depot_tools is the first thing in your $PATH. (Also, has_valgrind.py should exist in gypfiles/, I assume "tools/"

Re: [v8-users] Can jit (recompilation) block the main thread even if concurrent recompilation is on?

2016-05-11 Thread Jakob Kummerow
ementioned > blocks. There is no code being emitted as strings in run time. Does any > unoptimized compilation happen in Script::Run in this case? > > -- Borislav > > On Tue, May 10, 2016 at 6:32 PM, Jakob Kummerow wrote: > >> FLAG_concurrent_recompilation only affects (p

Re: [v8-users] Can jit (recompilation) block the main thread even if concurrent recompilation is on?

2016-05-10 Thread Jakob Kummerow
FLAG_concurrent_recompilation only affects (parts of) optimized _re_compilation. Initial unoptimized compilation of a function always happens on the main thread. Optimized recompilation also performs parts of its work on the main thread. On Tue, May 10, 2016 at 6:21 PM, Borislav Stanimirov

[v8-users] Re: [chromium-dev] Flagging javascript objects for GC

2016-05-06 Thread Jakob Kummerow
[+v8-users; chromium-dev to BCC] There's no need to "flag" objects for GC at all. In fact, there isn't even a way to do that, because there's no such flag that the GC would know about. It simply collects objects that are unreachable. More specifically: On Thu, May 5, 2016 at 11:45 PM, Greg

Re: [v8-users] Build issues - How can I build v8 with my system toolchain?

2016-05-06 Thread Jakob Kummerow
I'd use "make ia32 GYPFLAGS=-Dclang=0", that should then use your system toolchain. Invoking build/gyp_v8 manually should not be necessary (except on Windows, but who uses that for development?). (The other possible, but infinitely more hacky, solution is to (in the right directory) sudo ln -s

Re: [v8-users] Re: Creating multiple Isolates

2016-04-29 Thread Jakob Kummerow
On Fri, Apr 29, 2016 at 2:03 PM, Joris Wijnant wrote: > > What is the reason that is reserves 16 MB? > I know that reserving some extra space can be for performance, that way > you don't need to request more if you ran out. > But what is the reason for 16 MB, why not

Re: [v8-users] Re: Creating multiple Isolates

2016-04-28 Thread Jakob Kummerow
That stack trace indicates you ran into DCHECK(IsReserved()); in VirtualMemory::address(). That check would fail if the previous mmap() call failed to reserve memory, which happens when the process's virtual memory address space is exhausted. You didn't specify which V8 version you're using, but

Re: [v8-users] Creating multiple Isolates

2016-04-28 Thread Jakob Kummerow
How is it crashing? Without a backtrace or error message it's hard to help. The heap size limit is per Isolate (because each Isolate has its own heap), so it shouldn't affect the number of Isolates you can create. However 200 isolates on a 32-bit system with 2GB memory address space means only

Re: [v8-users] Does anyone have a working procedure for building v8 under mingw?

2016-04-18 Thread Jakob Kummerow
; $ tools/mingw-generate-makefiles.sh > make: *** No rule to make target `out/Makefile.ia32'. Stop. > > > On Mon, Apr 18, 2016 at 5:23 AM, Jakob Kummerow <jkumme...@chromium.org> > wrote: > >> Have you seen the MinGW section of the instructions >> <https://g

Re: [v8-users] Does anyone have a working procedure for building v8 under mingw?

2016-04-18 Thread Jakob Kummerow
Have you seen the MinGW section of the instructions ? On Sun, Apr 17, 2016 at 9:17 AM, Zac Hansen wrote: > Thank you for your help. I managed to get it compiling in visual studio > 2015.2. > > I submitted this bug: >

Re: [v8-users] Where is x86_64 JIT located (Filename)

2016-03-14 Thread Jakob Kummerow
On Mon, Mar 14, 2016 at 8:58 AM, Jochen Eisinger wrote: > Version 4.4.0.0 is > https://chromium.googlesource.com/v8/v8/+/31bbcc3e197cd69c0bb806107448aff2c1ae8b15 > That's where we bumped the numbers in v8-version.h shortly after creating the 4.3 branch. The numbers in that

Re: [v8-users] Question about mixed integer/floating point arithmetic in v8

2016-03-08 Thread Jakob Kummerow
TL;DR: No. As you point out, JavaScript dictates that all numbers be 64-bit doubles. So V8 always behaves as if all numbers were stored as 64-bit doubles. (When it doesn't, that's a bug.) Due to 64-bit floats having 52 bit mantissas, any integer up to 2^52 can be represented exactly. In your

Re: [v8-users] v8 make on CentOS 6.7 fails

2016-03-05 Thread Jakob Kummerow
Looks like CentOS 6 is too old to run the bundled clang. Try this: make native GYPFLAGS="-Dclang=0" On Sat, Mar 5, 2016 at 3:23 PM, Alexandru Lazarev < alexandru.laza...@gmail.com> wrote: > Hi All, > I am newbie to v8. I needed to build it for plv8 (Java-Script language > extension for

Re: [v8-users] Does v8 optimize map()?

2016-03-04 Thread Jakob Kummerow
rites down a function call, it can be a simple loop inside of v8. >> I thought it's already done this way, when I heard ES6 became much faster >> recently. >> >> On Friday, March 4, 2016 at 11:34:51 AM UTC+1, Jakob Kummerow wrote: >>> >>> On Thu, Mar 3, 2016

Re: [v8-users] Does v8 optimize map()?

2016-03-04 Thread Jakob Kummerow
On Thu, Mar 3, 2016 at 7:48 PM, 'Robert Eisele' via v8-users < v8-users@googlegroups.com> wrote: > Hi, > > I wonder if v8 is able to optimize the pattern > > A = A.map(x => ~x) > > In this case v8 can work on the array instead of creating a new object and > replacing it with the original array. >

Re: [v8-users] Disabling inline caching

2016-03-01 Thread Jakob Kummerow
--nouse-ic (which is equivalent to changing the flag's default and recompiling) turns off those parts of the IC system that can reasonably be turned off (in particular, compilation of specialized handlers). You'll observe that --trace-ic's output changes quite a bit when you do that. Turning off

Re: [v8-users] Perplexed by aborted optimizations for reason "Unsupported phi use of const variable"

2016-03-01 Thread Jakob Kummerow
ase IMO. > > I am also hoping to get a better understanding of the "Unsupported phi use > of const variable” reason as there is very little information about it > available on the web. I’d like to contribute details to the list of V8 > bailout reasons (https://github.com/vhf/v8-bailout

Re: [v8-users] Perplexed by aborted optimizations for reason "Unsupported phi use of const variable"

2016-02-29 Thread Jakob Kummerow
This is indeed surprising. Crankshaft predates ES6, so this has nothing to do with ES6 const. That said, I don't see why this function would bail out; and in a quick repro attempt it doesn't. Do you have an example I can run that reproduces this behavior? Also, is this actually a performance

Re: [v8-users] Pre-allocated array with many undefined entries - dense or sparse?

2016-02-21 Thread Jakob Kummerow
A few clarifications: On Sat, Feb 20, 2016 at 8:18 PM, Louis Santillan wrote: > In JS, the size of the Array is not directly related to the index keys > of the Array. In this respect, JS is memory conservative. So, you > can always pre-allocate an array of 50 entries and

Re: [v8-users] Is it "okay" to use v8::Object::SetPrototype? Scary warnings about using Object.setPrototypeOf()..

2016-02-12 Thread Jakob Kummerow
Whether an object's prototype is changed from JavaScript or from C++ doesn't make a difference. (Why would it?) The preferred way to set a newly allocated object's prototype is to use the FunctionTemplate's PrototypeTemplate. See the large comment for class FunctionTemplate in v8.h. On Fri, Feb

Re: [v8-users] Is it "okay" to use v8::Object::SetPrototype? Scary warnings about using Object.setPrototypeOf()..

2016-02-12 Thread Jakob Kummerow
inal post? Or some other reason why that method > is "preferred"? > > --Zac > > > On Fri, Feb 12, 2016 at 1:34 AM, Jakob Kummerow <jkumme...@chromium.org> > wrote: > >> Whether an object's prototype is changed from JavaScript or from C++ >> doesn't make a diff

Re: [v8-users] Is it "okay" to use v8::Object::SetPrototype? Scary warnings about using Object.setPrototypeOf()..

2016-02-12 Thread Jakob Kummerow
aybe just do whatever seems easiest to you, and see if it works out OK? On Fri, Feb 12, 2016 at 2:41 AM, Jakob Kummerow <jkumme...@chromium.org> > wrote: > >> It avoids having to change the prototype. >> >> (That warning on MDN is awesome, strong +1 to that. Being

Re: [v8-users] Building V8 Older versions

2016-02-11 Thread Jakob Kummerow
3.9.24, are you sure? That's a daily development snapshot from almost 4 years ago! I'd strongly advise against using it for anything, as it is probably full of bugs, including security vulnerabilities. I wouldn't be surprised if it didn't even compile any more with modern compilers, as toolchains

Re: [v8-users] Finding "--print_opt_code" in memory

2016-02-10 Thread Jakob Kummerow
on" + "Turbofan") that will change the way the system works. > Please let me know, if I managed to confuse you :D > > > Am Montag, 21. Dezember 2015 18:07:32 UTC+1 schrieb Jakob Kummerow: >> >> On Mon, Dec 21, 2015 at 5:38 PM, D T <dastig...@gmail.com> w

Re: [v8-users] Runtime crash on trying to create a half-meg string

2016-02-10 Thread Jakob Kummerow
Version "3.31" doesn't really exist. Yes we once created a branch of that name, but it was abandoned right after because it was in such a bad state that we gave up trying to stabilize it. It was never used in a Chrome stable channel release, which would have been your hint that it's ready for

Re: [v8-users] Runtime crash on trying to create a half-meg string

2016-02-10 Thread Jakob Kummerow
? (I can't seem to find the instructions in the V8 docs) >> >> D. >> >> On Wednesday, February 10, 2016 at 11:36:41 AM UTC+2, Jakob Kummerow >> wrote: >>> >>> Version "3.31" doesn't really exist. Yes we once created a branch of >>> that name

Re: [v8-users] v8 build error

2016-02-08 Thread Jakob Kummerow
oe Harrington <jharrington...@gmail.com> wrote: > No. > > On Monday, February 8, 2016 at 7:15:10 AM UTC-8, Jakob Kummerow wrote: >> >> On Mon, Feb 8, 2016 at 3:23 PM, Joe Harrington <jharrin...@gmail.com> >> wrote: >> >>> >>>> C:\Users\

Re: [v8-users] v8 build error

2016-02-08 Thread Jakob Kummerow
How did you check out V8? Did you follow the instructions at https://github.com/v8/v8/wiki/Using%20Git#how-to-start? (My guess would be that you simply "git clone"d the main repository. Doing so wouldn't run "gclient sync", so you'd end up missing all third-party dependencies, one of which is

Re: [v8-users] Library locations on different platforms.. OS X = good, ubuntu inside vmware = bad

2016-02-08 Thread Jakob Kummerow
That's just how GYP behaves. FWIW, our documentation reflects this, see the command line in https://github.com/v8/v8/wiki/Getting%20Started%20with%20Embedding#run-the-example . (Also, to be fair, "scatters libraries all over" is a bit of an exaggeration -- V8's libraries are in

Re: [v8-users] v8 build error

2016-02-08 Thread Jakob Kummerow
Are you looking for https://github.com/v8/v8/wiki/Building%20with%20Gyp#building-1? On Mon, Feb 8, 2016 at 10:18 AM, Joe Harrington wrote: > Followed the instructions on the page and have yet to get to where it > makes the build files. :( > > -- > -- > v8-users mailing

Re: [v8-users] v8 build error

2016-02-08 Thread Jakob Kummerow
On Mon, Feb 8, 2016 at 3:23 PM, Joe Harrington wrote: > >> C:\Users\JH\Documents\Libs\depot_tools>python.exe v8\build\gyp_v8 >> -Dtarget_arch=x64 -Dcomponent=shared_library >> Please follow the instructions at >>

Re: [v8-users] Building static libraries on linux

2016-02-05 Thread Jakob Kummerow
https://github.com/v8/v8/wiki/Getting%20Started%20with%20Embedding#run-the-example has an example linking command line. Does that not work? What errors does it produce? On Fri, Feb 5, 2016 at 12:32 PM, Jonas Minnberg wrote: > I'm trying to use the libv8_*.a libraries on

Re: [v8-users] What happens when you throw a C++ exception from a FunctionTemplate callback function?

2016-02-04 Thread Jakob Kummerow
All of V8 is compiled with -fno-exceptions, so it doesn't support C++ exceptions. You could try building without that flag, but then you'd be entirely on your own you find that something doesn't work (and I'm pretty sure that something wouldn't work -- V8 code is not written to be exception safe).

Re: [v8-users] Variable value declaration

2016-02-04 Thread Jakob Kummerow
Shouldn't make a difference in most cases. Personally, I'd go for: 3) var x = value ? 2 : 1; which, per the JavaScript spec, is semantically equivalent to (1) anyway, but more concise. On Wed, Feb 3, 2016 at 9:16 PM, Arthur Shefer wrote: > Hello, fast question - what is

Re: [v8-users] LowMemoryNotification in for...of loop.

2016-01-25 Thread Jakob Kummerow
Right. The canonical answer to "When and how often should I manually trigger GC?" is "You shouldn't."; this is true for pretty much all virtual machines. The GC itself knows best when and how often to do incremental work. There's a reason the function is called LowMemoryNotification and not, for

Re: [v8-users] Install v8 ubuntu 14.04 make - error

2015-12-30 Thread Jakob Kummerow
I think this is the error you get when you try to run V8's bundled toolchain, which is built for x64, on a 32-bit system. So you have two options: (1) Build on an x64 machine. (2) Or disable usage of the bundled toolchain and fall back to your system toolchain: make GYPFLAGS="-Dclang=0" ... On

Re: [v8-users] Recreate solution files on Windows.

2015-12-30 Thread Jakob Kummerow
We have this note in the build instructions : If you switch between ia32 and x64 targets, you may have to manually delete > the generated .vcproj/.sln files before regenerating them. Patches are most welcome if you figure out how

Re: [v8-users] Finding "--print_opt_code" in memory

2015-12-21 Thread Jakob Kummerow
On Mon, Dec 21, 2015 at 5:38 PM, D T wrote: > To my understanding, this is the ASM code, V8 produces for my Javascript > input file? > Yes. More specifically, it's the optimized code that was generated for your "rnd" function. > So if I execute my JS file with Chrome

Re: [v8-users] measuring compilation time, only compiling the code

2015-12-08 Thread Jakob Kummerow
What you want is not possible. JavaScript is not C. V8 is not a C compiler. Optimized compilation (not only *when* it triggers, but also *what* it does) depends on type feedback collected while unoptimized code was executed. If you hack things to start optimized compilation immediately, then the

Re: [v8-users] measuring compilation time, only compiling the code

2015-12-08 Thread Jakob Kummerow
r and full-codegen, less than 1% in optimizing compilers). On Tue, Dec 8, 2015 at 5:38 PM, Abe Skolnik <a.skol...@samsung.com> wrote: > [Jakob Kummerow <jkumme...@chromium.org> wrote...] > > > What you want is not possible. > > "not possible" is a very strong phra

Re: [v8-users] How to instrument function creation and invocation in v8

2015-12-03 Thread Jakob Kummerow
For tracing function invocation, there's the --trace flag. There's no existing instrumentation to observe function object creation. You can try hooking into Factory::NewFunction , but I'm not sure if there are code paths that

Re: [v8-users] How to instrument function creation and invocation in v8

2015-12-03 Thread Jakob Kummerow
ot time to look at the trace API closely. However, I do want > to instrument some code before and after each function invocation > , is that possible with trace API or I can simply add my own trace > functions? > > > Thanks, > Wenzhi Cui > > On Thu, Dec 3, 2015 at 3:36

Re: [v8-users] Performance Issues creating an Isolate and Context version 3.3 vs 4.5

2015-11-24 Thread Jakob Kummerow
ilize snapshots? Or possibly a change to my make script? The embedders > guide mentions a method InitializeExternalStartupData, but that looks like > it is not in version 4.5. > > On Monday, November 23, 2015 at 1:36:39 AM UTC-8, Jakob Kummerow wrote: > >> Well, for me turning the s

Re: [v8-users] Performance Issues creating an Isolate and Context version 3.3 vs 4.5

2015-11-24 Thread Jakob Kummerow
? (Currently I turn off snapshot, and I'm afraid I > have performance issue, sign...). Thanks. > I'm not sure I understand. You shouldn't need to customize the snapshot. Are you modifying V8's source code? What does "it is not working" mean? > On Saturday, November 21, 201

Re: [v8-users] Performance Issues creating an Isolate and Context version 3.3 vs 4.5

2015-11-23 Thread Jakob Kummerow
orrentino <n...@metavine.com> wrote: > Sorry, I should have mentioned, we did try with both snapshot on and off > and still had the same performance issue. > > On Saturday, November 21, 2015 at 3:26:15 AM UTC-8, Jakob Kummerow wrote: >> >> The purpose of the snapsh

Re: [v8-users] Triggering a minor GC cycle (aka scavenge)

2015-11-21 Thread Jakob Kummerow
Firstly, I can't reproduce the behavior you're observing: when I run your command line, I only see two scavenges. Also: - you're running a 64bit build; Smis on x64 use 64 bits just like every other pointer - storing a Smi into an existing array backing store doesn't allocate anything - what do

Re: [v8-users] Performance Issues creating an Isolate and Context version 3.3 vs 4.5

2015-11-21 Thread Jakob Kummerow
The purpose of the snapshot is to speed up Isolate and Context creation. If you build with snapshot=off, startup will be slower. (Also, I'm really glad you're moving away from version 3.32.3, which was just a random daily snapshot, not suitable for production use.) On Sat, Nov 21, 2015 at 2:34

Re: [v8-users] Re: V8 build failed on Redhat (Follow up: problem narrowed down to Python)

2015-11-21 Thread Jakob Kummerow
Apparently your Python is incapable of running GYP. I have no idea why that might be happening. Can this Python installation run other Python programs? On Sat, Nov 21, 2015 at 8:14 AM, Shuai Yuan wrote: > Follow up on this issue, it turns out to be something about python: >

Re: [v8-users] How to insert a Javascript function into V8's event loop?

2015-11-19 Thread Jakob Kummerow
V8 doesn't have an event loop. Have you tried *calling* your function? On Thu, Nov 19, 2015 at 9:02 AM, Nasser Torabzade < nasser.torabz...@gmail.com> wrote: > Hi, > > I'm trying to develop a nodejs addon aimed to insert a Javascript function > into event loop of internal V8 instance of nodejs.

Re: [v8-users] Embedding v8 as static library in C++ application.

2015-11-19 Thread Jakob Kummerow
They don't. The 'v8' target defines itself to be a library, either static or shared, depending on build settings. 'dependencies' just encode build order dependencies; GYP simply assumes that whenever an executable depends on a library, it also wants to be linked against that library. On Thu, Nov

Re: [v8-users] Build on Mac

2015-11-10 Thread Jakob Kummerow
Looks like your copy of include/v8.h is out of sync with the rest of V8 (as in: it's a different version). Maybe it's installed as a system header and somehow gets pulled in? Also, using "sudo" for random shell commands is a bad idea. On Tue, Nov 10, 2015 at 6:15 AM, Vitor

Re: [v8-users] Deferred TaggedToI: NaN

2015-11-02 Thread Jakob Kummerow
> > Matt > > On Monday, November 2, 2015 at 4:25:51 AM UTC-5, Jakob Kummerow wrote: >> >> Correct. This has been fixed in the meantime, but 3.28 is too old. >> >> On Sun, Nov 1, 2015 at 9:39 PM, Matt Broadstone <mbro...@gmail.com> >> wrote: >> >>

Re: [v8-users] Deferred TaggedToI: NaN

2015-11-02 Thread Jakob Kummerow
Correct. This has been fixed in the meantime, but 3.28 is too old. On Sun, Nov 1, 2015 at 9:39 PM, Matt Broadstone wrote: > Hi, > > I'm trying to track down an eager deoptimization in my node.js code, and > it seems to be directly related to a keyed lookup on an object using

Re: [v8-users] Disable GC during the specified time period

2015-10-30 Thread Jakob Kummerow
Speaking of Really Bad Ideas: V8 flags aren't designed to be toggled arbitrarily at runtime. I wouldn't be surprised if lots of stuff started breaking when you mess with flags. (If I were to design an embedder, I wouldn't even provide a "v8.setFlagsFromString()" interface, because having one just

Re: [v8-users] Re: Disable GC during the specified time period

2015-10-30 Thread Jakob Kummerow
On Fri, Oct 30, 2015 at 2:13 PM, Artem Chivchalov wrote: > > Thanks for the --never-compact flag tip. What bad things can I expect > using this at run-time? > Crashes, memory leaks, random wrong behavior. And it probably won't be deterministic -- a quick test will look

Re: [v8-users] V8 Flags

2015-10-29 Thread Jakob Kummerow
https://chromium.googlesource.com/v8/v8/+/master/src/flag-definitions.h Spoiler: there's nothing in there that you'd want to mess with. Most flags are for debugging and development. When it makes sense to turn on a flag, we turn it on by default. On Thu, Oct 29, 2015 at 9:39 AM, Ivan P.

Re: [v8-users] How expensive is C++ function calls from JavaScript?

2015-10-27 Thread Jakob Kummerow
Yes, calling into C++ is somewhat expensive, although I don't have numbers on hand. I'd try to group the work into fewer calls (ideally, have one C++ call per frame that does everything that the previous 700 calls did combined). On Tue, Oct 27, 2015 at 2:11 PM, vroad wrote: >

Re: [v8-users] profile result print in v8

2015-10-26 Thread Jakob Kummerow
Not sure I understand the question. Are you looking for https://chromium.googlesource.com/v8/v8/+/master/docs/v8_profiler.md ? On Mon, Oct 26, 2015 at 6:34 AM, Inyoung Park wrote: > Hello, > > I try to print profile result, so I save ~.cpuprofile(json format) in > chromium.

Re: [v8-users] Displaying V8 Counter & Histogram

2015-10-26 Thread Jakob Kummerow
As far as I know, Chromium has dropped support for V8 counters :-( On Mon, Oct 26, 2015 at 6:36 AM, GyeongHwan Hong wrote: > Hello, > > I'd like to profile V8's behavior using counters and histograms which are > declared in "v8/src/counters.h". > > As I know, the counters

Re: [v8-users] Mercurial downloads

2015-10-20 Thread Jakob Kummerow
Please stop spamming this list. On Tue, Oct 20, 2015 at 12:27 PM, GS apple wrote: > Chrome Version : 'about:version'> Mozilla Public License 1.1 > URL : http://www.mercurial-1.blogspot.com/2015/10/downloads.html > Behavior in 3.5.2 MSI installer - x64

Re: [v8-users] Thread cleanup

2015-10-19 Thread Jakob Kummerow
object creation/destruction if >> ThreadManager::FreeThreadResources always does a full thread cleanup but >> it's hard to imagine that being significant for anyone. In the unlikely >> event that it is, an embedder can create an outer Locker with nested >> Unlockers, an app

Re: [v8-users] performance oddities of v8 Arrays

2015-10-19 Thread Jakob Kummerow
On Mon, Oct 19, 2015 at 10:24 PM, Dmitry Orlov <alepho...@gmail.com> wrote: > > On 18 October 2015 at 03:51, Jakob Kummerow <jkumme...@chromium.org> > wrote: > >> The fastest way to exchange large amounts of data between C++ and JS is >>

Re: [v8-users] Thread cleanup

2015-10-19 Thread Jakob Kummerow
bly switch over to using v8-dev for any other issues? I > appreciate the time you've given this. > > On Monday, October 19, 2015 at 3:01:47 AM UTC-7, Jakob Kummerow wrote: >> >> Well, there can be N threads acquiring and releasing locks for M isolates >> in arbitrary sequen

Re: [v8-users] Thread cleanup

2015-10-18 Thread Jakob Kummerow
On Sun, Oct 18, 2015 at 8:16 AM, Alex Kodat wrote: > If I have an app that steadily creates and joins threads, is there a good > way of cleaning up the thread-specific data when a thread terminates? > Looking at the v8 code, it seems that ThreadManager::FreeThreadResources

Re: [v8-users] performance oddities of v8 Arrays

2015-10-18 Thread Jakob Kummerow
On Sat, Oct 17, 2015 at 12:20 AM, Dmitry Orlov <alepho...@gmail.com> wrote: > Thanks Jacob! > > On 16 October 2015 at 13:56, Jakob Kummerow <jkumme...@chromium.org> > wrote: > >> It's not about what the "internal array representation" is, it's about &

Re: [v8-users] performance oddities of v8 Arrays

2015-10-16 Thread Jakob Kummerow
It's not about what the "internal array representation" is, it's about how the array is accessed. V8 employs all sorts of smarts to make JavaScript execution very fast, because that's its job. Accessing things via the C++ API ("array->Set(...)" in your example) isn't anywhere near as optimized.

Re: [v8-users] 64bit performance is lower than 32bit in android HUAWEI P8

2015-10-13 Thread Jakob Kummerow
On Tue, Oct 13, 2015 at 4:21 AM, Yong Wang wrote: > Hi everyone: > >we are using V8.3.27.34.15 > That's more than a year old and has known security issues. I wouldn't use that to browse the web. > in android device HUAWEI P8, and found that 64bit performance is

Re: [v8-users] 64bit performance is lower than 32bit in android HUAWEI P8

2015-10-13 Thread Jakob Kummerow
On Tue, Oct 13, 2015 at 11:32 AM, Yong Wang <wangyong...@gmail.com> wrote: > > > 在 2015年10月13日星期二 UTC+8下午4:15:38,Jakob Kummerow写道: >> >> On Tue, Oct 13, 2015 at 4:21 AM, Yong Wang <wangy...@gmail.com> wrote: >> >>> Hi everyone: >>> >

Re: [v8-users] Flags and prints

2015-10-07 Thread Jakob Kummerow
Yes. On Wed, Oct 7, 2015 at 10:19 AM, Ignacio Queralt wrote: > Hi everybody, > I was using the d8 with the flag --trace_opt to see the optimizations of > the v8 (running in the d8), and I came up with the idea of using print > statements in the code (which I believe is

Re: [v8-users] Object.ForceSet to bypass accessors.

2015-10-06 Thread Jakob Kummerow
Have you checked bit.ly/v8-api-changes ? On Tue, Oct 6, 2015 at 8:44 PM, Jane Chen wrote: > In v8 4.7.0, Object.ForceSet is deprecated. What is the new recommended > way of bypassing accessors? > > The use case I have is that I lazily create global objects and functions >

Re: [v8-users] v8 shell crashes with Fatal error in v8::ToLocalChecked Empty MaybeLocal.

2015-10-05 Thread Jakob Kummerow
The whole point of a MaybeLocal is that it *may *(or may not) contain a value. Calling .ToLocalChecked() on it is unsafe, unless you happen to know that it can't be empty. shell.cc:416 is doing it wrong. d8.cc:883

Re: [v8-users] Property access time in JavaScript programs

2015-09-30 Thread Jakob Kummerow
original code looks after > introducing code for inline caching. > I don't know what you mean by "after introducing code for inline caching". The call targets get patched, that's all... no code is added. > On Friday, 18 September 2015 18:44:43 UTC+5:30, Jakob Kummerow wrote: &g

Re: [v8-users] Reusing contexts across scripts

2015-09-29 Thread Jakob Kummerow
There is no way to reset a context. It's probably best to just create a fresh one. Search the archives of this list, this has been asked and answered several times. On Tue, Sep 29, 2015 at 12:03 PM, Rethish Kumar P.S wrote: > Hi, > > I have an application which has

Re: [v8-users] NewStringType::kNormal vs. kInternalized.

2015-09-25 Thread Jakob Kummerow
I'd use kInternalized for strings that will be used as property names, and kNormal for strings that will be processed further (concatenated, sliced, replaced, printed, ...). Internalized strings are more expensive to create, but make equality comparisons faster (which object property lookups need

Re: [v8-users] MaybeLocal to Local conversion.

2015-09-25 Thread Jakob Kummerow
Should be safe, but it's hard to be sure: the API surface is huge, and 3.24 is really old. At least, *if* there is an unexpectedly empty MaybeLocal, it'll crash right inside ToLocalChecked, which should make debugging easy. On Fri, Sep 25, 2015 at 6:04 AM, Jane Chen wrote:

Re: [v8-users] Runtime functions in V8

2015-09-24 Thread Jakob Kummerow
On Thu, Sep 24, 2015 at 1:58 PM, dmonji wrote: > 1) In v8, ic.cc, i see functions like > *RUNTIME_FUNCTION(Runtime_KeyedLoadIC_Miss)*. > I don't understand how are they invoked. Is there some connection > with * __ TailCallRuntime(Runtime::kKeyedLoadIC_Miss,

Re: [v8-users] IC Misses and transitions between status

2015-09-22 Thread Jakob Kummerow
lowing > states regarding IC: > Uninitialized -> Pre-monomorphic -> Monomorphic -> Polymorphic/Megamorphic > -> Generic > How should I build an example, or which flag should I use to see the > transitions between these states? > > Thank you for your help! I'm new wi

Re: [v8-users] Link original Javascript code to optimized ASM code

2015-09-22 Thread Jakob Kummerow
Functions aren't optimized right away, only when they're detected as "hot". Try calling your function 1000 times or so in a loop. (The bigger it is, the less often it needs to be called to be considered "hot"; the details of that mechanism are rather complicated.) On Tue, Sep 22, 2015 at 11:46

Re: [v8-users] WhatsApp Chat with 30 recipients

2015-09-21 Thread Jakob Kummerow
Please stop sending non-sensical mails to this list. On Sun, Sep 20, 2015 at 5:25 PM, Roba Boru wrote: > Chat history is attached as “WhatsApp Chat with 30 recipients.txt” file to > this email. > > RB > > -- > -- > v8-users mailing list > v8-users@googlegroups.com >

Re: [v8-users] IC Misses and transitions between status

2015-09-21 Thread Jakob Kummerow
On Mon, Sep 21, 2015 at 4:53 PM, Ignacio Queralt wrote: > [snip] > > My questions would be: > 1) Where are the transitions between Uninitialized, and Monomorphic of the > newadd function, for instance? I read that there are some Uninitialized -> > Smi, but I can't see the

Re: [v8-users] proto in dictionary

2015-09-18 Thread Jakob Kummerow
JavaScript objects must always have a prototype. Internal implementation details like how the properties are stored can't influence that. On Fri, Sep 18, 2015 at 12:57 PM, dmonji wrote: > I understand that when too many properties are added or a property is > deleted

Re: [v8-users] Property access time in JavaScript programs

2015-09-18 Thread Jakob Kummerow
Property access time is not measured separately. On Fri, Sep 18, 2015 at 12:56 PM, dmonji wrote: > I want to compute the proportion of time spent on property accesses in > JavaScript programs. I am aware of >

Re: [v8-users] Property access time in JavaScript programs

2015-09-18 Thread Jakob Kummerow
ode, and summed up the time between > "before access" and "after access". But I am not very sure if this is > the right way to measure the time required for property accesses. Any > thoughts on this? > > On Friday, 18 September 2015 16:30:42 UTC+5:30, Jakob Kummerow

Re: [v8-users] Embedding v8 in multi-platform application

2015-09-16 Thread Jakob Kummerow
standalone.gypi, as the name implies, is intended for standalone V8 builds. Embedders should provide corresponding definitions in their own GYP files (e.g. their common.gypi). If you need a (big) example, look at Chromium's common.gypi. On Wed, Sep 16, 2015 at 4:29 PM, Niklas Frisk

Re: [v8-users] Trouble running tests on Windows

2015-09-15 Thread Jakob Kummerow
On Tue, Sep 15, 2015 at 7:31 PM, Domenic Denicola wrote: > I have two persistent issues while trying to run the V8 tests on Windows, > and was hoping someone had figured out a workaround: > >1. run-tests.py seems to expect output to be in folders named things >like

Re: [v8-users] Compile static android arm on linux

2015-09-15 Thread Jakob Kummerow
Try building in Release mode instead of Debug, the generated artifacts should be a lot smaller. That said, if you do custom modifications to the build system, you're pretty much on your own when things don't work as expected. Also, consider using the latest stable branch instead of a random

Re: [v8-users] Trouble running tests on Windows

2015-09-15 Thread Jakob Kummerow
On Tue, Sep 15, 2015 at 8:16 PM, Domenic Denicola <d...@domenic.me> wrote: > From: v8-users@googlegroups.com [mailto:v8-users@googlegroups.com] On > Behalf Of Jakob Kummerow > > > https://code.google.com/p/v8-wiki/wiki/BuildingWithGYP#Running_tests > > Thanks. I t

Re: [v8-users] Re: Cross Compiling V8 for Android on OSX

2015-09-14 Thread Jakob Kummerow
Just to confirm: - cross-compiling for Android on Linux64 is continuously being tested, so it's known to work - cross-compiling for Android on Mac is not regularly tested; I think it used to work, but it may well have rotted; if you care about this configuration and want to make it work feel free

Re: [v8-users] d8 binary seg faults when moved?

2015-09-04 Thread Jakob Kummerow
have to keep around one file rather than three. (This was > how things worked as of 4.3.61, and is also how things seem to work on Mac.) > > > > On Friday, September 4, 2015 at 4:14:35 AM UTC-4, Jakob Kummerow wrote: >> >> You need to copy natives_blob.bin and snapshot

Re: [v8-users] d8 binary seg faults when moved?

2015-09-04 Thread Jakob Kummerow
You need to copy natives_blob.bin and snapshot_bob.bin along with d8. (There should probably be a better error message to indicate this.) On Thu, Sep 3, 2015 at 8:19 PM, Marcin Cieslak wrote: > On Thu, 3 Sep 2015, 'Charlie Andrews' via v8-users wrote: > > > $ mv

<    1   2   3   4   5   6   >