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

Issue 1432873002: Add TRACE_COUNTER_WITH_TIMESTAMPx macros. (Closed)

Created:
5 years, 1 month ago by fdoray
Modified:
5 years ago
CC:
beaudoin, chromium-reviews, tracing+reviews_chromium.org, vmpstr+watch_chromium.org, wfh+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add TRACE_COUNTER_WITH_TIMESTAMPx macros. base::ProcessMetrics::GetCPUUsage() gives access to the % of CPU usage for the current process in the time interval [a, b], where a is the timestamp of the previous call to the method and b is the current timestamp. In order to display a correct CPU usage graph in about:tracing from the values returned by base::ProcessMetrics::GetCPUUsage(), we need a way to emit a counter event with timestamp |b| when we read the CPU usage at timestamp |a|. This CL introduces 2 TRACE_COUNTER_WITH_TIMESTAMPx macros that can emit a counter event with a custom timestamp. BUG=553266 Committed: https://crrev.com/6b5d01a9e568040f653dd8e4e13f69d08d49af91 Cr-Commit-Position: refs/heads/master@{#361807}

Patch Set 1 #

Patch Set 2 : rebase #

Total comments: 2

Patch Set 3 : change order or macro args #

Unified diffs Side-by-side diffs Delta from patch set Stats (+69 lines, -0 lines) Patch
M base/trace_event/common/trace_event_common.h View 1 2 1 chunk +14 lines, -0 lines 0 comments Download
M base/trace_event/trace_event.h View 1 chunk +17 lines, -0 lines 0 comments Download
M base/trace_event/trace_event_unittest.cc View 1 2 2 chunks +38 lines, -0 lines 0 comments Download

Messages

Total messages: 20 (9 generated)
fdoray
Could you review this CL? Thanks.
5 years, 1 month ago (2015-11-09 05:00:12 UTC) #2
nduca
lgtm but lets ask oysteine for a review
5 years, 1 month ago (2015-11-20 19:35:24 UTC) #5
fdoray
oysteine@: Can you review this CL?
5 years, 1 month ago (2015-11-23 13:53:59 UTC) #6
oystein (OOO til 10th of July)
https://codereview.chromium.org/1432873002/diff/20001/base/trace_event/common/trace_event_common.h File base/trace_event/common/trace_event_common.h (right): https://codereview.chromium.org/1432873002/diff/20001/base/trace_event/common/trace_event_common.h#newcode488 base/trace_event/common/trace_event_common.h:488: #define TRACE_COUNTER_WITH_TIMESTAMP1(category_group, name, value, timestamp) \ nit: the timestamp ...
5 years, 1 month ago (2015-11-23 19:21:15 UTC) #7
fdoray
oysteine@: Done. Can you take another look? https://codereview.chromium.org/1432873002/diff/20001/base/trace_event/common/trace_event_common.h File base/trace_event/common/trace_event_common.h (right): https://codereview.chromium.org/1432873002/diff/20001/base/trace_event/common/trace_event_common.h#newcode488 base/trace_event/common/trace_event_common.h:488: #define TRACE_COUNTER_WITH_TIMESTAMP1(category_group, ...
5 years ago (2015-11-25 21:13:12 UTC) #8
oystein (OOO til 10th of July)
lgtm
5 years ago (2015-11-25 23:18:31 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1432873002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1432873002/40001
5 years ago (2015-11-25 23:31:55 UTC) #12
commit-bot: I haz the power
Try jobs failed on following builders: ios_dbg_simulator_ninja on tryserver.chromium.mac (JOB_TIMED_OUT, no build URL) ios_rel_device_ninja on ...
5 years ago (2015-11-26 01:37:13 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1432873002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1432873002/40001
5 years ago (2015-11-26 02:03:30 UTC) #16
commit-bot: I haz the power
Committed patchset #3 (id:40001)
5 years ago (2015-11-26 03:30:27 UTC) #18
commit-bot: I haz the power
5 years ago (2015-11-26 03:31:11 UTC) #20
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/6b5d01a9e568040f653dd8e4e13f69d08d49af91
Cr-Commit-Position: refs/heads/master@{#361807}

Powered by Google App Engine
This is Rietveld 408576698