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

Issue 2134683002: tracing v2: Add base class for zero-copy protobuf (ProtoZero) (Closed)

Created:
4 years, 5 months ago by Primiano Tucci (use gerrit)
Modified:
4 years, 5 months ago
CC:
chromium-reviews, tracing+reviews_chromium.org, wfh+watch_chromium.org, kraynov
Base URL:
https://chromium.googlesource.com/chromium/src.git@proto_utils
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

tracing v2: Add base class for zero-copy protobuf (ProtoZero) This CL introduces one of the major building blocks for Tracing V2. ProtoZeroMessage is the base class that the generated C++ stubs (from the .proto files) will extend and use. This is, in essence, the equivalent of the libprotobuf runtime used by conventional protos, reduced to the bare minimum required for the append-only API surface we care about in Tracing V2. This class allows in-flight serialization of proto fields directly into the underlying ScatteredStreamBuffer, without performing any copy nor requiring any dynamic memory allocation. This class is not meant to be instantiated directly by the tracing clients. The next CLs will introduce a TracingBufferWriter which will glue together the ring buffer implementation and return event proto objects from that. BUG=608719 Committed: https://crrev.com/cf033562024e494ac7a8edd01ef64a4cdfcaf9c6 Cr-Commit-Position: refs/heads/master@{#405482}

Patch Set 1 #

Patch Set 2 : WIP #

Patch Set 3 : . #

Patch Set 4 : rebase #

Patch Set 5 : Rebase #

Patch Set 6 : add comments #

Total comments: 76

Patch Set 7 : alph review #

Total comments: 2

Patch Set 8 : petrcermak review #

Total comments: 14

Patch Set 9 : oysteine + 2nd petrcermak review + rebase #

Patch Set 10 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+560 lines, -0 lines) Patch
M components/components_tests.gyp View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M components/tracing.gyp View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -0 lines 0 comments Download
M components/tracing/BUILD.gn View 1 2 3 4 5 6 7 8 9 2 chunks +3 lines, -0 lines 0 comments Download
M components/tracing/core/proto_utils.h View 1 2 3 4 5 6 1 chunk +4 lines, -0 lines 0 comments Download
A components/tracing/core/proto_zero_message.h View 1 2 3 4 5 6 7 8 1 chunk +155 lines, -0 lines 0 comments Download
A components/tracing/core/proto_zero_message.cc View 1 2 3 4 5 6 7 8 1 chunk +165 lines, -0 lines 0 comments Download
A components/tracing/core/proto_zero_message_unittest.cc View 1 2 3 4 5 6 7 8 1 chunk +230 lines, -0 lines 0 comments Download

Messages

