[v8-users] V8 Inspector Sources with embedded script?

2019-05-16 Thread Zoltan B
Hi!

I'm trying V8 out in a small test environment, where I have a custom html, 
with embedded JS scripts. I'm connecting to the Dev Tools trough Websocket, 
and its working well except for the Script debugger panel.

I'm creating the ScriptOrigin like this:

v8::ScriptOrigin{ fileNameValue, lineNumValue, colNumValue }

fileNameValue can be the same for multiple scripts, as there are many 
embedded scripts in a file.

The DevTools only shows one entry for each fileNameValue I submit, but it 
only displays the content of the last submitted script.

Is there a way to provide the full html, along with the embedded scripts, 
and map the scripts with the lineNum and colNum values?

-- 
-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/v8-users/ab5146b6-6015-43e0-a977-8c8b6e8e2aad%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] gc and threading

2019-05-16 Thread 'Peter Marshall' via v8-users
On Wednesday, May 15, 2019 at 9:09:18 PM UTC+2, Ledion Bitincka wrote:
>
> Thanks! 
>
> > While I understand that this is tempting, please be aware that only one 
> thread may be active in one Isolate at any given time.
> I was hoping that there could be multiple threads that had "read-only" 
> access to an Isolate's heap - I was looking through how ValueSerializer works 
> and now I understand there's no such thing as "read-only" given the 
> getter/setter functions. However, wondering if this would be possible for 
> simple objects (key/value) and bail for more complex ones. Any other 
> suggestions for how that work can be parallelized, is it even possible? 
> (this is custom serialization, not JSON)
>
>>
>> You could read from the heap on a concurrent thread but there is no 
synchronization when writing to the heap from the main thread, so there's 
no guarantee that what you are reading is not being concurrently written 
e.g. when it is being allocated, when it is modified by user JS code or 
when the GC moves it.

If the serialization work itself was particularly expensive (e.g. the 
format is very complicated or the data requires a lot of processing) then 
you could copy the relevant parts of the heap objects off-heap and then 
serialize from concurrent threads.

-- 
-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/v8-users/910c73d5-4071-4ddf-8e63-6e896a777c46%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[v8-users] Re: Building embeddable version of V8 as static library with minimal binary size

2019-05-16 Thread Yongfeng liu
needs to minimize static library size too, any guidelines?

On Sunday, March 18, 2018 at 8:07:13 PM UTC+8, Yukkuri Shiteimasu wrote:
>
> Hi, I am trying to incorporate ES6 JavaScript engine into my small 
> single-binary GUI application for scripting purposes and have chosen V8 as 
> such implementation, but having hard time building minimal static library.
>
> My flags I used in hope of creating small binary are:
>
> --->3---
> is_debug = false
> target_cpu = "x64"
> is_component_build = false
> strip_debug_info = true
> symbol_level = 0
> v8_static_library = true
> v8_enable_i18n_support = false
> v8_use_snapshot = false
> v8_enable_disassembler = false
> v8_enable_gdbjit = false
> v8_enable_handle_zapping = false
> v8_no_inline = true
> v8_monolithic = true
> v8_experimental_extra_library_files = []
> v8_extra_library_files = []
> v8_enable_concurrent_marking = true
> v8_enable_embedded_builtins = false
> is_desktop_linux = false
> icu_use_data_file = false
> enable_iterator_debugging = false
> enable_precompiled_headers = false
> clang_use_chrome_plugins = false
> asan_globals = false
> libcpp_is_static = true
> use_aura = false
> use_dbus = false
> use_gio = false
> use_glib = false
> use_icf = false
> use_udev = false
> --->3---
>
> Also tried adding -Os to CFLAGS.
>
> But resulting out.gn/x64.release/obj/libv8_base.a is about 25Mb in size 
> even after the stripping, which is hardly can be embedded into small 
> application (being ~25 times the application size itself).
>
> As I read earlier in this group, some had achieved results of about 
> ~2.5Mb[1], which is almost acceptable for my purposes, and so I wonder, 
> what could I tune (drop, disable, exclude or otherwise, while maintaining 
> core ES6 functionality) in order to get small static binary?
>
> [1] https://groups.google.com/forum/#!topic/v8-users/OaC4TQQjxFg
>

-- 
-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/v8-users/8c0bf4d6-8d3e-4d4a-b467-208ce139766b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.