New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 758183 link

Starred by 3 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug

Blocked on:
issue 794911

Blocking:
issue 694255



Sign in to add a comment

Add V8 metric for tracking time spent in background task.

Project Member Reported by u...@chromium.org, Aug 23 2017

Issue description

V8 uses background tasks in the garbage collector and the compiler.

Currently time spent in background tasks is not accounted and is not tracked in telemetry performance benchmarks.

A metric that tracks time in background tasks would help us see the performance trade-offs and the overhead of concurrency.



 

Comment 1 by u...@chromium.org, Aug 23 2017

Blocking: 694255
Ned, Ethan, do you know if there is an existing metric that tracks time in background threads?


Cc: charliea@chromium.org tdres...@chromium.org
Also adding tdresser, but he and Ned are both out this week. charliea, do you know?

Comment 3 by u...@chromium.org, Aug 23 2017

Cc: rmcilroy@chromium.org marja@chromium.org
Thank you, Annie.

Ross, Marja, this is fyi since you are working (or worked) on concurrent compilation and parsing.
We track time spend in background parsing explicitly in runtime call stats AFAIK (e.g.: https://chromeperf.appspot.com/report?sid=8c5aeccb87c577368d054c7ddda2ff2ee95ae3b512f9eda632367f5e38f2e4bb)

Would a similar approach work for GC?

Comment 5 by u...@chromium.org, Aug 23 2017

Thanks, Ross!

Looks like each background parsing task maintains its own local RCS table, which is then joined to the main thread RCS table?

https://cs.chromium.org/chromium/src/v8/src/parsing/parse-info.cc?rcl=20961d2635086f3c5bee27f2c72ccf0975003d96&l=159

I think that would work for GC too.

I am wondering if we can avoid manual management of local RCS tables by directly emitting trace-events from the background tasks and then aggregating those events in the metric.

Project Member

Comment 6 by bugdroid1@chromium.org, Nov 30 2017

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

commit cf7fa2eb087926f5293baea7aa1235d9365cf2b0
Author: Ulan Degenbaev <ulan@chromium.org>
Date: Thu Nov 30 11:32:53 2017

[runtime] Refactor RuntimeCallStats counters to use enums.

Currently RuntimeCallStats stores CounterIds as inner pointers.
This patch replaces them with enums and removes static table.

Bug: chromium:758183
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_chromium_rel_ng
Change-Id: Icb4030fc3ad3dd02e9c2648ce7c43b6f2d47fa9d
Reviewed-on: https://chromium-review.googlesource.com/796477
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49743}
[modify] https://crrev.com/cf7fa2eb087926f5293baea7aa1235d9365cf2b0/src/accessors.cc
[modify] https://crrev.com/cf7fa2eb087926f5293baea7aa1235d9365cf2b0/src/api-arguments-inl.h
[modify] https://crrev.com/cf7fa2eb087926f5293baea7aa1235d9365cf2b0/src/api-arguments.cc
[modify] https://crrev.com/cf7fa2eb087926f5293baea7aa1235d9365cf2b0/src/api.cc
[modify] https://crrev.com/cf7fa2eb087926f5293baea7aa1235d9365cf2b0/src/arguments.h
[modify] https://crrev.com/cf7fa2eb087926f5293baea7aa1235d9365cf2b0/src/ast/scopes.cc
[modify] https://crrev.com/cf7fa2eb087926f5293baea7aa1235d9365cf2b0/src/builtins/builtins-utils.h
[modify] https://crrev.com/cf7fa2eb087926f5293baea7aa1235d9365cf2b0/src/compiler-dispatcher/compiler-dispatcher.cc
[modify] https://crrev.com/cf7fa2eb087926f5293baea7aa1235d9365cf2b0/src/compiler.cc
[modify] https://crrev.com/cf7fa2eb087926f5293baea7aa1235d9365cf2b0/src/counters-inl.h
[modify] https://crrev.com/cf7fa2eb087926f5293baea7aa1235d9365cf2b0/src/counters.cc
[modify] https://crrev.com/cf7fa2eb087926f5293baea7aa1235d9365cf2b0/src/counters.h
[modify] https://crrev.com/cf7fa2eb087926f5293baea7aa1235d9365cf2b0/src/deoptimizer.cc
[modify] https://crrev.com/cf7fa2eb087926f5293baea7aa1235d9365cf2b0/src/execution.cc
[modify] https://crrev.com/cf7fa2eb087926f5293baea7aa1235d9365cf2b0/src/heap/gc-tracer.cc
[modify] https://crrev.com/cf7fa2eb087926f5293baea7aa1235d9365cf2b0/src/heap/gc-tracer.h
[modify] https://crrev.com/cf7fa2eb087926f5293baea7aa1235d9365cf2b0/src/heap/heap.cc
[modify] https://crrev.com/cf7fa2eb087926f5293baea7aa1235d9365cf2b0/src/heap/incremental-marking.cc
[modify] https://crrev.com/cf7fa2eb087926f5293baea7aa1235d9365cf2b0/src/heap/spaces.cc
[modify] https://crrev.com/cf7fa2eb087926f5293baea7aa1235d9365cf2b0/src/interpreter/interpreter.cc
[modify] https://crrev.com/cf7fa2eb087926f5293baea7aa1235d9365cf2b0/src/isolate.cc
[modify] https://crrev.com/cf7fa2eb087926f5293baea7aa1235d9365cf2b0/src/lookup.cc
[modify] https://crrev.com/cf7fa2eb087926f5293baea7aa1235d9365cf2b0/src/objects.cc
[modify] https://crrev.com/cf7fa2eb087926f5293baea7aa1235d9365cf2b0/src/parsing/parser-base.h
[modify] https://crrev.com/cf7fa2eb087926f5293baea7aa1235d9365cf2b0/src/parsing/parser.cc
[modify] https://crrev.com/cf7fa2eb087926f5293baea7aa1235d9365cf2b0/src/parsing/preparser.cc
[modify] https://crrev.com/cf7fa2eb087926f5293baea7aa1235d9365cf2b0/src/parsing/rewriter.cc
[modify] https://crrev.com/cf7fa2eb087926f5293baea7aa1235d9365cf2b0/src/parsing/scanner-character-streams.cc
[modify] https://crrev.com/cf7fa2eb087926f5293baea7aa1235d9365cf2b0/src/profiler/cpu-profiler.cc
[modify] https://crrev.com/cf7fa2eb087926f5293baea7aa1235d9365cf2b0/test/unittests/counters-unittest.cc

