[v8-users] Get a break down of objects that were garbage collected.

2013-06-10 Thread dpapad
Is there a way to get stats about how many instances of a specific 
Javascript class are being garbage collected? --trace-gc does not provide 
that much details.

Specifically there is a specific Javascript class that is instantiated 
multiple times in my app. I want to verify that this could be the cause of 
the observed very frequent
garbage collection, before taking any action to reduce such allocations in 
the code.

Thank you,
Demetrios

-- 
-- 
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/groups/opt_out.




[v8-users] Profiling v8 inside chromium/content_shell

2013-06-10 Thread Adam Klein
I'm trying to profile the v8 execution of a web app using Chromium's
content_shell with some success. But I'm also getting some odd
results. I'm using a commandline like:

content_shell --no-sandbox --js-flags='--prof --noprof-lazy
--log-timer-events' http://localhost:8000/mypage

And then processing the v8.log with

v8/tools/linux-tick-processor v8.log

The resulting profile has some quirks: none of the JavaScript
portion of the profile lists more than 0.2% of the total ticks (even
though there's 500ms of JS execution time as part of the app, as
shown by both plot-timer-events and the Inspector's timeline). The C++
stack, meanwhile, has several major points of interest. Most of the
big ones are Blink C++ callbacks (e.g.,
NodeV8Internal::dispatchEventMethodCallback), and __pthread_cond_wait
shows up. But the top one is __write, usually taking 30% of the
ticks.

If I go down to the call stacks, I get a bunch of LazyCompile
someMethod entries which terminate at __write, so it seems I'm still
getting some idea of which JS is taking the time, but I'm rather
surprised that __write is the endpoint (it's mostly DOM tree
walking/manipulation). Is this expected?

Also, I'm a bit surprised at the way the v8 DOM callbacks end up in
the profile: those methods are usually trivial, with the real work
being somewhere deep in the core of Blink. Is it expected that only
the v8 entry point into Blink shows up when using the profiling tool?

Any insights would be valuable.

Thanks,
Adam

-- 
-- 
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/groups/opt_out.