New issue
Advanced search Search tips

Issue 850038 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Aug 9
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Feature



Sign in to add a comment

Expose Streaming Parsing in V8 --log-function-events

Project Member Reported by cbruni@chromium.org, Jun 6 2018

Issue description

Make sure the parse-processor can properly estimate the time spent per function/script during streaming parsing.
 
Labels: -Type-Bug Type-Feature
Project Member

Comment 2 by bugdroid1@chromium.org, Jun 6 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/b8f9b047410019887457d57adad7eb4097eb8f7d

commit b8f9b047410019887457d57adad7eb4097eb8f7d
Author: Camillo Bruni <cbruni@chromium.org>
Date: Wed Jun 06 11:42:51 2018

[log] Fix function event logging

Drive-by-fix:
 - improve log parsing by not wrapping single lines in arrays

Change-Id: Ic4c5fdeb7875c8c5db57843f583e93285026ff74
BUG: chromium:757467,  chromium:850038 
Reviewed-on: https://chromium-review.googlesource.com/1078753
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53547}
[modify] https://crrev.com/b8f9b047410019887457d57adad7eb4097eb8f7d/tools/logreader.js
[modify] https://crrev.com/b8f9b047410019887457d57adad7eb4097eb8f7d/tools/parse-processor.html
[modify] https://crrev.com/b8f9b047410019887457d57adad7eb4097eb8f7d/tools/parse-processor.js

Cc: gsat...@chromium.org
Project Member

Comment 4 by bugdroid1@chromium.org, Jun 20 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/a76ce4f8994335c2036ae1e11ee9b85f1ca34466

commit a76ce4f8994335c2036ae1e11ee9b85f1ca34466
Author: Camillo Bruni <cbruni@chromium.org>
Date: Wed Jun 20 13:40:22 2018

[log] Improve log parsing

- Add parseString and parseVarArgs helper constants
- Fix number formatting in parser-processor.js
- Rename time to duration in parse-processor
- Fix eval handling in parse-processor

Bug: chromium:757467,  chromium:850038 

Change-Id: Ibce57b46d22e03ddaa5baa22f45d8df4c93af2cd
Reviewed-on: https://chromium-review.googlesource.com/1102435
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53887}
[modify] https://crrev.com/a76ce4f8994335c2036ae1e11ee9b85f1ca34466/test/cctest/log-eq-of-logging-and-traversal.js
[modify] https://crrev.com/a76ce4f8994335c2036ae1e11ee9b85f1ca34466/tools/dumpcpp.js
[modify] https://crrev.com/a76ce4f8994335c2036ae1e11ee9b85f1ca34466/tools/ic-processor.js
[modify] https://crrev.com/a76ce4f8994335c2036ae1e11ee9b85f1ca34466/tools/logreader.js
[modify] https://crrev.com/a76ce4f8994335c2036ae1e11ee9b85f1ca34466/tools/map-processor.js
[modify] https://crrev.com/a76ce4f8994335c2036ae1e11ee9b85f1ca34466/tools/parse-processor.js
[modify] https://crrev.com/a76ce4f8994335c2036ae1e11ee9b85f1ca34466/tools/profviz/composer.js
[modify] https://crrev.com/a76ce4f8994335c2036ae1e11ee9b85f1ca34466/tools/tickprocessor.js

Project Member

Comment 5 by bugdroid1@chromium.org, Jun 22 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/aafd5c52ab98608e37284a5a944a4c63045625b9

commit aafd5c52ab98608e37284a5a944a4c63045625b9
Author: Camillo Bruni <cbruni@chromium.org>
Date: Fri Jun 22 16:05:30 2018

[parser][log] Log script id during background compilation

- Add separate script-create, script-reserve-id and script-details log events
- Add log events for CompilationCache hits and puts
- Simplify function event logging by only pass along the script id
- Explicitly create Scripts in parse-processor.js on script events only
- Create a temporary script id in the ParseInfo for use during background
  parsing and compilation
- Clean up ParseInfo initialization to centralize creation and use of
  script ids
- Allow creating Scripts with predefined script ids

