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

Issue 2929853003: Fix use of history timers in background threads. (Closed)

Created:
3 years, 6 months ago by kschimpf
Modified:
3 years, 5 months ago
CC:
v8-reviews_googlegroups.com, wasm-v8_google.com
Target Ref:
refs/heads/master
Project:
v8
Visibility:
Public.

Description

Fix use of history timers in background threads. HistoryTimer's can't run in the background because they use a timer with a simple api of Start() and Stop(). This CL fixes this problem by building a base class TimedHistogram that doesn't have a timer. The class HistoryTimer is modified to use this base class so that uses that run on the foreground thread do not need to be modified. It also adds a new class TimedHistogramScope that defines the timer in this class. This allows the corresopnding TimedHistogram class to be type safe. BUG=v8:6361 Review-Url: https://codereview.chromium.org/2929853003 Cr-Commit-Position: refs/heads/master@{#46150} Committed: https://chromium.googlesource.com/v8/v8/+/d4a108078d93a58fb2c296a59328f25980ded3ea

Patch Set 1 #

Patch Set 2 : Fix nits. #

Total comments: 4

Patch Set 3 : Fix use of counters on background threads. #

Patch Set 4 : Fix issues with counters on foreground thread. #

Total comments: 4

Patch Set 5 : Remove unused variable. #

Patch Set 6 : Merge with master. #

Total comments: 9

Patch Set 7 : Fix issues from patch set 6. #

Patch Set 8 : Merge with master #

Total comments: 18

Patch Set 9 : Fix issues raised by mtrofin #

Patch Set 10 : Make explicit when async_counters is needed. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+266 lines, -222 lines) Patch
M src/compiler/wasm-compiler.h View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -4 lines 0 comments Download
M src/compiler/wasm-compiler.cc View 1 2 3 4 5 6 7 8 2 chunks +8 lines, -21 lines 0 comments Download
M src/counters.h View 1 2 3 4 5 6 7 8 9 chunks +82 lines, -27 lines 0 comments Download
M src/counters.cc View 1 2 3 4 5 6 7 8 4 chunks +39 lines, -21 lines 0 comments Download
M src/isolate.h View 1 2 3 4 5 6 7 8 2 chunks +9 lines, -7 lines 0 comments Download
M src/isolate.cc View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -2 lines 0 comments Download
M src/wasm/module-compiler.h View 1 2 3 4 5 6 7 8 6 chunks +9 lines, -6 lines 0 comments Download
M src/wasm/module-compiler.cc View 1 2 3 4 5 6 7 8 19 chunks +26 lines, -44 lines 0 comments Download
M src/wasm/module-decoder.h View 1 2 3 4 5 6 7 8 9 2 chunks +16 lines, -5 lines 0 comments Download
M src/wasm/module-decoder.cc View 1 2 3 4 5 6 7 8 9 5 chunks +54 lines, -62 lines 0 comments Download
M src/wasm/wasm-module.h View 1 2 3 4 5 6 7 1 chunk +1 line, -2 lines 0 comments Download
M src/wasm/wasm-module.cc View 1 2 3 4 5 6 7 7 chunks +9 lines, -12 lines 0 comments Download
M src/wasm/wasm-objects.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M test/cctest/test-api.cc View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -2 lines 0 comments Download
M test/common/wasm/wasm-module-runner.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M test/unittests/wasm/module-decoder-unittest.cc View 1 2 3 4 5 6 7 2 chunks +5 lines, -5 lines 0 comments Download

Messages

