problem about v8 flag

55 views
Skip to first unread message

Liu Xiao

unread,
Aug 21, 2014, 9:18:36 PM8/21/14
to v8-u...@googlegroups.com
Hello,everyone.

Now I have some problems about V8 flags. For example:

track_heap_object_fields  -  "track fields with heap values"

It is a flag enabled by default, and marked for tracking heap values.

But when I run chrome no output about it, Even if run it with:
./chrome --no-sandbox --track fields with heap values

Should it be used together with other flags to make an effect ?
How can I use it to get useful information?

Please help me,thank you very much.

Michael Starzinger

unread,
Aug 25, 2014, 4:26:48 AM8/25/14
to v8-u...@googlegroups.com
You can use --js-flags to pass flags through Chrome to V8. See http://www.chromium.org/developers/how-tos/run-chromium-with-flags for details.

Best regards,
Michael


--
--
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.

Liu Xiao

unread,
Aug 26, 2014, 9:14:49 PM8/26/14
to v8-u...@googlegroups.com
Thank you.

In fact  I try it like this.
./chrome --no-sandbox --js-flags=“--track_heap_object_fields

But no info printed.


You received this message because you are subscribed to a topic in the Google Groups "v8-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/v8-users/O2NQ119hdLE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to v8-users+u...@googlegroups.com.

Toon Verwaest

unread,
Aug 27, 2014, 4:16:31 AM8/27/14
to v8-u...@googlegroups.com

I'm not exactly sure what you are expecting to happen. That flag is enabled by default and causes V8 to learn more about how objects are used for optimization purposes. It is not a flag enabling user visible tracing.

Liu Xiao

unread,
Aug 27, 2014, 5:01:21 AM8/27/14
to v8-u...@googlegroups.com
Thank you very much.

Now I am working on memory about V8, so I want find anything that can help me to view memory.

I have tried almost all flags about v8 heap, but some of them same no effect, or maybe I don't their real effects and How to use them.

 Yes, track_heap_object_fields is used by default, at first I saw the comment "track fields with heap values", 
so I think it may track and output useful heap info for me, but there is nothing. 
As you say I kown that it is not the case.

So, could you tell me how can I make best use of the flags about heap?

Thank you!

Kang-Hao(Kenny)Lu(平寿)

unread,
Aug 27, 2014, 2:39:00 PM8/27/14
to Liu Xiao, V8 Users
(2014/08/27 17:01), Liu Xiao wrote:
> So, could you tell me how can I make best use of the flags about heap?

It depends. If you only care about the amount of memory used then
--trace-gc suffices (and there are other GC tracing flags that I am not
familiar with). If you want to get a heap dump then you can add
Page::Print() in a debug build somewhere but unfortunately there is no
flag for it.

Actually Web Inspector's heap dump is pretty useful if you haven't tried it.

Liu Xiao

unread,
Aug 27, 2014, 9:23:50 PM8/27/14
to v8-u...@googlegroups.com
Thank you very much.

Now I am working on memory about V8, so I want find anything that can help me to view memory.

I have tried almost all flags about v8 heap, but some of them same no effect, or maybe I don't their real effects and How to use them.

 Yes, track_heap_object_fields is used by default, at first I saw the comment "track fields with heap values", 
so I think it may track and output useful heap info for me, but there is nothing. 
As you say I kown that it is not the case.

So, could you tell me how can I make best use of the flags about heap?

Thank you!

Liu Xiao

unread,
Aug 27, 2014, 9:32:05 PM8/27/14
to v8-u...@googlegroups.com, liuxia...@gmail.com
> Page::Print() in a debug build somewhere
As the class comment "A page is a memory chunk of a size 1MB. Large object pages may be larger."
It is a detail info for a single page.
However, I want a heap profile on the whole, and something about the memory leak.
Could you give me some advice?

Actually Web Inspector's heap dump is pretty useful if you haven't tried it. 
Did you mean the Memory Timeline & Heap Profiler in DevTools? I have tried it, very powerful tool.
Reply all
Reply to author
Forward
0 new messages