Project Member

Comment 7 by bugdroid1@chromium.org, Nov 30 2017

Project Member

Comment 9 by bugdroid1@chromium.org, Dec 4 2017

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

commit d1851bba6ea8c3c15e9505256449f8dcc8e25f13
Author: Ulan Degenbaev <ulan@chromium.org>
Date: Mon Dec 04 15:46:28 2017

[tools] Update tools/callstats.* with the new background GC group.

Bug: chromium:758183
Change-Id: I6858d9a3294270dde8913b8fb1a3e80008461ff6
Reviewed-on: https://chromium-review.googlesource.com/806118
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49832}
[modify] https://crrev.com/d1851bba6ea8c3c15e9505256449f8dcc8e25f13/tools/callstats.html
[modify] https://crrev.com/d1851bba6ea8c3c15e9505256449f8dcc8e25f13/tools/callstats.py

Project Member

Comment 10 by bugdroid1@chromium.org, Dec 4 2017

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

commit fd554885a8c7aed62a289c6cce36853f0ea6607f
Author: Ulan Degenbaev <ulan@chromium.org>
Date: Mon Dec 04 17:28:41 2017

[heap] Add background GC tracing infrastructure.

A background task can now use GCTracer::BackgroundScope to
trace the time spent in the task. The time shows up in
--trace-gc-nvp output and in the runtime call stats for GC.

The destructor of GCTracer::BackgroundScope increments the
corresponding counter in heap()->tracer()->background_counter_,
which is protected by a mutex.

The GCTracer::Stop function fetches background_counter_ items
into the global scope and into the runtime call stats.

