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

Issue 2452063003: tracing: split out the CategoryRegistry from the TraceLog (Closed)

Created:
4 years, 1 month ago by Primiano Tucci (use gerrit)
Modified:
4 years, 1 month ago
CC:
chromium-reviews, tracing+reviews_chromium.org, wfh+watch_chromium.org, fmeawad, caseq, alph
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

tracing: split out the CategoryRegistry from the TraceLog Changes introduced by this CL: - Split out the category logic out of the TraceLog into CategoryRegistry. Makes it easier to unbundle, reuse and reason about. - Get rid of the parallel arrays for tracking names, filters and state of each category and switch them to one array of struct. This not only makes the code easier to read, but also opens the way for having categories defined at compile time that don't need any lazy initialization of the "enabled" ptr. - Naming cleanup: the term "category group" has always been confusing. All it does is reflecting a subtle implementation detail (the fact that a category name can be "cat1,cat2") which is quite irrelevant from a functional viewpoint. BUG=659689 Committed: https://crrev.com/094ac7f87d78a80e3934e148855a908977559166 Cr-Commit-Position: refs/heads/master@{#431300}

Patch Set 1 : fix test checks #

Total comments: 10

Patch Set 2 : Add constexpr to avoid static initializer and address initial comments #

Patch Set 3 : Workaround clang bug crbug.com/660828 #

Patch Set 4 : Don't outsmart compilers. They win by playing the plausible deniability card of undefined behavior. #

Patch Set 5 : Add is_pod check #

Patch Set 6 : add tests, rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+563 lines, -181 lines) Patch
M base/BUILD.gn View 1 2 3 4 5 3 chunks +4 lines, -0 lines 0 comments Download
A base/trace_event/category_registry.h View 1 2 3 4 5 1 chunk +83 lines, -0 lines 0 comments Download
A base/trace_event/category_registry.cc View 1 2 3 4 1 chunk +162 lines, -0 lines 0 comments Download
A base/trace_event/trace_category.h View 1 2 3 1 chunk +109 lines, -0 lines 0 comments Download
A base/trace_event/trace_category_unittest.cc View 1 2 3 4 5 1 chunk +137 lines, -0 lines 0 comments Download
M base/trace_event/trace_event.h View 2 chunks +5 lines, -4 lines 0 comments Download
M base/trace_event/trace_log.h View 1 2 3 4 chunks +3 lines, -18 lines 0 comments Download
M base/trace_event/trace_log.cc View 20 chunks +59 lines, -159 lines 0 comments Download
M tools/gn/bootstrap/bootstrap.py View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 81 (63 generated)
Primiano Tucci (use gerrit)
allright, let's start some autumn cleanup. Looks like doing the non-categories might be easier than ...
4 years, 1 month ago (2016-10-26 17:01:55 UTC) #17
fmeawad
Concerning the naming cleanup, I don't think that category group is confusing. In my opinion: ...
4 years, 1 month ago (2016-10-26 17:36:00 UTC) #23
oystein (OOO til 10th of July)
On 2016/10/26 17:36:00, fmeawad wrote: > Concerning the naming cleanup, I don't think that category ...
4 years, 1 month ago (2016-10-28 00:40:19 UTC) #30
oystein (OOO til 10th of July)
partial first pass https://codereview.chromium.org/2452063003/diff/120001/base/trace_event/category_registry.cc File base/trace_event/category_registry.cc (right): https://codereview.chromium.org/2452063003/diff/120001/base/trace_event/category_registry.cc#newcode34 base/trace_event/category_registry.cc:34: base::LazyInstance<base::Lock>::Leaky g_category_lock = Lazily created locks ...
4 years, 1 month ago (2016-10-28 06:28:00 UTC) #31
Primiano Tucci (use gerrit)
On 2016/10/28 00:40:19, oystein wrote: > On 2016/10/26 17:36:00, fmeawad wrote: > > Concerning the ...
4 years, 1 month ago (2016-10-28 15:28:39 UTC) #32
Primiano Tucci (use gerrit)
Ok this seems ready to go % name of TraceCategory if anybody wants to come ...
4 years, 1 month ago (2016-11-01 15:07:54 UTC) #59
fmeawad
Was the old code tested and we are reusing the tests? are we relying on ...
4 years, 1 month ago (2016-11-01 20:48:32 UTC) #60
Primiano Tucci (use gerrit)
On 2016/11/01 20:48:32, fmeawad wrote: > Was the old code tested and we are reusing ...
4 years, 1 month ago (2016-11-04 23:12:42 UTC) #63
Primiano Tucci (use gerrit)
ping.
4 years, 1 month ago (2016-11-07 15:15:12 UTC) #66
fmeawad
Thanks, lgtm
4 years, 1 month ago (2016-11-07 15:48:58 UTC) #67
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/2452063003/240001
4 years, 1 month ago (2016-11-10 10:29:37 UTC) #69
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/301276)
4 years, 1 month ago (2016-11-10 10:36:22 UTC) #71
Primiano Tucci (use gerrit)
ehm, +thakis for base/BUILD.gn stamp
4 years, 1 month ago (2016-11-10 12:51:53 UTC) #73
Nico
lgtm
4 years, 1 month ago (2016-11-10 15:51:51 UTC) #74
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/2452063003/240001
4 years, 1 month ago (2016-11-10 17:57:04 UTC) #76
commit-bot: I haz the power
Committed patchset #6 (id:240001)
4 years, 1 month ago (2016-11-10 18:43:44 UTC) #78
commit-bot: I haz the power
Patchset 6 (id:??) landed as https://crrev.com/094ac7f87d78a80e3934e148855a908977559166 Cr-Commit-Position: refs/heads/master@{#431300}
4 years, 1 month ago (2016-11-10 19:09:06 UTC) #80
oystein (OOO til 10th of July)
4 years, 1 month ago (2016-11-10 22:02:13 UTC) #81
Message was sent while issue was closed.
lgtm!

Powered by Google App Engine
This is Rietveld 408576698