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

Issue 2504753002: tracing: Introduce API for composite IDs (Closed)

Created:
4 years, 1 month ago by chiniforooshan
Modified:
3 years, 11 months ago
CC:
chromium-reviews, tracing+reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

tracing: Introduce API for composite IDs Creating a GUID that fits into a 64-bit number can be tricky. TRACE_ID_COMPOSITE would let the caller specify a sequence of numbers as an ID to make GUID generation easier. This is the last part of unifying trace IDs, previous parts being TRACE_ID_LOCAL and TRACE_ID_GLOBAL macros and TRACE_LINK_IDS macro. In this patch, the macro is not implemented in a very general way: 1- It supports combining two numbers to make an ID. This should be enough for current use cases in which a local ID is prefixed with the PID or the tracing-PID to become a GUID. We can support IDs consisting of more than two number when it is needed. 2- Since we do not want to increase the size of the TraceEvent structure, we only support these composite IDs as the last argument of the TRACE_LINK_IDS macro in which the ID is written in args. For other use-cases, one can use a process-local ID and link it to a GUID. Example usage: TRACE_LINK_IDS("cat", "name", 0x1000, TRACE_ID_WITH_SCOPE("bla", 0x2000, 0x3000)); Generated JSON: ("ph":"=", ..., "id":"0x1000", "args":{"linked_id":{"scope": "bla", "id2":["0x2000", "0x3000"]}}) Design Doc: https://docs.google.com/document/d/1s0DKjNJk85hDuRp5IqujwZvPML-MPsyAtDeksMwBw7s/edit#heading=h.rgbjbsfu6a9s BUG=catapult:#2465 Review-Url: https://codereview.chromium.org/2504753002 Cr-Commit-Position: refs/heads/master@{#444092} Committed: https://chromium.googlesource.com/chromium/src/+/02ab37fa0143f56ae73f1a567b585ffbec5afcaf

Patch Set 1 #

Patch Set 2 : cl format #

Patch Set 3 : Slightly more efficient implementation #

Total comments: 8

Patch Set 4 : comments #

Patch Set 5 : comments #

Patch Set 6 : . #

Patch Set 7 : comments #

Total comments: 4

Patch Set 8 : comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+86 lines, -27 lines) Patch
M base/trace_event/trace_event.h View 1 2 3 4 5 6 7 4 chunks +41 lines, -5 lines 0 comments Download
M base/trace_event/trace_event_impl.cc View 1 2 3 4 5 6 7 1 chunk +24 lines, -22 lines 0 comments Download
M base/trace_event/trace_event_unittest.cc View 1 2 3 4 5 6 7 2 chunks +21 lines, -0 lines 0 comments Download

Messages

Total messages: 35 (21 generated)
chiniforooshan
Hi Andrey, Does this look OK to you?
4 years, 1 month ago (2016-11-15 20:58:20 UTC) #4
caseq
mostly looks good, though a bunch of nits. https://codereview.chromium.org/2504753002/diff/40001/base/trace_event/trace_event.h File base/trace_event/trace_event.h (right): https://codereview.chromium.org/2504753002/diff/40001/base/trace_event/trace_event.h#newcode492 base/trace_event/trace_event.h:492: CompositeID& ...
4 years, 1 month ago (2016-11-21 19:47:20 UTC) #13
chiniforooshan
https://codereview.chromium.org/2504753002/diff/40001/base/trace_event/trace_event.h File base/trace_event/trace_event.h (right): https://codereview.chromium.org/2504753002/diff/40001/base/trace_event/trace_event.h#newcode492 base/trace_event/trace_event.h:492: CompositeID& composite_id) { On 2016/11/21 19:47:20, caseq wrote: > ...
4 years, 1 month ago (2016-11-21 21:12:15 UTC) #14
caseq
On 2016/11/21 21:12:15, chiniforooshan wrote: > https://codereview.chromium.org/2504753002/diff/40001/base/trace_event/trace_event.h > File base/trace_event/trace_event.h (right): > > https://codereview.chromium.org/2504753002/diff/40001/base/trace_event/trace_event.h#newcode492 > ...
4 years, 1 month ago (2016-11-22 00:59:34 UTC) #15
chiniforooshan
On 2016/11/22 00:59:34, caseq wrote: > On 2016/11/21 21:12:15, chiniforooshan wrote: > > > https://codereview.chromium.org/2504753002/diff/40001/base/trace_event/trace_event.h ...
4 years, 1 month ago (2016-11-22 16:04:06 UTC) #17
Primiano Tucci (use gerrit)
On 2016/11/22 16:04:06, chiniforooshan wrote: > On 2016/11/22 00:59:34, caseq wrote: > > On 2016/11/21 ...
4 years ago (2016-11-28 16:52:45 UTC) #19
Primiano Tucci (use gerrit)
We had a chat offline about his during the PI meeting. My only question here ...
4 years ago (2016-12-01 18:49:04 UTC) #20
chiniforooshan1
On 2016/12/01 18:49:04, Primiano Tucci wrote: > We had a chat offline about his during ...
4 years ago (2016-12-05 21:41:40 UTC) #21
Primiano Tucci (use gerrit)
On 2016/12/05 21:41:40, chiniforooshan1 wrote: > I think it is possible to bundle it with ...
4 years ago (2016-12-06 18:52:53 UTC) #22
chiniforooshan1
On 2016/12/06 18:52:53, Primiano Tucci (back but slow) wrote: > On 2016/12/05 21:41:40, chiniforooshan1 wrote: ...
3 years, 11 months ago (2017-01-12 18:27:48 UTC) #23
Primiano Tucci (use gerrit)
LGTM with a small comment. Also plz update the cl title with something a bit ...
3 years, 11 months ago (2017-01-17 12:25:47 UTC) #26
chiniforooshan1
https://codereview.chromium.org/2504753002/diff/120001/base/trace_event/trace_event.h File base/trace_event/trace_event.h (right): https://codereview.chromium.org/2504753002/diff/120001/base/trace_event/trace_event.h#newcode46 base/trace_event/trace_event.h:46: // this macro to add a scope string. On ...
3 years, 11 months ago (2017-01-17 16:44:09 UTC) #29
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/2504753002/140001
3 years, 11 months ago (2017-01-17 16:45:36 UTC) #32
commit-bot: I haz the power
3 years, 11 months ago (2017-01-17 18:05:03 UTC) #35
Message was sent while issue was closed.
Committed patchset #8 (id:140001) as
https://chromium.googlesource.com/chromium/src/+/02ab37fa0143f56ae73f1a567b58...

Powered by Google App Engine
This is Rietveld 408576698