Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(432)

Issue 2771013002: Add more safe points in compiler (Closed)

Created:
3 years, 9 months ago by erikcorry
Modified:
3 years, 8 months ago
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Add more safe points in compiler. The Scavenge (young-gen) GCs on the main thread have to wait for other threads to check in at a safe point. We were seeing big waits here, often 20ms, occasionally up to 180ms where the main thread is idling, waiting for the optimizing compiler. By adding more safe points the wait is reduced and is now rarely over 10ms, often under 1ms. This also changes the --verbose-gc output to be better aligned with the column headings, and to add the time needed to get to the safe point to the output, eg: [ GC(784211551): Scavenge(new space), 18, 2.209, 76.009, 32768, 0, 32768, 32768, 0, 0, 144912, 154425, 152064, 154880, 0, 0, 46.984, 2.752, 7.407, 18.657, 0.033, 5421, 0, 0, 0, ] ^^^^^^ Scavenge time ^^^^^^ safe point time. R=vegorov@google.com BUG= Committed: https://github.com/dart-lang/sdk/commit/fc2fcf9bc8adeb051cecac1d349c9209594de3dd

Patch Set 1 #

Total comments: 2

Patch Set 2 : Use correct call to check for safe point #

Patch Set 3 : Add a safe point in the zone allocator #

Total comments: 4

Patch Set 4 : Fix logic error in compiler code installation, more safe points, remove safe point in zone code, ni… #

Total comments: 4

Patch Set 5 : Fix test that 'parses' verbose GC output #

Unified diffs Side-by-side diffs Delta from patch set Stats (+83 lines, -44 lines) Patch
M runtime/tools/verbose_gc_to_bmu.dart View 1 2 3 4 1 chunk +5 lines, -3 lines 0 comments Download
M runtime/vm/compiler.cc View 1 2 3 4 6 chunks +11 lines, -1 line 0 comments Download
M runtime/vm/flow_graph.cc View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M runtime/vm/flow_graph_inliner.cc View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M runtime/vm/heap.h View 1 2 3 3 chunks +3 lines, -6 lines 0 comments Download
M runtime/vm/heap.cc View 1 2 3 3 chunks +29 lines, -23 lines 0 comments Download
M runtime/vm/jit_optimizer.cc View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M runtime/vm/pages.h View 1 2 3 1 chunk +6 lines, -4 lines 0 comments Download
M runtime/vm/pages.cc View 1 2 3 5 chunks +9 lines, -2 lines 0 comments Download
M runtime/vm/precompiler.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/redundancy_elimination.cc View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
M runtime/vm/scavenger.h View 1 2 3 1 chunk +6 lines, -4 lines 0 comments Download
M runtime/vm/scavenger.cc View 1 2 3 3 chunks +7 lines, -0 lines 0 comments Download

Messages

Total messages: 11 (3 generated)
erikcorry
3 years, 9 months ago (2017-03-23 10:16:13 UTC) #1
Vyacheslav Egorov (Google)
https://codereview.chromium.org/2771013002/diff/1/runtime/vm/compiler.cc File runtime/vm/compiler.cc (right): https://codereview.chromium.org/2771013002/diff/1/runtime/vm/compiler.cc#newcode842 runtime/vm/compiler.cc:842: SafepointOperationScope safepoint_scope(thread()); Here and below: I think you need ...
3 years, 9 months ago (2017-03-23 10:24:02 UTC) #2
Cutch
Why is this needed? What bug is this fixing?
3 years, 9 months ago (2017-03-23 13:47:28 UTC) #3
siva
DBC https://codereview.chromium.org/2771013002/diff/40001/runtime/vm/pages.h File runtime/vm/pages.h (right): https://codereview.chromium.org/2771013002/diff/40001/runtime/vm/pages.h#newcode331 runtime/vm/pages.h:331: kSweepLargePages = 4, Might be a better to ...
3 years, 9 months ago (2017-03-23 18:05:02 UTC) #5
erikcorry
Description updated. https://codereview.chromium.org/2771013002/diff/1/runtime/vm/compiler.cc File runtime/vm/compiler.cc (right): https://codereview.chromium.org/2771013002/diff/1/runtime/vm/compiler.cc#newcode842 runtime/vm/compiler.cc:842: SafepointOperationScope safepoint_scope(thread()); On 2017/03/23 10:24:02, Vyacheslav Egorov ...
3 years, 9 months ago (2017-03-27 10:23:28 UTC) #7
Vyacheslav Egorov (Google)
lgtm https://codereview.chromium.org/2771013002/diff/60001/runtime/vm/code_generator.cc File runtime/vm/code_generator.cc (right): https://codereview.chromium.org/2771013002/diff/60001/runtime/vm/code_generator.cc#newcode1733 runtime/vm/code_generator.cc:1733: // Unfortunately, while we were compiling, the background ...
3 years, 9 months ago (2017-03-27 14:11:51 UTC) #8
erikcorry
I had to rebase this one after https://codereview.chromium.org/2781483005/ landed. PTAL https://codereview.chromium.org/2771013002/diff/60001/runtime/vm/code_generator.cc File runtime/vm/code_generator.cc (right): https://codereview.chromium.org/2771013002/diff/60001/runtime/vm/code_generator.cc#newcode1733 ...
3 years, 8 months ago (2017-03-30 14:10:19 UTC) #9
erikcorry
3 years, 8 months ago (2017-03-31 09:19:56 UTC) #11
Message was sent while issue was closed.
Committed patchset #5 (id:80001) manually as
fc2fcf9bc8adeb051cecac1d349c9209594de3dd (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698