Bug: chromium:757467,  chromium:850038 
Change-Id: I02dfd1d5725795b9fe0ea94ef57b287b934a1efe
Reviewed-on: https://chromium-review.googlesource.com/1097131
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53978}
[modify] https://crrev.com/aafd5c52ab98608e37284a5a944a4c63045625b9/src/compilation-cache.cc
[modify] https://crrev.com/aafd5c52ab98608e37284a5a944a4c63045625b9/src/compilation-cache.h
[modify] https://crrev.com/aafd5c52ab98608e37284a5a944a4c63045625b9/src/compiler-dispatcher/unoptimized-compile-job.cc
[modify] https://crrev.com/aafd5c52ab98608e37284a5a944a4c63045625b9/src/compiler.cc
[modify] https://crrev.com/aafd5c52ab98608e37284a5a944a4c63045625b9/src/heap/factory.cc
[modify] https://crrev.com/aafd5c52ab98608e37284a5a944a4c63045625b9/src/heap/factory.h
[modify] https://crrev.com/aafd5c52ab98608e37284a5a944a4c63045625b9/src/log.cc
[modify] https://crrev.com/aafd5c52ab98608e37284a5a944a4c63045625b9/src/log.h
[modify] https://crrev.com/aafd5c52ab98608e37284a5a944a4c63045625b9/src/parsing/parse-info.cc
[modify] https://crrev.com/aafd5c52ab98608e37284a5a944a4c63045625b9/src/parsing/parse-info.h
[modify] https://crrev.com/aafd5c52ab98608e37284a5a944a4c63045625b9/src/parsing/parser-base.h
[modify] https://crrev.com/aafd5c52ab98608e37284a5a944a4c63045625b9/src/parsing/parser.cc
[modify] https://crrev.com/aafd5c52ab98608e37284a5a944a4c63045625b9/src/parsing/preparser.cc
[modify] https://crrev.com/aafd5c52ab98608e37284a5a944a4c63045625b9/src/runtime/runtime-compiler.cc
[modify] https://crrev.com/aafd5c52ab98608e37284a5a944a4c63045625b9/test/cctest/test-log.cc
[modify] https://crrev.com/aafd5c52ab98608e37284a5a944a4c63045625b9/tools/parse-processor.html
[modify] https://crrev.com/aafd5c52ab98608e37284a5a944a4c63045625b9/tools/parse-processor.js

Project Member

Comment 6 by bugdroid1@chromium.org, Jun 22 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/a800e05007d42c84cd5627e5dfb305dfb9912844

commit a800e05007d42c84cd5627e5dfb305dfb9912844
Author: Yang Guo <yangguo@chromium.org>
Date: Fri Jun 22 19:46:30 2018

Revert "[parser][log] Log script id during background compilation"

This reverts commit aafd5c52ab98608e37284a5a944a4c63045625b9.

Reason for revert: Tentative revert for

https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Win64/24825
https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Win64%20-%20msvc/3242

Original change's description:
> [parser][log] Log script id during background compilation
> 
> - Add separate script-create, script-reserve-id and script-details log events
> - Add log events for CompilationCache hits and puts
> - Simplify function event logging by only pass along the script id
> - Explicitly create Scripts in parse-processor.js on script events only
> - Create a temporary script id in the ParseInfo for use during background
>   parsing and compilation
> - Clean up ParseInfo initialization to centralize creation and use of
>   script ids
> - Allow creating Scripts with predefined script ids
> 
> Bug: chromium:757467,  chromium:850038 
> Change-Id: I02dfd1d5725795b9fe0ea94ef57b287b934a1efe
> Reviewed-on: https://chromium-review.googlesource.com/1097131
> Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
> Reviewed-by: Leszek Swirski <leszeks@chromium.org>
> Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> Commit-Queue: Camillo Bruni <cbruni@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#53978}

TBR=ulan@chromium.org,cbruni@chromium.org,gsathya@chromium.org,leszeks@chromium.org