Total messages: 59 (37 generated)
kschimpf
Please review. Thanks.
3 years, 6 months ago (2017-06-08 21:35:19 UTC) #7
jochen (gone - plz use gerrit)
https://codereview.chromium.org/2929853003/diff/20001/src/wasm/module-compiler.cc File src/wasm/module-compiler.cc (right): https://codereview.chromium.org/2929853003/diff/20001/src/wasm/module-compiler.cc#newcode327 src/wasm/module-compiler.cc:327: ? isolate_->counters()->wasm_compile_wasm_module_time() you can't access isolate_ if !is_sync https://codereview.chromium.org/2929853003/diff/20001/src/wasm/module-decoder.cc ...
3 years, 6 months ago (2017-06-08 22:15:36 UTC) #8
kschimpf
This cl is ready to be reviewed (again). https://codereview.chromium.org/2929853003/diff/20001/src/wasm/module-compiler.cc File src/wasm/module-compiler.cc (right): https://codereview.chromium.org/2929853003/diff/20001/src/wasm/module-compiler.cc#newcode327 src/wasm/module-compiler.cc:327: ? ...
3 years, 6 months ago (2017-06-09 20:03:37 UTC) #11
kschimpf
Patch error. Remerging with master. Will let you know when merge succeeds.
3 years, 6 months ago (2017-06-09 20:10:38 UTC) #14
kschimpf
Dry run succeeded. Ready for review. Thanks.
3 years, 6 months ago (2017-06-09 20:45:02 UTC) #19
Camillo Bruni
https://codereview.chromium.org/2929853003/diff/90001/src/counters.cc File src/counters.cc (right): https://codereview.chromium.org/2929853003/diff/90001/src/counters.cc#newcode86 src/counters.cc:86: if (Enabled()) { Given that this might be slightly ...
3 years, 6 months ago (2017-06-12 08:14:03 UTC) #20
jochen (gone - plz use gerrit)
https://codereview.chromium.org/2929853003/diff/90001/src/compiler/wasm-compiler.cc File src/compiler/wasm-compiler.cc (right): https://codereview.chromium.org/2929853003/diff/90001/src/compiler/wasm-compiler.cc#newcode3957 src/compiler/wasm-compiler.cc:3957: isolate_->counters()->wasm_compile_function_time()); no isolate_ deref on background threads https://codereview.chromium.org/2929853003/diff/90001/src/isolate.h File ...
3 years, 6 months ago (2017-06-12 09:18:34 UTC) #21
kschimpf
https://codereview.chromium.org/2929853003/diff/90001/src/compiler/wasm-compiler.cc File src/compiler/wasm-compiler.cc (right): https://codereview.chromium.org/2929853003/diff/90001/src/compiler/wasm-compiler.cc#newcode3957 src/compiler/wasm-compiler.cc:3957: isolate_->counters()->wasm_compile_function_time()); On 2017/06/12 09:18:34, jochen wrote: > no isolate_ ...
3 years, 6 months ago (2017-06-12 16:47:05 UTC) #26
kschimpf
Ping?
3 years, 6 months ago (2017-06-17 14:30:36 UTC) #27
jochen (gone - plz use gerrit)
deferring to cbruni@
3 years, 6 months ago (2017-06-19 13:14:10 UTC) #28
kschimpf
Ping? Is anyone looking at this CL?
3 years, 6 months ago (2017-06-20 14:59:57 UTC) #29
Camillo Bruni
lgtm https://codereview.chromium.org/2929853003/diff/90001/src/counters.cc File src/counters.cc (right): https://codereview.chromium.org/2929853003/diff/90001/src/counters.cc#newcode86 src/counters.cc:86: if (Enabled()) { On 2017/06/12 at 16:47:04, kschimpf ...
3 years, 6 months ago (2017-06-22 07:26:14 UTC) #30
Camillo Bruni
PTAL ulan@
3 years, 6 months ago (2017-06-22 10:53:19 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2929853003/130001
3 years, 6 months ago (2017-06-22 17:18:03 UTC) #35
commit-bot: I haz the power
Try jobs failed on following builders: v8_presubmit on master.tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_presubmit/builds/43744)
3 years, 6 months ago (2017-06-22 17:21:13 UTC) #37
Mircea Trofin
https://codereview.chromium.org/2929853003/diff/130001/src/counters.cc File src/counters.cc (right): https://codereview.chromium.org/2929853003/diff/130001/src/counters.cc#newcode82 src/counters.cc:82: if (isolate) Logger::CallEventLogger(isolate, name(), Logger::START, true); why would it ...
3 years, 6 months ago (2017-06-22 18:42:24 UTC) #42
kschimpf
https://codereview.chromium.org/2929853003/diff/130001/src/counters.cc File src/counters.cc (right): https://codereview.chromium.org/2929853003/diff/130001/src/counters.cc#newcode82 src/counters.cc:82: if (isolate) Logger::CallEventLogger(isolate, name(), Logger::START, true); On 2017/06/22 18:42:23, ...
3 years, 6 months ago (2017-06-22 20:38:31 UTC) #47
Mircea Trofin
On 2017/06/22 20:38:31, kschimpf wrote: > https://codereview.chromium.org/2929853003/diff/130001/src/counters.cc > File src/counters.cc (right): > > https://codereview.chromium.org/2929853003/diff/130001/src/counters.cc#newcode82 > ...
3 years, 6 months ago (2017-06-22 22:12:45 UTC) #50
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2929853003/170001
3 years, 6 months ago (2017-06-22 22:13:01 UTC) #53
commit-bot: I haz the power
Committed patchset #10 (id:170001) as https://chromium.googlesource.com/v8/v8/+/d4a108078d93a58fb2c296a59328f25980ded3ea
3 years, 6 months ago (2017-06-22 22:14:35 UTC) #56
kschimpf
Reopened CL because blink code is (unfortunately) getting counters from the isolate in the background ...
3 years, 6 months ago (2017-06-23 17:17:18 UTC) #58
kschimpf
3 years, 5 months ago (2017-07-04 23:48:10 UTC) #59
On 2017/06/23 17:17:18, kschimpf wrote:
> Reopened CL because blink code is (unfortunately) getting counters from the
> isolate in the background thread.
> 
> Hence, this CL was reverted. Need to remove the DCHECK before resubmitting.

Closing.  Changes committed in other CLs.

Powered by Google App Engine
This is Rietveld 408576698