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

Issue 1776673002: base: Add blame context (Closed)

Created:
4 years, 9 months ago by Sami
Modified:
4 years, 9 months ago
CC:
chromium-reviews, vmpstr+watch_chromium.org, oystein (OOO til 10th of July)
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

base: Add blame context This patch introduces the concept of a blame context, which is a logical entity to which we can attribute various types of costs (e.g., CPU usage, network bandwidth, memory allocations, etc.). A follow-up patch will add a specific blame context for web frames. Design doc: https://docs.google.com/document/d/15BB-suCb9j-nFt55yCFJBJCGzLg2qUm3WaSOPb8APtI BUG=546021 Committed: https://crrev.com/e69ffec748f93302e2174fd434e198dc295e5bf3 Cr-Commit-Position: refs/heads/master@{#382401}

Patch Set 1 #

Patch Set 2 : Formatting. #

Patch Set 3 : Build fix. #

Patch Set 4 : Test fix. #

Patch Set 5 : Detemplatize. #

Patch Set 6 : Bring back the base. #

Total comments: 7

Patch Set 7 : Split out context tree and snapshot types. #

Patch Set 8 : debug/ => trace_event/ #

Total comments: 1

Patch Set 9 : Split into BlameContext and TracedBlameContext. #

Total comments: 21

Patch Set 10 : Review comments. #

Total comments: 7

Patch Set 11 : Remove copy constructors. #

Patch Set 12 : Unprotect destructor. #

Total comments: 14

Patch Set 13 : Review comments. #

Total comments: 4

Patch Set 14 : DCHECK_IS_ON() #

Patch Set 15 : Remove was_initialized. #

Patch Set 16 : Windows build fix. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+579 lines, -40 lines) Patch
M base/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +3 lines, -0 lines 0 comments Download
M base/test/trace_event_analyzer.h View 1 2 3 4 5 6 7 8 9 10 5 chunks +10 lines, -7 lines 0 comments Download
M base/test/trace_event_analyzer.cc View 1 2 3 4 5 6 7 8 9 10 8 chunks +40 lines, -12 lines 0 comments Download
M base/test/trace_event_analyzer_unittest.cc View 1 2 3 4 5 6 7 8 9 10 9 chunks +73 lines, -21 lines 0 comments Download
A base/trace_event/blame_context.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +129 lines, -0 lines 0 comments Download
A base/trace_event/blame_context.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +105 lines, -0 lines 0 comments Download
A base/trace_event/blame_context_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +216 lines, -0 lines 0 comments Download
M base/trace_event/trace_event.gypi View 1 2 3 4 5 6 7 9 2 chunks +3 lines, -0 lines 0 comments Download

Messages