Change-Id: I629f72f51d5e086e2b54658c1fdd18cec268aab2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:757467,  chromium:850038 
Reviewed-on: https://chromium-review.googlesource.com/1112538
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53984}
[modify] https://crrev.com/a800e05007d42c84cd5627e5dfb305dfb9912844/src/compilation-cache.cc
[modify] https://crrev.com/a800e05007d42c84cd5627e5dfb305dfb9912844/src/compilation-cache.h
[modify] https://crrev.com/a800e05007d42c84cd5627e5dfb305dfb9912844/src/compiler-dispatcher/unoptimized-compile-job.cc
[modify] https://crrev.com/a800e05007d42c84cd5627e5dfb305dfb9912844/src/compiler.cc
[modify] https://crrev.com/a800e05007d42c84cd5627e5dfb305dfb9912844/src/heap/factory.cc
[modify] https://crrev.com/a800e05007d42c84cd5627e5dfb305dfb9912844/src/heap/factory.h
[modify] https://crrev.com/a800e05007d42c84cd5627e5dfb305dfb9912844/src/log.cc
[modify] https://crrev.com/a800e05007d42c84cd5627e5dfb305dfb9912844/src/log.h
[modify] https://crrev.com/a800e05007d42c84cd5627e5dfb305dfb9912844/src/parsing/parse-info.cc
[modify] https://crrev.com/a800e05007d42c84cd5627e5dfb305dfb9912844/src/parsing/parse-info.h
[modify] https://crrev.com/a800e05007d42c84cd5627e5dfb305dfb9912844/src/parsing/parser-base.h
[modify] https://crrev.com/a800e05007d42c84cd5627e5dfb305dfb9912844/src/parsing/parser.cc
[modify] https://crrev.com/a800e05007d42c84cd5627e5dfb305dfb9912844/src/parsing/preparser.cc
[modify] https://crrev.com/a800e05007d42c84cd5627e5dfb305dfb9912844/src/runtime/runtime-compiler.cc
[modify] https://crrev.com/a800e05007d42c84cd5627e5dfb305dfb9912844/test/cctest/test-log.cc
[modify] https://crrev.com/a800e05007d42c84cd5627e5dfb305dfb9912844/tools/parse-processor.html
[modify] https://crrev.com/a800e05007d42c84cd5627e5dfb305dfb9912844/tools/parse-processor.js

Project Member

Comment 7 by bugdroid1@chromium.org, Jun 25 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/e7f5c5ccc0a7e6b187fcc5b926546d38fe38684f

commit e7f5c5ccc0a7e6b187fcc5b926546d38fe38684f
Author: Camillo Bruni <cbruni@chromium.org>
Date: Mon Jun 25 10:46:34 2018

Reland "[parser][log] Log script id during background compilation"

This reverts commit a800e05007d42c84cd5627e5dfb305dfb9912844.

Original change's description:
> Revert "[parser][log] Log script id during background compilation"
>
> This reverts commit aafd5c52ab98608e37284a5a944a4c63045625b9.
>
> Reason for revert: Tentative revert for
>
> https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Win64/24825
> https://ci.chromium.org/p/v8/builders/luci.v8.ci/V8%20Win64%20-%20msvc/3242
>
> Original change's description:
> > [parser][log] Log script id during background compilation
> >
> > - Add separate script-create, script-reserve-id and script-details log events
> > - Add log events for CompilationCache hits and puts
> > - Simplify function event logging by only pass along the script id
> > - Explicitly create Scripts in parse-processor.js on script events only
> > - Create a temporary script id in the ParseInfo for use during background
> >   parsing and compilation
> > - Clean up ParseInfo initialization to centralize creation and use of
> >   script ids
> > - Allow creating Scripts with predefined script ids
> >
> > Bug: chromium:757467,  chromium:850038 
> > Change-Id: I02dfd1d5725795b9fe0ea94ef57b287b934a1efe
> > Reviewed-on: https://chromium-review.googlesource.com/1097131
> > Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
> > Reviewed-by: Leszek Swirski <leszeks@chromium.org>
> > Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
> > Commit-Queue: Camillo Bruni <cbruni@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#53978}
>
> TBR=ulan@chromium.org,cbruni@chromium.org,gsathya@chromium.org,leszeks@chromium.org
>
> Change-Id: I629f72f51d5e086e2b54658c1fdd18cec268aab2
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: chromium:757467,  chromium:850038 
> Reviewed-on: https://chromium-review.googlesource.com/1112538
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Commit-Queue: Yang Guo <yangguo@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#53984}

