How figure out v8 execute Javascript (real-world pages) in detail, i.e. when interpret? when compile?

32 views
Skip to first unread message

michael lee

unread,
Sep 4, 2017, 8:52:15 AM9/4/17
to v8-users
Hi guys,


I want to find out the JavaScript execution details by V8.  Anyone knows how to  figure out  v8 execute Javascript (real-world pages) in detail, i.e. when interprets? when compiles?


For example, running a Telemetry benchmark with tracing:

 $ tools/perf/run_benchmark --browser=android-chromium smoothness.top_25_smooth --story-filter=yahoo --output-format html --output-format json 

then 4 html trace files and 1 json file are generated: 
 http___answers_yahoo_com22017-09-01_15-36-05.html 
























This trace file provides the overall JavaScript execution information, but not the details.
TitleTab.ExecuteJavaScript
User Friendly Categoryother
Start7,861.667 ms
Wall Duration466.510 ms
Self Time0.166 ms

How can I get the information of JavaScript execution details? Do you have any advice for this?

Thanks in advance!


Best Regards,
Michael

Camillo Bruni

unread,
Sep 4, 2017, 11:55:07 AM9/4/17
to v8-users
Hi Micheal,

You have to enable additional tracing categories to get the detailed RuntimeCallStats, see this slidedeck for detailed instructions: https://docs.google.com/presentation/d/1Lq2DD28CGa7bxawVH_2OcmyiTiBn74dvC6vn2essroY/edit?usp=sharing

As for the telemetry tests, I think you'd have to manually go and change the benchmark to add the additional tracing categories.

We currently don't distinguish when optimizing/interpreted code is run, essentially this is all grouped under "JavaScript".

I hope this helps.

Cheers,
Camillo

michael lee

unread,
Sep 15, 2017, 1:48:16 PM9/15/17
to v8-users
Hi Camillo,

Thanks for your reply! Now it works. As you said, add the "v8" into the categories in the measurement file in perf/measurement/.

Best Regards,
Michael 
Reply all
Reply to author
Forward
0 new messages