Bug: chromium:758183
Change-Id: Id7bcd5089ba6c027fe9a57eb3f7db1cb5092aec5
Reviewed-on: https://chromium-review.googlesource.com/801694
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49841}
[modify] https://crrev.com/fd554885a8c7aed62a289c6cce36853f0ea6607f/src/counters.h
[modify] https://crrev.com/fd554885a8c7aed62a289c6cce36853f0ea6607f/src/heap-symbols.h
[modify] https://crrev.com/fd554885a8c7aed62a289c6cce36853f0ea6607f/src/heap/concurrent-marking.cc
[modify] https://crrev.com/fd554885a8c7aed62a289c6cce36853f0ea6607f/src/heap/gc-tracer.cc
[modify] https://crrev.com/fd554885a8c7aed62a289c6cce36853f0ea6607f/src/heap/gc-tracer.h
[modify] https://crrev.com/fd554885a8c7aed62a289c6cce36853f0ea6607f/src/heap/heap.cc
[modify] https://crrev.com/fd554885a8c7aed62a289c6cce36853f0ea6607f/src/heap/mark-compact.cc
[modify] https://crrev.com/fd554885a8c7aed62a289c6cce36853f0ea6607f/src/heap/sweeper.cc
[modify] https://crrev.com/fd554885a8c7aed62a289c6cce36853f0ea6607f/test/unittests/heap/gc-tracer-unittest.cc

Project Member

Comment 11 by bugdroid1@chromium.org, Dec 6 2017

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

commit fc5b2ff106d95b13e9575332692d0927f04b6fef
Author: Ulan Degenbaev <ulan@chromium.org>
Date: Wed Dec 06 10:33:48 2017

[heap] Add tracing scope for concurrent marking.

Bug: chromium:758183
Change-Id: I00966a8831ff3d62c962573955e235538e4bf4bb
Reviewed-on: https://chromium-review.googlesource.com/809108
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49887}
[modify] https://crrev.com/fc5b2ff106d95b13e9575332692d0927f04b6fef/src/heap/concurrent-marking.cc

Project Member

Comment 12 by bugdroid1@chromium.org, Dec 6 2017

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

commit 35870e79b05b4820d14d52ecbfd3489bc485b3c6
Author: Ulan Degenbaev <ulan@chromium.org>
Date: Wed Dec 06 11:07:48 2017

[heap] Add tracing scope to parallel scavenger.

Bug: chromium:758183
Change-Id: I5bfbff77562fdfd30587fdea475fb1b532e67b40
Reviewed-on: https://chromium-review.googlesource.com/809136
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49888}
[modify] https://crrev.com/35870e79b05b4820d14d52ecbfd3489bc485b3c6/src/heap/heap.cc

Project Member

Comment 13 by bugdroid1@chromium.org, Dec 6 2017

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

commit cc4d324a6aecd3d274561ac24828f7710ffd50ed
Author: Ulan Degenbaev <ulan@chromium.org>
Date: Wed Dec 06 15:35:05 2017

[heap] Add tracing scope to minor MC parallel marking.

Bug: chromium:758183
Change-Id: I7e0d5d6cfbef82895f76bd020a8ad22e4be013e2
Reviewed-on: https://chromium-review.googlesource.com/809151
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49897}
[modify] https://crrev.com/cc4d324a6aecd3d274561ac24828f7710ffd50ed/src/heap/mark-compact.cc

Project Member

Comment 14 by bugdroid1@chromium.org, Dec 6 2017

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

commit 8d2657ba0b9bce58236904d26a252b10214058be
Author: Ulan Degenbaev <ulan@chromium.org>
Date: Wed Dec 06 15:37:39 2017

[heap] Add tracing scope for concurrent sweeper.

Bug: chromium:758183
Change-Id: I4bfaf5fa4e0131b279546e50ca05a4bb4ca1eb0a
Reviewed-on: https://chromium-review.googlesource.com/808939
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49898}
[modify] https://crrev.com/8d2657ba0b9bce58236904d26a252b10214058be/src/heap/sweeper.cc

Project Member

Comment 15 by bugdroid1@chromium.org, Dec 6 2017

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

commit 39c0d3991c6123cdf39ca8f1b4ea40161a078770
Author: Ulan Degenbaev <ulan@chromium.org>
Date: Wed Dec 06 16:11:55 2017

[heap] Add tracing scope to parallel evacuation.

Bug: chromium:758183
Change-Id: I626be7a8f42662a657595c1147a6aa8cb53391fa
Reviewed-on: https://chromium-review.googlesource.com/808941
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49902}
[modify] https://crrev.com/39c0d3991c6123cdf39ca8f1b4ea40161a078770/src/heap-symbols.h
[modify] https://crrev.com/39c0d3991c6123cdf39ca8f1b4ea40161a078770/src/heap/gc-tracer.h
[modify] https://crrev.com/39c0d3991c6123cdf39ca8f1b4ea40161a078770/src/heap/mark-compact.cc