TBR=ulan@chromium.org,yangguo@chromium.org,cbruni@chromium.org,gsathya@chromium.org,leszeks@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: chromium:757467,  chromium:850038 
Change-Id: I3088c86362c06ee50464f1f14e25350b1b8048ad
Reviewed-on: https://chromium-review.googlesource.com/1112539
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53994}
[modify] https://crrev.com/e7f5c5ccc0a7e6b187fcc5b926546d38fe38684f/src/compilation-cache.cc
[modify] https://crrev.com/e7f5c5ccc0a7e6b187fcc5b926546d38fe38684f/src/compilation-cache.h
[modify] https://crrev.com/e7f5c5ccc0a7e6b187fcc5b926546d38fe38684f/src/compiler-dispatcher/unoptimized-compile-job.cc
[modify] https://crrev.com/e7f5c5ccc0a7e6b187fcc5b926546d38fe38684f/src/compiler.cc
[modify] https://crrev.com/e7f5c5ccc0a7e6b187fcc5b926546d38fe38684f/src/heap/factory.cc
[modify] https://crrev.com/e7f5c5ccc0a7e6b187fcc5b926546d38fe38684f/src/heap/factory.h
[modify] https://crrev.com/e7f5c5ccc0a7e6b187fcc5b926546d38fe38684f/src/log.cc
[modify] https://crrev.com/e7f5c5ccc0a7e6b187fcc5b926546d38fe38684f/src/log.h
[modify] https://crrev.com/e7f5c5ccc0a7e6b187fcc5b926546d38fe38684f/src/parsing/parse-info.cc
[modify] https://crrev.com/e7f5c5ccc0a7e6b187fcc5b926546d38fe38684f/src/parsing/parse-info.h
[modify] https://crrev.com/e7f5c5ccc0a7e6b187fcc5b926546d38fe38684f/src/parsing/parser-base.h
[modify] https://crrev.com/e7f5c5ccc0a7e6b187fcc5b926546d38fe38684f/src/parsing/parser.cc
[modify] https://crrev.com/e7f5c5ccc0a7e6b187fcc5b926546d38fe38684f/src/parsing/preparser.cc
[modify] https://crrev.com/e7f5c5ccc0a7e6b187fcc5b926546d38fe38684f/src/runtime/runtime-compiler.cc
[modify] https://crrev.com/e7f5c5ccc0a7e6b187fcc5b926546d38fe38684f/test/cctest/test-log.cc
[modify] https://crrev.com/e7f5c5ccc0a7e6b187fcc5b926546d38fe38684f/tools/parse-processor.html
[modify] https://crrev.com/e7f5c5ccc0a7e6b187fcc5b926546d38fe38684f/tools/parse-processor.js

Project Member

Comment 8 by bugdroid1@chromium.org, Jun 27 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/fc59b4e4e01005ca26fd770190e5c99a05d4fdad

commit fc59b4e4e01005ca26fd770190e5c99a05d4fdad
Author: Camillo Bruni <cbruni@chromium.org>
Date: Wed Jun 27 15:32:37 2018

[log][tools] Fix logging on deserialized scripts

- Introduce ScriptEventType enum
- Emit log event when deserializing scripts
- Better handle deserialized and eval scripts when calculating the byte size

Bug: chromium:757467,  chromium:850038 
Change-Id: I082161d8d1d4238a90d3607ca8b6b4e60f2f903e
Reviewed-on: https://chromium-review.googlesource.com/1114845
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54061}
[modify] https://crrev.com/fc59b4e4e01005ca26fd770190e5c99a05d4fdad/src/compiler.cc
[modify] https://crrev.com/fc59b4e4e01005ca26fd770190e5c99a05d4fdad/src/heap/factory.cc
[modify] https://crrev.com/fc59b4e4e01005ca26fd770190e5c99a05d4fdad/src/log.cc
[modify] https://crrev.com/fc59b4e4e01005ca26fd770190e5c99a05d4fdad/src/log.h
[modify] https://crrev.com/fc59b4e4e01005ca26fd770190e5c99a05d4fdad/src/parsing/parse-info.cc
[modify] https://crrev.com/fc59b4e4e01005ca26fd770190e5c99a05d4fdad/src/snapshot/deserializer.cc
[modify] https://crrev.com/fc59b4e4e01005ca26fd770190e5c99a05d4fdad/src/snapshot/object-deserializer.cc
[modify] https://crrev.com/fc59b4e4e01005ca26fd770190e5c99a05d4fdad/tools/parse-processor
[modify] https://crrev.com/fc59b4e4e01005ca26fd770190e5c99a05d4fdad/tools/parse-processor.js

