Re: [v8-users] mksnapshot fails on windows with is_official_build = true, is_component_build = true, use_custom_libcxx = false

2023-08-09 Thread Jakob Gruber
t; printf(" called CallOnceFake1 lambda\n"); > }); > > v8::base::Test2(TestFunction); > > v8::base::Test2([]() { > printf(" called CallOnceFake2 lambda\n"); > }); > > The output is > > Test1 before init_func > called CallOnc

Re: [v8-users] mksnapshot fails on windows with is_official_build = true, is_component_build = true, use_custom_libcxx = false

2023-08-09 Thread Jakob Gruber
like something around the lambda capture-by-copy is buggy (accessing the wrong stack slot?). Perhaps you can verify with disassembly of InitProcessWideCodeRange, or step through and find out what it's actually copying. > > On Wed, Aug 9, 2023, at 8:03 AM, Jakob Gruber wrote: > > >

Re: [v8-users] mksnapshot fails on windows with is_official_build = true, is_component_build = true, use_custom_libcxx = false

2023-08-08 Thread Jakob Gruber
) > I'm happy to investigate further, but wanted to send this out in case > there is anything specific that would be helpful. > > Jean-Claude > > On Tue, Aug 8, 2023, at 12:13 PM, Jakob Gruber wrote: > > Hi Jean-Claude, > > no, we don't have a lot

Re: [v8-users] mksnapshot fails on windows with is_official_build = true, is_component_build = true, use_custom_libcxx = false

2023-08-08 Thread Jakob Gruber
Hi Jean-Claude, no, we don't have a lot of test coverage for `use_custom_libcxx=false`, this mode is only supported on a best-effort basis. For debugging: a backtrace and symbols would be useful. Does running `mksnapshot` in a debugger give more infos? Also, a bisect to find the culprit change wo

Re: [v8-users] Creating and returning a new v8::internal::Object within a runtime function

2023-02-14 Thread Jakob Gruber
Hi, something like this should work: RUNTIME_FUNCTION(...) { ... return *isolate->factory()->NewNumber(number); } On Tue, Feb 14, 2023 at 8:19 PM Pradyumna Shome wrote: > Hi all > > I'm trying to add a new runtime function to return the Data Pointer of an > array as a v8::NumberObject, so I c

Re: [v8-users] Issues with preserve_most?

2023-02-07 Thread Jakob Gruber
+cleme...@chromium.org On Tue, Feb 7, 2023 at 3:55 PM ClearScript Developers < clearscript...@gmail.com> wrote: > Greetings! > > We've noticed that preserve_most was disabled > > for Windows/arm64 on the 11.

Re: [v8-users] iOS ARM64 only: undefined symbol: v8_Default_embedded_blob_code_

2022-12-13 Thread Jakob Gruber
Hey Benoit, the v8_Default_embedded_blob_code_ symbol is created by the embedded file writer and ends up in out/foo/gen/embedded.S in your

Re: [v8-users] Re: Is it safe to reuse code cache generated before a context snapshot is serialized?

2022-03-15 Thread Jakob Gruber
I don't have any ideas right now; could you please file a bug with details on how to compile and run the repro? On Tue, Mar 15, 2022 at 9:12 PM jo...@igalia.com wrote: > Correction: in the snippet in the last reply, the comment `// This crashes > with the stack trace below` should be `// This cr

Re: [v8-users] Re: Execution hang on v8::debug::EvaluateGlobal with kDisableBreaksAndThrowOnSideEffect

