DescriptionFix 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. #
Messages
Total messages: 59 (37 generated)
|