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

Issue 2457523002: [Tracing] Fix inaccurate timer calculation in runtime statistics. (Closed)

Created:
4 years, 1 month ago by lpy
Modified:
4 years, 1 month ago
CC:
v8-reviews_googlegroups.com
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

[Tracing] Fix inaccurate timer calculation in runtime statistics. Previously we reset runtime counters and dump them when we enter, exit top level trace events respectively. However, there is gap between two top level trace events and runtime counters may be activated, resetting the counters makes the accumulated time inaccurate, and we may end up with negative time due to the nature of how we accumulate time. This patch fixes this problem by only resetting counters when there's no counters active, and before dump counters, we traverse current active counters to calculate their time, and then restart their timer. BUG=chromium:658145 Committed: https://crrev.com/92d9a56a152dcefc8a3004e9812977c457fd4d14 Cr-Commit-Position: refs/heads/master@{#40653}

Patch Set 1 #

Total comments: 4

Patch Set 2 : Address cbruni's comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+17 lines, -1 line) Patch
M src/counters.h View 1 chunk +10 lines, -0 lines 0 comments Download
M src/counters.cc View 1 2 chunks +6 lines, -0 lines 0 comments Download
M src/tracing/trace-event.cc View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 25 (16 generated)
lpy
ptal
4 years, 1 month ago (2016-10-26 20:29:10 UTC) #9
jochen (gone - plz use gerrit)
deferring to cbruni
4 years, 1 month ago (2016-10-27 07:40:40 UTC) #12
Camillo Bruni
Nice! Thanks for looking into this. I think we have the same issue with the ...
4 years, 1 month ago (2016-10-27 09:00:58 UTC) #13
lpy
https://codereview.chromium.org/2457523002/diff/20001/src/counters.cc File src/counters.cc (right): https://codereview.chromium.org/2457523002/diff/20001/src/counters.cc#newcode373 src/counters.cc:373: } On 2016/10/27 09:00:58, Camillo Bruni wrote: > Can ...
4 years, 1 month ago (2016-10-27 16:59:22 UTC) #15
Camillo Bruni
LGTM You're right, I thought that you could directly restart the timer after you've done ...
4 years, 1 month ago (2016-10-28 08:49:17 UTC) #19
jochen (gone - plz use gerrit)
rubberstamp lgtm
4 years, 1 month ago (2016-10-28 13:40:37 UTC) #20
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/2457523002/40001
4 years, 1 month ago (2016-10-28 17:40:36 UTC) #22
commit-bot: I haz the power
Committed patchset #2 (id:40001)
4 years, 1 month ago (2016-10-28 18:04:49 UTC) #23
commit-bot: I haz the power
4 years, 1 month ago (2016-11-17 22:17:08 UTC) #25
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/92d9a56a152dcefc8a3004e9812977c457fd4d14
Cr-Commit-Position: refs/heads/master@{#40653}

Powered by Google App Engine
This is Rietveld 408576698