2022-02-22 Thread Jakob Gruber
On Tue, Feb 22, 2022 at 7:17 AM Jakob Gruber wrote: > Looks to me like a deadlock between > > if (blocking_behavior == BlockingBehavior::kBlock) { > base::MutexGuard lock_guard(&ref_count_mutex_); > while (ref_count_ > 0) ref_count_zero_.Wait(&ref_

Re: [v8-users] Re: Is it safe to reuse code cache generated before a context snapshot is serialized?

2022-02-22 Thread Jakob Gruber
> My understanding is that the serialized code and SFI and whatnot is part of the context snapshot To clarify, the code cache is separate from the isolate/context snapshot; and neither contain serialized Code (Bytecode is possible though). It does sound like snapshots are getting confused somewhe

Re: [v8-users] Re: Execution hang on v8::debug::EvaluateGlobal with kDisableBreaksAndThrowOnSideEffect

2022-02-21 Thread Jakob Gruber
Looks to me like a deadlock between if (blocking_behavior == BlockingBehavior::kBlock) { base::MutexGuard lock_guard(&ref_count_mutex_); while (ref_count_ > 0) ref_count_zero_.Wait(&ref_count_mutex_); https://source.chromium.org/chromium/chromium/src/+/main:v8/src/compiler-dispatcher/op

Re: [v8-users] Preliminary RFC: Stabilizing the V8 script compiler cached data format

2021-07-26 Thread Jakob Gruber
On Mon, Jul 26, 2021 at 11:19 AM Leszek Swirski wrote: > On Fri, Jul 23, 2021 at 1:18 AM Vitali Lovich wrote: > >> What's the best way to measure script parse time vs lazy function >> compilation time? It's been a few months since I last looked at this so my >> memory is a bit hazy on whether it

Re: [v8-users] Building for iOS: requested alignment must be 536870912 bytes or smaller

2021-05-04 Thread Jakob Gruber
lternatively, remove that use of V8_ASSUME_ALIGNED. It's just a hint >>> for the compiler, it's not needed for correctness. >>> >>> On Tue, May 4, 2021 at 7:30 AM Jakob Gruber wrote: >>> >>>> Try turning off pointer compression: >>>>

Re: [v8-users] Building for iOS: requested alignment must be 536870912 bytes or smaller

2021-05-03 Thread Jakob Gruber
Try turning off pointer compression: https://source.chromium.org/chromium/chromium/src/+/main:v8/BUILD.gn;l=121;drc=f98f496f9e5e9faea58e1de737d9d46e2248b337 Let us know if it works, we should update the iOS instructions page if so. On Mon, May 3, 2021 at 2:20 PM Richard wrote: > I'm getting thi

Re: [v8-users] Snapshot limitations

2021-03-09 Thread Jakob Gruber
I think crbug.com/v8/10500 will answer some of your questions. Short version: no, currently you can't snapshot a running isolate with arbitrary state. Also take a look at the d8 --stress-snapshot

Re: [v8-users] Reduce V8 size by eliminating unused features

2021-01-31 Thread Jakob Gruber
+Clemens Backes I know we'd discussed a flag to make wasm optional in the past, was there any progress? On Sat, Jan 30, 2021 at 11:48 AM Ben Noordhuis wrote: > On Fri, Jan 29, 2021 at 9:17 PM Tekman wrote: > > > > Hi, > > > > Do you have any tips for reducing the size of an embedded V8 by remo

Re: [v8-users] Re: run_torgue fails when compiling under windows (use_custom_libcxx=false)

2021-01-26 Thread Jakob Gruber
+Nico Hartmann On Tue, Jan 26, 2021 at 1:27 PM Thomas Liebmann < thorsten.baess...@siemens.com> wrote: > Update: > I tried to run torque in the debugger. It fails with: > Unhandled exception at 0x7FFA38D9F7A0 (ntdll.dll) in torque.exe: > RangeChecks instrumentation code detected an out of ra

Re: [v8-users] iOS 14.2 now supports JIT

2020-11-08 Thread Jakob Gruber
Interesting.. Enabling jitting in V8 should be as easy as removing the --jitless flag (see e.g. here ). I'm curious if the app store guidelines will also change to all

Re: [v8-users] Getting unstable builds of V8 under Mac OS

2020-10-13 Thread Jakob Gruber
I verified locally that d8 built with is_component_build = false is_debug = true v8_optimized_debug = true use_custom_libcxx = false on a macbook works fine. The build completes, and d8 runs some trivial examples without issues. Same with v8_cppgc_shared_unittests which you mentioned in your late

Re: [v8-users] Getting unstable builds of V8 under Mac OS

2020-10-11 Thread Jakob Gruber
On Mon, Oct 12, 2020 at 2:38 AM Cameron Caturria < surviving.deceptive.wo...@gmail.com> wrote: > Hi, > I have been trying for some time to build a working V8 static library > under Mac OS with limited success. I can get it to build, but the > result is unstable. > I have successfully setup depot-t

Re: [v8-users] Re: Failed to cross compile v8 for iOS: error: unknown directive .type PushAllRegistersAndIterateStack

2020-05-10 Thread Jakob Gruber
+Michael Lippautz On Fri, May 8, 2020 at 3:25 PM 许超前 wrote: > I compiled latest v8 on macOS catalina(10.15.4), with the following gn > args: > > enable_ios_bitcode = true > > ios_deployment_target = 10 > > is_component_build = false > > is_debug = false > > target_cpu = "arm64"

Re: [v8-users] Disabling V8 snapshots for ARM cross-compiles

2020-04-13 Thread Jakob Gruber
Filed https://crbug.com/v8/10414 to track this. On Thu, Apr 9, 2020 at 2:16 PM Thomas Preston < thomas.pres...@codethink.co.uk> wrote: > Yes, that would save some time building. Please let me know if there's any > update on this. Thank you > > On Wednesday, 8 April 202

Re: [v8-users] Disabling V8 snapshots for ARM cross-compiles

2020-04-08 Thread Jakob Gruber
It sounds like we could improve support for this case by providing a gn argument for prebuilt `snapshot_blob.bin` and `embedded.S` artifacts. If provided, we could skip building mksnapshot entirely. Would that help? On Wed, Jan 29, 2020 at 10:44 AM Thomas Preston < thomas.pres...@codethink.co.uk>

Re: [v8-users] Disabling V8 snapshots for ARM cross-compiles

2020-01-07 Thread Jakob Gruber
On Tue, Jan 7, 2020 at 3:13 PM Thomas Preston < thomas.pres...@codethink.co.uk> wrote: > On Tuesday, 7 January 2020 09:14:36 UTC, Jakob Gruber wrote: >> >> On Mon, Jan 6, 2020 at 6:30 PM Thomas Preston >> wrote: >> >>> Hi, >>> We have notic

Re: [v8-users] Disabling V8 snapshots for ARM cross-compiles

2020-01-07 Thread Jakob Gruber
On Mon, Jan 6, 2020 at 6:30 PM Thomas Preston < thomas.pres...@codethink.co.uk> wrote: > Hi, > We have noticed that the latest version of Chromium makes the v8 snapshot > build mandatory. > We were turning this off for building under Buildroot (for linux, > targetting 32-bit ARM), because Buildroo

Re: [v8-users] CpuProfiler not collecting data in jitless mode (iOS)

2019-11-06 Thread Jakob Gruber
+Peter Marshall On Wed, Nov 6, 2019 at 8:58 AM Darin Dimitrov wrote: > I am trying to collect function execution data using the CpuProfiler class. > > I ran the following test (taken from here > https://github.com/v8/v8/blob/master/test/cctest/test-cpu-profiler.cc#L677 > ): > > const char* src

Re: [v8-users] Is "monolithic" build of v8 for static linking incompatible with "v8_use_snapshot=true"?

2019-10-28 Thread Jakob Gruber
Set v8_use_external_startup_data = false to compile the snapshot into the binary. I don't think there's any reason external snapshots would not work in monolithic builds. The assert is likely guarding the fact that the build produces exactly one single file. On Tue, Oct 29, 2019 at 7:07 AM Ben E

Re: [v8-users] V8 Regex Optimizations

2019-10-27 Thread Jakob Gruber
atch(regex) } `. Doing this, I notice a significant improvement in the > execution on first call back into the context to execute a function that > uses these regex's. > > Is there a way to change this default configuration? > > Joel > > On Thursday, 24 October 201

Re: [v8-users] V8 Regex Optimizations

2019-10-23 Thread Jakob Gruber
On Wed, Oct 23, 2019 at 5:12 PM Joel Scarfone wrote: > Hi! > > I'm looking for details on how v8's regular expression optimizations work > under the covers, and if there might be something to improve the > performance of a given regular expressions first execution. From what it > looks like tryin

Re: [v8-users] Create heap snapshot for x86 from 64 bit process

2019-10-23 Thread Jakob Gruber
tps://github.com/dart-lang/sdk/issues/36839> . > > > 在 2019年8月26日星期一 UTC+8下午4:51:08,Jakob Gruber写道: >> >> On Mon, Aug 26, 2019 at 10:41 AM Darin Dimitrov >> wrote: >> >>> Is it possible to create heap snapshot using the "mksnapshot" tool for

Re: [v8-users] Overriding platform specific logging feature

2019-10-09 Thread Jakob Gruber
Is the override specific to iOS or to a particular application? If the former, why not upstream it in V8? On Wed, Oct 9, 2019 at 2:17 PM Darin Dimitrov wrote: > I am embedding V8 in an iOS application and I would like to override the > "OS::Print" method: > https://chromium.googlesource.com/v8/v

Re: [v8-users] Calling js functions in jitless (iOS)

2019-09-17 Thread Jakob Gruber
It'd be interesting to find out what more. We should not attempt to jump into runtime-allocated executable code in jitless mode. If you have a repro, please open a bug and I will take a look. On Thu, Sep 12, 2019 at 5:45 PM Darin Dimitrov wrote: > Found the root cause. > > I was setting a named

Re: [v8-users] Calling function from shared library in V8 7.7.299.11

2019-09-12 Thread Jakob Gruber
Could this be another libcxx mismatch issue and 7.7 just exposes it incidentally? On Thu, Sep 12, 2019 at 2:54 PM Darin Dimitrov wrote: > I am cross compiling V8 for android and I have created a shared library > containing a simple function which adds some property to a provided object: > > exte

Re: [v8-users] Performance mystery with largish heaps

2019-09-08 Thread Jakob Gruber
+Ulan Degenbaev On Thu, Sep 5, 2019 at 9:06 PM Philip Zeyliger wrote: > Hi, > > I'm running into what seems to be a lot of v8 GC activity when piping a > 1GB file to /dev/null. The performance varies considerably depending on > whether or not I have an empty heap or one that I've filled to the

Re: [v8-users] Snapshot blob includes java script code with comments

2019-09-03 Thread Jakob Gruber
On Tue, Sep 3, 2019 at 1:39 PM Jakob Kummerow wrote: > The snapshot will typically contain both the original JavaScript source > and the bytecode for functions. Function.prototype.toString needs the > source, so not including that in the snapshot would be a spec violation. > Bytecode is usually

Re: [v8-users] Create heap snapshot for x86 from 64 bit process

2019-08-26 Thread Jakob Gruber
On Mon, Aug 26, 2019 at 10:41 AM Darin Dimitrov wrote: > Is it possible to create heap snapshot using the "mksnapshot" tool for x86 > or armeabi-v7a CPU architectures from a 64 bit process. If yes, what are > the steps to build such "mksnapshot" executable? > Unfortunately, no. Cross-bitness bui

Re: [v8-users] d8.exe crashed when running a script

2019-08-22 Thread Jakob Gruber
Sounds like a stack overflow in the regexp compiler while compiling a huge pattern. Feel free to file a bug (please include a backtrace). Also see https://crbug.com/v8/9378. On Thu, Aug 22, 2019 at 10:45 AM qinghai xiao wrote: > Version: 7.6.303.22 > OS: Windows > Architecture: x86 > > *What ste

Re: [v8-users] jitless mode broken on ARM64

2019-08-07 Thread Jakob Gruber
e disabled by > default when target_os="ios"? Or is it just some issue that will be fixed > and we will be able to use pointer compression in jitless mode in the > future? > > On Thursday, August 8, 2019 at 7:49:16 AM UTC+3, Jakob Gruber wrote: >> >> Darin, thanks for r

Re: [v8-users] jitless mode broken on ARM64

2019-08-07 Thread Jakob Gruber
On Wed, Aug 7, 2019 at 1:13 PM Jakob Gruber wrote: > >> +Santiago Aboy Solanes >> >> On Wed, Aug 7, 2019 at 2:09 PM Darin Dimitrov >> wrote: >> >>> I have cross compiled V8 for iOS <https://v8.dev/docs/cross-compile-ios> and >>> running in

Re: [v8-users] jitless mode broken on ARM64

2019-08-07 Thread Jakob Gruber
+Santiago Aboy Solanes On Wed, Aug 7, 2019 at 2:09 PM Darin Dimitrov wrote: > I have cross compiled V8 for iOS and > running in "--jitless" mode on an arm64 > device (iPhone 6). > > Everything has been working smoothly until

Re: [v8-users] Re: v8::Isolate::New works on 7.2, fails on 7.3+

2019-07-21 Thread Jakob Gruber
d frustrated. > Nico fyi. > > Thanks again for all the help! > > On Thursday, July 18, 2019 at 9:52:49 AM UTC-4, Jakob Gruber wrote: >> >> >> On Thu, Jul 18, 2019 at 3:10 PM Christopher Nelson >> wrote: >> >>> I appreciate that info, and I h

Re: [v8-users] Re: v8::Isolate::New works on 7.2, fails on 7.3+

2019-07-18 Thread Jakob Gruber
o have a look next week. > > On Thursday, July 18, 2019 at 8:43:42 AM UTC-4, Jakob Gruber wrote: >> >> On Thu, Jul 18, 2019 at 2:32 PM Christopher Nelson >> wrote: >> >>> I'm not using the same exact libc++, no. I don't have a problem doing >&

Re: [v8-users] Re: v8::Isolate::New works on 7.2, fails on 7.3+

2019-07-18 Thread Jakob Gruber
I'm not an expert on this either, I've just seen folks run into this fairly frequently in recent times. Here's where all of my infos come from: https://crbug.com/v8/9150#c2. Maybe this will help clarify. > > On Thursday, July 18, 2019 at 1:22:04 AM UTC-4, Jakob Gruber wrote

Re: [v8-users] Loading unaligned UTF-16 data in 7.6

2019-07-17 Thread Jakob Gruber
On Wed, Jul 17, 2019 at 10:49 PM Alex Kodat wrote: > In Reland "[runtime] Speed up String::IsOneByte", the following check was > added to NonOneByteStart in src/objects/string.h: > > DCHECK(IsAligned(reinterpret_cast(chars), sizeof(uc16))); > > This is part of the very clever word at a time det

Re: [v8-users] Re: v8::Isolate::New works on 7.2, fails on 7.3+

2019-07-17 Thread Jakob Gruber
On Wed, Jul 17, 2019 at 5:48 PM Christopher Nelson wrote: > Thank you so much for the help that has been provided so far. Sadly, I > tried both of these suggestions without success. > > First, I removed all of the build arguments except: > > is_debug = true > target_cpu = "x64" > v8_monolithic =

Re: [v8-users] Re: v8::Isolate::New works on 7.2, fails on 7.3+

2019-07-16 Thread Jakob Gruber
;d > probably start with v8_monolithic since the v8_enable_* flags there seem > unlikely to be the cause? > That reminds me, it could be related to use_custom_libcxx (a mismatch in libcxx used for V8 and the embedding project). Have you tried 'use_custom_libcxx = false'? > > On

Re: [v8-users] Re: v8::Isolate::New works on 7.2, fails on 7.3+

2019-07-15 Thread Jakob Gruber
Looks like allocation of the new string here is failing. That code has been there since 71 though. On Mon, Jul 15, 2019 at 7:37 PM Christopher Nelson wrote: > I have found

Re: [v8-users] Re: V8 compilation without custom libcxx

2019-07-01 Thread Jakob Gruber
On Tue, Jul 2, 2019 at 2:17 AM Cvetan Stefanovski wrote: > Hello, > > I have the same problem embedding V8 (7.5.288.23) into my Android > application. I tried to get rid of that custom libcxx to no avail. Next > that I want to try is to link my JNI <> V8 bridge library against the same > libcxx t

Re: [v8-users] Reducing V8 binary size in JIT-less mode

2019-07-01 Thread Jakob Gruber
Hi Darin, On Mon, Jul 1, 2019 at 2:22 PM Darin Dimitrov wrote: > According to https://v8.dev/blog/jitless, starting from 7.4, V8 supports > JIT-less mode making it suitable for restricted environments. > > My goal is to reduce the binary size by stripping the optimizing compiler > code which is

Re: [v8-users] Issues cross compiling v8 for iOS

2019-05-27 Thread Jakob Gruber
ChromeOS; > >} else if (string == "fuchsia") { > > return EmbeddedTargetOs::kFuchsia; > > - } else if (string == "mac") { > > + } else if (string == "mac" || string == "ios") { > > return EmbeddedTargetOs::kMac; > >

Re: [v8-users] Issues cross compiling v8 for iOS

2019-05-27 Thread Jakob Gruber
Hi Darin, I've been reworking cross-compile support in mksnapshot and may have missed the iOS case in OS detection . Let me take a look and get back to you. Jakob On Mon, May 27, 2019 at 1:40 PM Darin Dim

Re: [v8-users] Instrumentation with V8

2019-02-28 Thread Jakob Gruber
On Thu, Feb 28, 2019 at 12:05 PM Ben Noordhuis wrote: > On Tue, Feb 26, 2019 at 10:36 PM Harold Camacho > wrote: > > I wanted some help with instrumentation with the v8 engine. > > > > I wanted to know if it's possible to inject JavaScript code with V8 > (like a global counter) so that I can cou

Re: [v8-users] Error cross compiling V8 with is_component_build=true on ARM64

2019-02-20 Thread Jakob Gruber
there: > > if (current_cpu != "arm64") { > libs += [ "android_support" ] > } > > then everything seems to build and work fine. > > On Wednesday, February 20, 2019 at 12:20:01 PM UTC+2, Jakob Gruber wrote: >> >> You are building with target_os="android&

Re: [v8-users] Error cross compiling V8 with is_component_build=true on ARM64

2019-02-20 Thread Jakob Gruber
You are building with target_os="android"; would you expect this to not need libandroid_support? On Wed, Feb 20, 2019 at 10:23 AM Darin Dimitrov wrote: > I am trying to cross compile V8 for ARM64 with *is_component_build=true* > for ARM64: > > gn gen outgn/release --args="is_component_build=true

[v8-users] PSA: Changes to supported V8 build modes

2019-02-19 Thread Jakob Gruber
*TLDR: we are planning to remove support for nosnapshot builds (gn flag: 'v8_use_snapshot = false') and builds without embedded builtins (gn flag: 'v8_enable_embedded_builtins = false').* *Snapshot?* Currently, V8 supports building with- and without a snapshot

Re: [v8-users] mksnapshot creates invalid embedded.S on MacOS

2019-02-06 Thread Jakob Gruber
This is where the _ prefixes are generated. Specifically, mksnapshot generates an embedded.S file based on the host OS, which is incorrect for cross-compilation. A simil

[v8-users] Re: [blink-dev] Re: [v8-dev] Intent to Ship: RegExp @@matchAll / String.prototype.matchAll

2018-12-13 Thread Jakob Gruber
LGTM3 On Fri, Dec 14, 2018 at 1:57 AM Adam Klein wrote: > LGTM2 > > On Thu, Dec 13, 2018 at 3:27 PM Sathya Gunasekaran > wrote: > >> LGTM >> On Thu, Dec 13, 2018 at 2:01 PM Peter Wong >> wrote: >> > >> > Contact emails >> > peter.wm.w...@gmail.com >> > jgru...@chromium.org >> > yang...@chromiu

Re: [v8-users] Re: Heap snapshot crash on ARM in V8 7.1.302.28

2018-12-11 Thread Jakob Gruber
I can repro the CHECK failure on master, opened https://crbug.com/v8/8572. On Mon, Dec 10, 2018 at 2:13 PM Darin Dimitrov wrote: > Strangely enough, if I create a large number of strings just after > creating the isolate, everything works fine: > > for (int i = 0; i < 70; i++) { > v8::St

Re: [v8-users] Heap snapshot crash on ARM in V8 7.1.302.28

2018-12-05 Thread Jakob Gruber
Something is wrong in frame iteration.. Is the crash reproducible? Have you checked if it happens on the current V8 version? Please open a bug at https://crbug.com/v8/new and include the script you are embedding if possible. On Wed, Dec 5, 2018 at 5:46 PM Darin Dimitrov wrote: > Hello, > > We a

Re: [v8-users] Crash in mksnapshot

2018-11-28 Thread Jakob Gruber
I'd suggest opening a bug at https://crbug.com/v8/new. Ideally provide exact error output, gn args, repro instructions, and details about the machine you're using. On Tue, Nov 27, 2018 at 4:45 PM madana gopal wrote: > Hi Team, > > Please provide suggestions towards above crash. Will it be due to

Re: [v8-users] Crash in mksnapshot

2018-11-26 Thread Jakob Gruber
Try a debug build and run mksnapshot in gdb. You'll get a meaningful stack trace there. Have you tried updating to a more recent V8 version? On Mon, Nov 26, 2018 at 2:51 PM madana gopal wrote: > Hi Team, > > I am facing below crash when building V8 (version 6.9.351) for mipsel > platform. > > FA

Re: [v8-users] Access violation when constructing a new isolate: invalid builtins?

2018-09-03 Thread Jakob Gruber
Could you open a new bug at crbug.com/v8/new and include minimal repro? On Mon, Sep 3, 2018 at 6:13 PM, Dickson Tan wrote: > Hi, > > I'm getting errors when creating a new context, and it crashes with an > access violation here on api.cc: > > // Sanity-check that the isolate is initialized and

Re: [v8-users] Public API to check validity of a snapshot?

2018-08-28 Thread Jakob Gruber
On Thu, Aug 23, 2018 at 5:32 PM, Ian Ker-Seymer wrote: > Hey there! > > I am working on a project which embeds v8 and uses snapshots. We are > calling v8 from ruby, and would like to be able to check whether or not a > snapshot is valid (meaning it was created by a matching version of v8). > Curr

Re: [v8-users] Debugger acting as a client connecting to the server

2018-08-09 Thread &#x27;Jakob Gruber' via v8-users
+yang who can say more about node. We (Ben, Yang & myself) recently discussed the possibility of adding coverage support to node itself. See here for a (very rough and early stage) doc with some thou

Re: [v8-users] what is the relationship between natives_blob.bin and snapshot_blob.bin?

2018-07-17 Thread Jakob Gruber
_SNAPSHOT in the V8 source code to see what changes (spoiler: not much). It's mostly the build process <https://cs.chromium.org/chromium/src/BUILD.gn?rcl=1de71b638f99c15a3f97ec7b25b0c6dc920fbee0> that differs. > > 在 2018年7月17日星期二 UTC+8下午3:31:11,Jakob Gruber写道: >> >> natives_blob.bin

Re: [v8-users] How to off DCHECK?

2018-07-17 Thread Jakob Gruber
Edit the DCHECK macro definition: https://cs.chromium.org/chromium/src/v8/src/base/logging.h?l=63&rcl=f1b3e80faad6c84deabec8043bae524d1480293b On Tue, Jul 17, 2018 at 11:37 AM, wrote: > I am using d8 in debug mode. > I would like to disable the dcheck functions in this state. Do I have any > com

Re: [v8-users] what is the relationship between natives_blob.bin and snapshot_blob.bin?

2018-07-17 Thread Jakob Gruber
natives_blob.bin contains the minified source code of JS natives shipped with V8, while snapshot_blob.bin contains the startup and context snapshots. We are working on removing natives_blob.bin, hopefully this will happen sometime this year. Given "v8_use_snapshot=true v8_use_external_startup_data

Re: [v8-users] Re: Performance drop?

2018-07-17 Thread Jakob Gruber
Interesting, I'm not aware of anything specific that slows down Context::New. Could you perhaps narrow down the regression further & file a bug? The build flags below look fine to me. On Tue, Jul 17, 2018 at 1:14 AM, jzw wrote: > I narrowed down to context creation time. > when I measure the tim

Re: [v8-users] OOM in Heap::ReserveSpace

2018-07-07 Thread &#x27;Jakob Gruber' via v8-users
To(&free_space))" is false. >>> >>> I'm currently unable to reproduce this outside of our main codebase into >>> a standalone test file, but I'll file a bug if I manage to do so. >>> >>> On Wednesday, July 4, 2018 at 12:05:30 AM UTC-7, Ja

Re: [v8-users] OOM in Heap::ReserveSpace

2018-07-04 Thread Jakob Gruber
Could you check which 'perform_gc = true' case we reach? See https://cs.chromium.org/chromium/src/v8/src/heap/heap.cc?l=1614&rcl=fe51067f43e7208d06977d5036726360a4539d7b Then please open a bug at http://crbug.com/v8/new. On Wed, Jul 4, 2018 at 12:18 AM, Yvonne Chen wrote: > Hi, > > I'm in the

Re: [v8-users] Re: Building V8 on Windows with Visual Studio 2017

2018-07-04 Thread Jakob Gruber
See https://github.com/v8/v8/wiki/Using-Git. Since something seems messed up with your gclient install (which will fetch clang-cl.exe), try the steps in 'How to start' for a clean checkout. Hope that helps. On Tue, Jul 3, 2018 at 8:52 PM, Mike Moening wrote: > Oh and I've tried running: *gclient

Re: [v8-users] Find out the bytecode associated with given JIT code?

2018-06-18 Thread Jakob Gruber
Take a look at v8's gdbinit file for more convenience macros: https://cs.chromium.org/chromium/src/v8/tools/gdbinit On Tue, Jun 19, 2018 at 12:48 AM, Caitlin Potter wrote: > Print_Code will output information for any Code object (builtins, bytecode > handlers, JIT-ed code, even IC stubs AFAIU) —

Re: [v8-users] kKeep segfault

2018-06-18 Thread Jakob Gruber
Do you perhaps have a backtrace? Please open a bug at http://crbug.com/v8/new and assign it to me, I'll take a look. On Mon, Jun 18, 2018 at 3:15 PM, Ryan Dahl wrote: > Hi, > > I'm experiencing a segfault when using > SnapshotCreator::FunctionCodeHandling::kKeep. > I'm wondering if this is inte

Re: [v8-users] compile problem of v8_use_external_startup_data

2018-06-08 Thread Jakob Gruber
Look for occurrences of 'v8_use_external_startup_data' in BUILD.gn ( https://cs.chromium.org/chromium/src/v8/BUILD.gn?l=265&rcl=739f5abc518dbe94bf245ae60d3b95e377290123). My guess is that your error is related to the V8_USE_EXTERNAL_STARTUP_DATA define. You can also print the full compilation comm

Re: [v8-users] How to cache a compiled module?

2018-05-07 Thread Jakob Gruber
Not yet, but we're working on it. See: https://crbug.com/v8/7685 On Mon, May 7, 2018 at 2:54 PM, czczcheng wrote: > i want to cache a compiled module, and serialize it to disk , is there any > method? > > -- > -- > v8-users mailing list > v8-users@googlegroups.com > http://groups.google.com/grou

Re: [v8-users] Building in linux, either v8_libplatform and v8_libbase are all I get, or they're the only things that are missing!

2018-04-19 Thread &#x27;Jakob Gruber' via v8-users
Did you see https://github.com/v8/v8/wiki/Building-from-Source? To build all targets, just use: $ ninja -C out.gn/golib/ On Fri, Apr 20, 2018 at 7:25 AM, Andrew Walker wrote: > I am attempting to build v8 in a wheezy VM for a binding that links > against > >- libv8 >- v8_base >- v8_

Re: [v8-users] What is the memory layout of a code object in V8?

2018-04-19 Thread &#x27;Jakob Gruber' via v8-users
u 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. > Jakob Gruber Software Engin

Re: [v8-users] Re: Slower Performance than expected

2018-04-06 Thread &#x27;Jakob Gruber' via v8-users
If you do end up with a good repro for the performance difference between typed arrays and arrays, please post it at crbug.com/v8/new. On Fri, Apr 6, 2018 at 8:33 AM, wrote: > Are you able to hoist the memory allocations out of the library so the > caller can allocate the buffers it needs and re

Re: [v8-users] mksnapshot and warm_up

2018-03-01 Thread &#x27;Jakob Gruber' via v8-users
; > On Thursday, March 1, 2018 at 5:16:37 PM UTC+1, Jakob Gruber wrote: >> >> On Thu, Mar 1, 2018 at 4:43 PM, Johannes Rieken >> wrote: >> >>> >>> Hey, >>> >>> Can someone help me understand what the difference between a warm and >&

Re: [v8-users] mksnapshot and warm_up

2018-03-01 Thread &#x27;Jakob Gruber' via v8-users
On Thu, Mar 1, 2018 at 4:43 PM, Johannes Rieken wrote: > > Hey, > > Can someone help me understand what the difference between a warm and cold > snapshot is? I stumbled over `WarmUpSnapshotDataBlob` but I am not > entirely sure how to make use of them via the mksnapshot-tools and what the > seque

Re: [v8-users] Lazy deserialization

2018-02-20 Thread &#x27;Jakob Gruber' via v8-users
v8:heap:effective_size See e.g.: https://chromeperf.appspot.com/report?sid=5a61019415f14d0e08769209248a634be258c1a6b740fbe876911dd13b6d8731 The blog post shows the difference in this counter after sites with & without lazy deserialization. > > On Friday, 16 February 2018 03:49:24 UTC-

Re: [v8-users] Lazy deserialization

2018-02-16 Thread &#x27;Jakob Gruber' via v8-users
On Thu, Feb 15, 2018 at 9:28 PM, Chris Dumoulin wrote: > I'm interested in minimizing v8 memory usage, and I recently saw this blog > post on Lazy Deserialization: https://v8project.blogspot.ca/2018/02/ > lazy-deserialization.html > > I've built and run samples/hello-world.cc against static libra

Re: [v8-users] Advice for submitting a PR to fix Debug::ArchiveDebug and Debug::RestoreDebug?

2017-12-19 Thread &#x27;Jakob Gruber' via v8-users
On Mon, Dec 18, 2017 at 9:39 PM, Ben Noordhuis wrote: > On Mon, Dec 18, 2017 at 9:06 PM, Ben Newman wrote: > > Hi folks! This is my first time posting here, so please let me know if I > > should ask this question somewhere else instead. I'm asking here because > > https://github.com/v8/v8 does n

Re: [v8-users] Query regarding file size of snaphot_blob.bin

2017-12-19 Thread &#x27;Jakob Gruber' via v8-users
hot --print-builtin-size > > Thanks > > On Monday, December 18, 2017 at 12:54:34 PM UTC+5:30, Jakob Gruber wrote: >> >> On Mon, Dec 18, 2017 at 6:20 AM, wrote: >> >>> >* new functionality (both internal and new language additions); >>> >>

Re: [v8-users] Query regarding file size of snaphot_blob.bin

2017-12-17 Thread &#x27;Jakob Gruber' via v8-users
uage features, you could watch https://github.com/tc39/proposals to track TC39 proposal status. New V8 developments are sometimes called out on the V8 blog, but the only way to get a complete picture is to follow the git commit log. > > Thanks > > On Thursday, December 14, 2017 at 3:2

Re: [v8-users] Query regarding file size of snaphot_blob.bin

2017-12-14 Thread &#x27;Jakob Gruber' via v8-users
On Thu, Dec 14, 2017 at 10:39 AM, wrote: > On Thursday, December 14, 2017 at 2:44:15 PM UTC+5:30, Ben Noordhuis wrote: >> >> On Thu, Dec 14, 2017 at 7:22 AM, wrote: >> > 1) How is snapshot_blob.bin generated at compile time ? (If possible >> where >> > in chromium code ) >> >> Look for a file c

Re: [v8-users] Query regarding file size of snaphot_blob.bin

2017-12-14 Thread &#x27;Jakob Gruber' via v8-users
We've actually been working on reducing memory overhead around the snapshot, see the lazy builtins design doc at http://goo.gl/dxkYDZ. Note though that this is intended to reduce runtime memory use, not the size of the snapshot blob itself. I'd expect the snapshot blob to grow further in the future

[v8-users] PSA: Removing NativeWeakMap

2017-11-02 Thread Jakob Gruber
NativeWeakMap [0] was introduced back in 2015 for DevTools [1], but has remained unused since then (at least to our knowledge). If you rely on NativeWeakMap, please speak up now. Otherwise, if no objections are raised NativeWeakMap will be removed in the near future [2]. [0] https://cs.chromium.o

[v8-users] Re: [blink-dev] Intent to Ship: RegExp named captures

2017-10-18 Thread &#x27;Jakob Gruber' via v8-users
On Wed, Oct 18, 2017 at 4:51 PM, Daniel Bratell wrote: > On Wed, 18 Oct 2017 09:16:32 +0200, Jakob Gruber > wrote: > > Webkit has shipped this in Safari Tech Preview Release 40. > Firefox and Edge have not implemented this yet. > > > Is there any reason to think they wi

[v8-users] Intent to Ship: RegExp named captures

2017-10-18 Thread Jakob Gruber
Contact emails jgru...@chromium.org Spec https://github.com/tc39/proposal-regexp-named-groups Summary Named captures for ECMAScript regular expressions allow developers to create and refer to named capture groups. Interoperability and Compatibility risk This is a stage 3 feature. It adds support

Re: [v8-users] Re: V8 snapshots

2017-09-07 Thread &#x27;Jakob Gruber' via v8-users
problem? >>>>>>>>>>> >>>>>>>>>>> On Friday, September 1, 2017 at 8:57:51 AM UTC-7, Francisco >>>>>>>>>>> Moraes wrote: >>>>>>>>>>>> >>>>>>>>>>

Re: [v8-users] Inspector commonly crashes after TerminateExecution()?

2017-08-30 Thread &#x27;Jakob Gruber' via v8-users
age 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. > -- Jakob Gr

Re: [v8-users] How to compile V8 for X86_64 platform?

2017-07-04 Thread &#x27;Jakob Gruber' via v8-users
Hi Sameer, the V8 build process is documented at https://github.com/v8/v8/wiki/Building-with-GN. Cheers, Jakob On Wed, Jul 5, 2017 at 7:20 AM, Sameer wrote: > Hi, > > I am new to V8 world. > Could you please help how do I compile V8 for X86_64 platforms? > I am trying to debug some Java script

Re: [v8-users] Re: Significant JSON::Stringify, Uint8Array, or ArrayBuffer changes between v5.4 to v6.0.186

2017-06-27 Thread &#x27;Jakob Gruber' via v8-users
Interesting. It'd be very helpful if you could open a bug at crbug.com/v8/new with a full code example (including build instructions if it includes C++) and instructions to reproduce the issue. Feel free to assign it to me (jgru...@chromium.org) and I'll have a look. On Mon, Jun 26, 2017 at 6:44 P

Re: [v8-users] V8 debugging and multithreading

2017-05-16 Thread &#x27;Jakob Gruber' via v8-users
We removed support for preserving debugger state across thread switches because it was untested, probably buggy, and unused. As a workaround, you would need to store state (e.g. active breakpoints) yourself and reissue debugger commands after switching threads. On Tue, May 16, 2017 at 12:49 PM, P

[v8-users] Upcoming debugger API changes

2016-10-27 Thread Jakob Gruber
We are planning changes to V8's debugger API in the near- to midterm. In summary, the JSON API and direct access to the debugger context will be deprecated and eventually removed in favor of the V8 inspector protocol. Further details in the design document: https://docs.google.com/document/d/1M8