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

Issue 2228563002: Tracing V2: Proto message and utils improvements. (Closed)

Created:
4 years, 4 months ago by kraynov
Modified:
4 years, 4 months ago
CC:
chromium-reviews, tracing+reviews_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

Tracing V2: Proto message and utils improvements. Appenders has been moved to header and polished for uniform style. Proto utils are extended to support ZigZag encoding. BUG=608719 Committed: https://crrev.com/034f4638ca40cd3b77d55e72f773af24961f8591 Cr-Commit-Position: refs/heads/master@{#410852}

Patch Set 1 #

Total comments: 8

Patch Set 2 : minors #

Total comments: 20

Patch Set 3 : test zig-zag #

Patch Set 4 : style #

Total comments: 6
Unified diffs Side-by-side diffs Delta from patch set Stats (+150 lines, -150 lines) Patch
M components/tracing/core/proto_utils.h View 1 2 3 2 chunks +40 lines, -44 lines 6 comments Download
M components/tracing/core/proto_utils_unittest.cc View 1 2 3 3 chunks +41 lines, -33 lines 0 comments Download
M components/tracing/core/proto_zero_message.h View 1 2 3 2 chunks +39 lines, -5 lines 0 comments Download
M components/tracing/core/proto_zero_message.cc View 1 2 3 5 chunks +11 lines, -51 lines 0 comments Download
M components/tracing/core/proto_zero_message_unittest.cc View 5 chunks +19 lines, -17 lines 0 comments Download

Messages

Total messages: 33 (20 generated)
kraynov
PTAL
4 years, 4 months ago (2016-08-08 18:13:57 UTC) #5
alph
lgtm https://codereview.chromium.org/2228563002/diff/1/components/tracing/core/proto_utils.h File components/tracing/core/proto_utils.h (right): https://codereview.chromium.org/2228563002/diff/1/components/tracing/core/proto_utils.h#newcode90 components/tracing/core/proto_utils.h:90: buf[i] = static_cast<uint8_t>((value & 0x7F) | msb); nit: ...
4 years, 4 months ago (2016-08-08 19:59:50 UTC) #6
petrcermak
LGTM with a couple of style comments. Thanks, Petr https://codereview.chromium.org/2228563002/diff/20001/components/tracing/core/proto_utils.h File components/tracing/core/proto_utils.h (right): https://codereview.chromium.org/2228563002/diff/20001/components/tracing/core/proto_utils.h#newcode18 components/tracing/core/proto_utils.h:18: ...
4 years, 4 months ago (2016-08-09 09:55:53 UTC) #13
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/2228563002/60001
4 years, 4 months ago (2016-08-09 12:18:24 UTC) #20
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/233773)
4 years, 4 months ago (2016-08-09 12:24:01 UTC) #22
kraynov
Sorry, forgot to reply for comments https://codereview.chromium.org/2228563002/diff/1/components/tracing/core/proto_utils.h File components/tracing/core/proto_utils.h (right): https://codereview.chromium.org/2228563002/diff/1/components/tracing/core/proto_utils.h#newcode90 components/tracing/core/proto_utils.h:90: buf[i] = static_cast<uint8_t>((value ...
4 years, 4 months ago (2016-08-09 12:32:05 UTC) #23
kraynov
+oysteine Oystein, could you please take a look?
4 years, 4 months ago (2016-08-09 12:32:55 UTC) #25
oystein (OOO til 10th of July)
lgtm
4 years, 4 months ago (2016-08-09 22:11:39 UTC) #26
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/2228563002/60001
4 years, 4 months ago (2016-08-09 22:13:59 UTC) #28
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 4 months ago (2016-08-09 22:19:10 UTC) #29
commit-bot: I haz the power
Patchset 4 (id:??) landed as https://crrev.com/034f4638ca40cd3b77d55e72f773af24961f8591 Cr-Commit-Position: refs/heads/master@{#410852}
4 years, 4 months ago (2016-08-09 22:21:08 UTC) #31
Primiano Tucci (use gerrit)
Post-the-fact LGTM w/ minor comments. No action needed, will fix them in my next CL. ...
4 years, 4 months ago (2016-08-24 08:33:53 UTC) #32
kraynov
4 years, 4 months ago (2016-08-24 13:05:44 UTC) #33
Message was sent while issue was closed.
https://codereview.chromium.org/2228563002/diff/60001/components/tracing/core...
File components/tracing/core/proto_utils.h (right):

https://codereview.chromium.org/2228563002/diff/60001/components/tracing/core...
components/tracing/core/proto_utils.h:19: // This is required in headers and
it's too low-level to be exposed.
On 2016/08/24 08:33:53, Primiano Tucci wrote:
> This was the entire point of "proto" namespace. Not expose internal details
that
> deal with proto.

Acknowledged.

https://codereview.chromium.org/2228563002/diff/60001/components/tracing/core...
components/tracing/core/proto_utils.h:79: // used to backfill fixed-size
reservations for the length of field using a
On 2016/08/24 08:33:53, Primiano Tucci wrote:
> no, the meaning here was really "the lenght field", that is the field that
tells
> the length.

Let's be consistent with protobuf terminology:
- Field means some data corresponding to a number in message descriptor
- Tag means field type and number tuple
- "Length" is a part of length-delimited field

https://codereview.chromium.org/2228563002/diff/60001/components/tracing/core...
components/tracing/core/proto_utils.h:85: inline void
WriteRedundantLength(uint32_t value, uint8_t* buf) {
On 2016/08/24 08:33:53, Primiano Tucci wrote:
> WriteRedundantLength is IMHO a bad name.
> What is a redundant length?
> The thing that is redundant here is the varint encoding. You just removed the
> most important part of the name, that is "VarInt".

The only purpose of this method is overwriting placeholder for length. It takes
exactly |kMessageLengthFieldSize| (not the best name for constant because of
collision with "field" meaning in protobuf, but it's better than something
non-obvious like |kMessageLengthSize| or verbose
|kMessageLengthPlaceholderSize|) number of bytes. It basically writes the length
value for field, VarInt is not a point in this abstraction.

Powered by Google App Engine
This is Rietveld 408576698