Project Member

Comment 16 by bugdroid1@chromium.org, Dec 7 2017

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

commit 681bc9b79c62b4ddef2bd63181ecbc3c59dfee3b
Author: Ulan Degenbaev <ulan@chromium.org>
Date: Thu Dec 07 09:47:16 2017

[heap] Add tracing scope for the remaining backround GC tasks.

This add scope for
- concurrent array buffer free task,
- concurrent store buffer processing task,
- concurrent unmapper task

Bug: chromium:758183
Change-Id: I1be3185a9ec44033982f6a0bb05d2e9b02074f85
Reviewed-on: https://chromium-review.googlesource.com/811646
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49922}
[modify] https://crrev.com/681bc9b79c62b4ddef2bd63181ecbc3c59dfee3b/src/heap-symbols.h
[modify] https://crrev.com/681bc9b79c62b4ddef2bd63181ecbc3c59dfee3b/src/heap/array-buffer-collector.cc
[modify] https://crrev.com/681bc9b79c62b4ddef2bd63181ecbc3c59dfee3b/src/heap/gc-tracer.cc
[modify] https://crrev.com/681bc9b79c62b4ddef2bd63181ecbc3c59dfee3b/src/heap/gc-tracer.h
[modify] https://crrev.com/681bc9b79c62b4ddef2bd63181ecbc3c59dfee3b/src/heap/spaces.cc
[modify] https://crrev.com/681bc9b79c62b4ddef2bd63181ecbc3c59dfee3b/src/heap/store-buffer.h

Comment 17 by u...@chromium.org, Dec 14 2017

Blockedon: 794911
Project Member

Comment 18 by bugdroid1@chromium.org, Dec 14 2017

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

commit 2031503a3b9fb1400fef7bd038842a2c980e94f5
Author: Ulan Degenbaev <ulan@chromium.org>
Date: Thu Dec 14 12:14:34 2017

[heap] Emit trace event for background GC tasks.

The following events in v8.gc category are emitted:
- V8.GC_BACKGROUND_ARRAY_BUFFER_FREE
- V8.GC_BACKGROUND_STORE_BUFFER
- V8.GC_BACKGROUND_UNMAPPER
- V8.GC_MC_BACKGROUND_EVACUATE_COPY
- V8.GC_MC_BACKGROUND_EVACUATE_UPDATE_POINTERS
- V8.GC_MC_BACKGROUND_MARKING
- V8.GC_MC_BACKGROUND_SWEEPING
- V8.GC_MINOR_MC_BACKGROUND_EVACUATE_COPY
- V8.GC_MINOR_MC_BACKGROUND_EVACUATE_UPDATE_POINTERS
- V8.GC_MINOR_MC_BACKGROUND_MARKING
- V8.GC_SCAVENGER_BACKGROUND_SCAVENGE_PARALLEL

Bug: chromium:758183
Change-Id: I04368f75ac740cbc832a864609709e5a46f5baef
Reviewed-on: https://chromium-review.googlesource.com/825203
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50107}
[modify] https://crrev.com/2031503a3b9fb1400fef7bd038842a2c980e94f5/src/heap/array-buffer-collector.cc
[modify] https://crrev.com/2031503a3b9fb1400fef7bd038842a2c980e94f5/src/heap/concurrent-marking.cc
[modify] https://crrev.com/2031503a3b9fb1400fef7bd038842a2c980e94f5/src/heap/gc-tracer.cc
[modify] https://crrev.com/2031503a3b9fb1400fef7bd038842a2c980e94f5/src/heap/gc-tracer.h
[modify] https://crrev.com/2031503a3b9fb1400fef7bd038842a2c980e94f5/src/heap/heap.cc
[modify] https://crrev.com/2031503a3b9fb1400fef7bd038842a2c980e94f5/src/heap/mark-compact.cc
[modify] https://crrev.com/2031503a3b9fb1400fef7bd038842a2c980e94f5/src/heap/spaces.cc
[modify] https://crrev.com/2031503a3b9fb1400fef7bd038842a2c980e94f5/src/heap/store-buffer.h
[modify] https://crrev.com/2031503a3b9fb1400fef7bd038842a2c980e94f5/src/heap/sweeper.cc

Cc: -eakuefner@chromium.org
Components: Test>Telemetry
Components: -Speed>Telemetry

Sign in to add a comment