Total messages: 27 (10 generated)
Primiano Tucci (use gerrit)
well well well, let's get to the juicy pieces finally. ;-)
4 years, 5 months ago (2016-07-11 17:28:12 UTC) #3
alph
lgtm https://codereview.chromium.org/2134683002/diff/100001/components/tracing/core/proto_utils.h File components/tracing/core/proto_utils.h (right): https://codereview.chromium.org/2134683002/diff/100001/components/tracing/core/proto_utils.h#newcode31 components/tracing/core/proto_utils.h:31: constexpr size_t kMaxMessageLength = 1u << (kMessageLengthFieldSize * ...
4 years, 5 months ago (2016-07-12 00:20:43 UTC) #4
Primiano Tucci (use gerrit)
https://codereview.chromium.org/2134683002/diff/100001/components/tracing/core/proto_utils.h File components/tracing/core/proto_utils.h (right): https://codereview.chromium.org/2134683002/diff/100001/components/tracing/core/proto_utils.h#newcode31 components/tracing/core/proto_utils.h:31: constexpr size_t kMaxMessageLength = 1u << (kMessageLengthFieldSize * 7); ...
4 years, 5 months ago (2016-07-12 10:15:32 UTC) #5
petrcermak
Looks good overall. Here's a bunch https://codereview.chromium.org/2134683002/diff/100001/components/tracing/core/proto_zero_message.cc File components/tracing/core/proto_zero_message.cc (right): https://codereview.chromium.org/2134683002/diff/100001/components/tracing/core/proto_zero_message.cc#newcode22 components/tracing/core/proto_zero_message.cc:22: // Do add ...
4 years, 5 months ago (2016-07-12 10:18:48 UTC) #6
petrcermak
... of comments (sent the previous message too soon). Thanks, Petr
4 years, 5 months ago (2016-07-12 10:19:19 UTC) #7
kraynov
lgtm https://codereview.chromium.org/2134683002/diff/120001/components/tracing/core/proto_zero_message.h File components/tracing/core/proto_zero_message.h (right): https://codereview.chromium.org/2134683002/diff/120001/components/tracing/core/proto_zero_message.h#newcode134 components/tracing/core/proto_zero_message.h:134: ALIGNAS(sizeof(void*)) uint8_t nested_messages_arena_[512]; Please explain how are you ...
4 years, 5 months ago (2016-07-12 10:31:03 UTC) #9
Primiano Tucci (use gerrit)
https://codereview.chromium.org/2134683002/diff/100001/components/tracing/core/proto_zero_message.cc File components/tracing/core/proto_zero_message.cc (right): https://codereview.chromium.org/2134683002/diff/100001/components/tracing/core/proto_zero_message.cc#newcode22 components/tracing/core/proto_zero_message.cc:22: // Do add any code here, use the Reset() ...
4 years, 5 months ago (2016-07-12 17:25:17 UTC) #10
petrcermak
LGTM with some final comments. Thanks, Petr https://codereview.chromium.org/2134683002/diff/100001/components/tracing/core/proto_zero_message.cc File components/tracing/core/proto_zero_message.cc (right): https://codereview.chromium.org/2134683002/diff/100001/components/tracing/core/proto_zero_message.cc#newcode24 components/tracing/core/proto_zero_message.cc:24: // of ...
4 years, 5 months ago (2016-07-12 17:41:18 UTC) #11
oystein (OOO til 10th of July)
Extremely excited by this :D https://codereview.chromium.org/2134683002/diff/140001/components/tracing/core/proto_zero_message.cc File components/tracing/core/proto_zero_message.cc (right): https://codereview.chromium.org/2134683002/diff/140001/components/tracing/core/proto_zero_message.cc#newcode27 components/tracing/core/proto_zero_message.cc:27: static_assert(base::is_trivially_destructible<ProtoZeroMessage>::value, Why are these ...
4 years, 5 months ago (2016-07-12 21:03:29 UTC) #12
Primiano Tucci (use gerrit)
https://codereview.chromium.org/2134683002/diff/100001/components/tracing/core/proto_zero_message_unittest.cc File components/tracing/core/proto_zero_message_unittest.cc (right): https://codereview.chromium.org/2134683002/diff/100001/components/tracing/core/proto_zero_message_unittest.cc#newcode199 components/tracing/core/proto_zero_message_unittest.cc:199: for (size_t depth = 0; depth < ProtoZeroMessage::kMaxNestingDepth; ++depth) ...
4 years, 5 months ago (2016-07-13 10:25:08 UTC) #13
oystein (OOO til 10th of July)
lgtm!
4 years, 5 months ago (2016-07-13 15:39:43 UTC) #14
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/2134683002/160001
4 years, 5 months ago (2016-07-14 11:12:42 UTC) #17
commit-bot: I haz the power
Try jobs failed on following builders: ios-device on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device/builds/35763) ios-device-gn on master.tryserver.chromium.mac (JOB_FAILED, ...
4 years, 5 months ago (2016-07-14 11:14:28 UTC) #19
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/2134683002/180001
4 years, 5 months ago (2016-07-14 11:37:43 UTC) #22
commit-bot: I haz the power
Committed patchset #10 (id:180001)
4 years, 5 months ago (2016-07-14 13:37:58 UTC) #24
commit-bot: I haz the power
CQ bit was unchecked.
4 years, 5 months ago (2016-07-14 13:38:06 UTC) #25
commit-bot: I haz the power
4 years, 5 months ago (2016-07-14 13:39:38 UTC) #27
Message was sent while issue was closed.
Patchset 10 (id:??) landed as
https://crrev.com/cf033562024e494ac7a8edd01ef64a4cdfcaf9c6
Cr-Commit-Position: refs/heads/master@{#405482}

Powered by Google App Engine
This is Rietveld 408576698