Total messages: 44 (12 generated)
Sami
Split out of https://codereview.chromium.org/1447563002/. How are we feeling about this interface?
4 years, 9 months ago (2016-03-08 15:02:05 UTC) #3
benjhayden
On 2016/03/08 at 15:02:05, skyostil wrote: > Split out of https://codereview.chromium.org/1447563002/. How are we feeling ...
4 years, 9 months ago (2016-03-08 18:53:00 UTC) #4
Sami
On 2016/03/08 18:53:00, benjhayden_chromium wrote: > On 2016/03/08 at 15:02:05, skyostil wrote: > > Split ...
4 years, 9 months ago (2016-03-09 12:29:56 UTC) #5
chiniforooshan
The CL generally looks good to me, but I have one more design question before ...
4 years, 9 months ago (2016-03-10 16:18:55 UTC) #6
Sami
https://codereview.chromium.org/1776673002/diff/100001/base/debug/blame_context.h File base/debug/blame_context.h (right): https://codereview.chromium.org/1776673002/diff/100001/base/debug/blame_context.h#newcode48 base/debug/blame_context.h:48: // is considered to count against all of that ...
4 years, 9 months ago (2016-03-10 17:59:02 UTC) #7
benjhayden
Ok to "blame". :-) I think the lower-level tracing API fits well here. Nice! https://codereview.chromium.org/1776673002/diff/100001/base/debug/blame_context.cc ...
4 years, 9 months ago (2016-03-10 23:18:43 UTC) #8
Sami
https://codereview.chromium.org/1776673002/diff/100001/base/debug/blame_context.cc File base/debug/blame_context.cc (right): https://codereview.chromium.org/1776673002/diff/100001/base/debug/blame_context.cc#newcode38 base/debug/blame_context.cc:38: << "Parent blame context must have the same name"; ...
4 years, 9 months ago (2016-03-14 16:59:14 UTC) #9
benjhayden
lgtm Thanks! https://codereview.chromium.org/1776673002/diff/100001/base/debug/blame_context.cc File base/debug/blame_context.cc (right): https://codereview.chromium.org/1776673002/diff/100001/base/debug/blame_context.cc#newcode45 base/debug/blame_context.cc:45: id_, 0, nullptr, nullptr, nullptr, nullptr, TRACE_EVENT_FLAG_HAS_ID); ...
4 years, 9 months ago (2016-03-14 17:16:08 UTC) #10
Sami
Thanks Ben! Dana, would you like to review this for reals?
4 years, 9 months ago (2016-03-14 17:18:04 UTC) #12
danakj
Why in base/debug/ and not in base/trace_event?
4 years, 9 months ago (2016-03-14 18:06:23 UTC) #13
Sami
On 2016/03/14 18:06:23, danakj wrote: > Why in base/debug/ and not in base/trace_event? It's somewhat ...
4 years, 9 months ago (2016-03-14 18:11:38 UTC) #14
Sami
We threw some dice with Nat and base/trace_event/ does seem like the more appropriate location. ...
4 years, 9 months ago (2016-03-14 18:42:01 UTC) #15
danakj
OK cool, then u don't need owners from me, but I can still review if ...
4 years, 9 months ago (2016-03-14 18:43:59 UTC) #16
nduca
Broadly, debug/ i think is probably not right because thats for very specific stuff not ...
4 years, 9 months ago (2016-03-14 19:00:29 UTC) #17
Sami
On 2016/03/14 18:43:59, danakj wrote: > OK cool, then u don't need owners from me, ...
4 years, 9 months ago (2016-03-15 11:27:33 UTC) #18
Sami
Decided to split this into an abstract BlameContext and a TracedBlameContext subclass. I think that ...
4 years, 9 months ago (2016-03-16 14:38:53 UTC) #19
danakj
https://codereview.chromium.org/1776673002/diff/160001/base/test/trace_event_analyzer.cc File base/test/trace_event_analyzer.cc (right): https://codereview.chromium.org/1776673002/diff/160001/base/test/trace_event_analyzer.cc#newcode46 base/test/trace_event_analyzer.cc:46: for (auto it = rhs.arg_values.cbegin(); it != rhs.arg_values.cend(); ++it) ...
4 years, 9 months ago (2016-03-16 18:29:50 UTC) #20
Sami
https://codereview.chromium.org/1776673002/diff/160001/base/test/trace_event_analyzer.cc File base/test/trace_event_analyzer.cc (right): https://codereview.chromium.org/1776673002/diff/160001/base/test/trace_event_analyzer.cc#newcode46 base/test/trace_event_analyzer.cc:46: for (auto it = rhs.arg_values.cbegin(); it != rhs.arg_values.cend(); ++it) ...
4 years, 9 months ago (2016-03-17 12:27:14 UTC) #21
danakj
https://codereview.chromium.org/1776673002/diff/160001/base/test/trace_event_analyzer.h File base/test/trace_event_analyzer.h (right): https://codereview.chromium.org/1776673002/diff/160001/base/test/trace_event_analyzer.h#newcode123 base/test/trace_event_analyzer.h:123: void operator=(const TraceEvent& rhs); On 2016/03/17 12:27:13, Sami wrote: ...
4 years, 9 months ago (2016-03-18 21:22:22 UTC) #22
danakj
I think this LGTM now overall :) (Should have a tracing owner look at it ...
4 years, 9 months ago (2016-03-18 21:34:56 UTC) #23
vmpstr
https://codereview.chromium.org/1776673002/diff/180001/base/test/trace_event_analyzer.cc File base/test/trace_event_analyzer.cc (right): https://codereview.chromium.org/1776673002/diff/180001/base/test/trace_event_analyzer.cc#newcode56 base/test/trace_event_analyzer.cc:56: TraceEvent& TraceEvent::operator=(TraceEvent&& rhs) { On 2016/03/18 21:34:56, danakj wrote: ...
4 years, 9 months ago (2016-03-18 21:36:18 UTC) #25
danakj
https://codereview.chromium.org/1776673002/diff/180001/base/test/trace_event_analyzer.cc File base/test/trace_event_analyzer.cc (right): https://codereview.chromium.org/1776673002/diff/180001/base/test/trace_event_analyzer.cc#newcode56 base/test/trace_event_analyzer.cc:56: TraceEvent& TraceEvent::operator=(TraceEvent&& rhs) { On 2016/03/18 21:36:18, vmpstr wrote: ...
4 years, 9 months ago (2016-03-18 21:39:10 UTC) #26
Sami
https://codereview.chromium.org/1776673002/diff/180001/base/test/trace_event_analyzer.cc File base/test/trace_event_analyzer.cc (right): https://codereview.chromium.org/1776673002/diff/180001/base/test/trace_event_analyzer.cc#newcode33 base/test/trace_event_analyzer.cc:33: TraceEvent::TraceEvent(TraceEvent&& other) { On 2016/03/18 21:34:56, danakj wrote: > ...
4 years, 9 months ago (2016-03-21 11:34:15 UTC) #27
Primiano Tucci (use gerrit)
The overall code LG, just some minor comments below. I think the major issue here ...
4 years, 9 months ago (2016-03-21 14:26:29 UTC) #29
Sami
Thanks Primiano. Triggering the snapshot should now work in all cases like we discussed. https://codereview.chromium.org/1776673002/diff/220001/base/trace_event/blame_context.cc ...
4 years, 9 months ago (2016-03-21 15:05:09 UTC) #30
Primiano Tucci (use gerrit)
LGTM with some micro comments on the last patchset. Thanks for the test! https://codereview.chromium.org/1776673002/diff/230009/base/trace_event/blame_context.cc File ...
4 years, 9 months ago (2016-03-21 17:12:55 UTC) #31
Sami
Thanks Primiano -- enjoy the poutine! https://codereview.chromium.org/1776673002/diff/230009/base/trace_event/blame_context.cc File base/trace_event/blame_context.cc (right): https://codereview.chromium.org/1776673002/diff/230009/base/trace_event/blame_context.cc#newcode27 base/trace_event/blame_context.cc:27: #ifndef NDEBUG On ...
4 years, 9 months ago (2016-03-21 18:26:10 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1776673002/270001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1776673002/270001
4 years, 9 months ago (2016-03-21 18:26:36 UTC) #35
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_x64_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_rel_ng/builds/185390)
4 years, 9 months ago (2016-03-21 19:00:33 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1776673002/290001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1776673002/290001
4 years, 9 months ago (2016-03-21 19:18:05 UTC) #40
commit-bot: I haz the power
Committed patchset #16 (id:290001)
4 years, 9 months ago (2016-03-21 21:53:22 UTC) #42
commit-bot: I haz the power
4 years, 9 months ago (2016-03-21 21:55:27 UTC) #44
Message was sent while issue was closed.
Patchset 16 (id:??) landed as
https://crrev.com/e69ffec748f93302e2174fd434e198dc295e5bf3
Cr-Commit-Position: refs/heads/master@{#382401}

Powered by Google App Engine
This is Rietveld 408576698