Project Member

Comment 9 by bugdroid1@chromium.org, Jul 3

The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/a8582eb2f11076492309df0db57e651bfbeebca5

commit a8582eb2f11076492309df0db57e651bfbeebca5
Author: Camillo Bruni <cbruni@chromium.org>
Date: Tue Jul 03 09:12:44 2018

[tools] parse-processor improvements

- display script size overview
- color scripts in overview depending on eval, streaming or other scripts
- fix stats to always take own-bytes into accout
- rename all *Time properties to *Duration for consistency
- extract ScriptSource log event into separate method
- support script source events in parse-processor

Bug: chromium:757467,  chromium:850038 
Change-Id: I227d1d5952ae9e508ab1a01146fcf47f74a3f7ea
Reviewed-on: https://chromium-review.googlesource.com/1117195
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54159}
[modify] https://crrev.com/a8582eb2f11076492309df0db57e651bfbeebca5/src/log.cc
[modify] https://crrev.com/a8582eb2f11076492309df0db57e651bfbeebca5/src/log.h
[modify] https://crrev.com/a8582eb2f11076492309df0db57e651bfbeebca5/tools/parse-processor.html
[modify] https://crrev.com/a8582eb2f11076492309df0db57e651bfbeebca5/tools/parse-processor.js
[modify] https://crrev.com/a8582eb2f11076492309df0db57e651bfbeebca5/tools/tickprocessor.js

Project Member

Comment 10 by bugdroid1@chromium.org, Jul 16

The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/e3b4ffa9ba3bd602ac1ef158d6466ed55be8d182

commit e3b4ffa9ba3bd602ac1ef158d6466ed55be8d182
Author: Camillo Bruni <cbruni@chromium.org>
Date: Mon Jul 16 14:05:14 2018

[tools] Improve function event logging and parse processor

- Log script sources with --log-function-events
- Don't show confusing duration in graphs
- Introduce separate compilation category
- Log script details after deserialization
- Log parse times for eval scripts
- Display deserialized scripts and functions

Change-Id: I58f3bf8efe3955632322f958716c36ad38761fd0
Bug: chromium:757467,  chromium:850038 
Reviewed-on: https://chromium-review.googlesource.com/1128082
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54465}
[modify] https://crrev.com/e3b4ffa9ba3bd602ac1ef158d6466ed55be8d182/src/compiler.cc
[modify] https://crrev.com/e3b4ffa9ba3bd602ac1ef158d6466ed55be8d182/src/log.cc
[modify] https://crrev.com/e3b4ffa9ba3bd602ac1ef158d6466ed55be8d182/src/log.h
[modify] https://crrev.com/e3b4ffa9ba3bd602ac1ef158d6466ed55be8d182/src/snapshot/code-serializer.cc
[modify] https://crrev.com/e3b4ffa9ba3bd602ac1ef158d6466ed55be8d182/src/snapshot/deserializer.cc
[modify] https://crrev.com/e3b4ffa9ba3bd602ac1ef158d6466ed55be8d182/src/snapshot/object-deserializer.cc
[modify] https://crrev.com/e3b4ffa9ba3bd602ac1ef158d6466ed55be8d182/tools/parse-processor.html
[modify] https://crrev.com/e3b4ffa9ba3bd602ac1ef158d6466ed55be8d182/tools/parse-processor.js

Status: Fixed (was: Assigned)
We have almost everyithing working here, script streaming has been fixed as well.

Sign in to add a comment