New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 608721 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Xoogler
Closed: Sep 2016
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug

Blocking:
issue 608719
issue 608722



Sign in to add a comment

Tracing V2: proto message generation

Project Member Reported by primiano@chromium.org, May 3 2016

Issue description

Background context: bit.ly/TracingV2 
The purpose of this is to prove that is possible to generate faster C++ stubs from proto files. At the end of this we should have some proto protos (pun, ha!) and we can use them to experiment end-to-end (serialize from Chrome, import from TraceViewer)
 
Blocking: 608719
Blocking: 608722
Owner: kraynov@chromium.org
Status: Assigned (was: Untriaged)
Summary: Tracing V2: proto message generation (was: Tracing V2: prototype proto message generation)
Prototype in https://codereview.chromium.org/1947373002/ with perf numbers.
Kraynov now working on upstreaming it cleanly (hence dropping the prototype from the title).

Draft implementation: crrev.com/2083373002
Project Member

Comment 5 by bugdroid1@chromium.org, Jul 13 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/89c7bc1f95f8beb30cd563bc4fcfa2bbab136e03

commit 89c7bc1f95f8beb30cd563bc4fcfa2bbab136e03
Author: kraynov <kraynov@chromium.org>
Date: Wed Jul 13 20:37:52 2016

Skeleton for ProtoZero plugin.

ProtoZero plugin is a custom C++ stubs generator for protobuf compiler.
These stubs are Tracing V2 specific and meet perfomance and memory
requirements being less functional than conventional ones.
This CL has no complete implementation (see crrev.com/2083373002) but
contains all invasive changes to build files.
See crrev.com/2082693002 for background about protobuf plugin support.

BUG= 608721 

Review-Url: https://codereview.chromium.org/2147613002
Cr-Commit-Position: refs/heads/master@{#405281}

[modify] https://crrev.com/89c7bc1f95f8beb30cd563bc4fcfa2bbab136e03/components/components_tests.gyp
[modify] https://crrev.com/89c7bc1f95f8beb30cd563bc4fcfa2bbab136e03/components/tracing.gyp
[modify] https://crrev.com/89c7bc1f95f8beb30cd563bc4fcfa2bbab136e03/components/tracing/BUILD.gn
[add] https://crrev.com/89c7bc1f95f8beb30cd563bc4fcfa2bbab136e03/components/tracing/test/example_messages.proto
[add] https://crrev.com/89c7bc1f95f8beb30cd563bc4fcfa2bbab136e03/components/tracing/test/proto_zero_generation_unittest.cc
[add] https://crrev.com/89c7bc1f95f8beb30cd563bc4fcfa2bbab136e03/components/tracing/tools/proto_zero_plugin/BUILD.gn
[add] https://crrev.com/89c7bc1f95f8beb30cd563bc4fcfa2bbab136e03/components/tracing/tools/proto_zero_plugin/DEPS
[add] https://crrev.com/89c7bc1f95f8beb30cd563bc4fcfa2bbab136e03/components/tracing/tools/proto_zero_plugin/proto_zero_generator.cc
[add] https://crrev.com/89c7bc1f95f8beb30cd563bc4fcfa2bbab136e03/components/tracing/tools/proto_zero_plugin/proto_zero_generator.h
[add] https://crrev.com/89c7bc1f95f8beb30cd563bc4fcfa2bbab136e03/components/tracing/tools/proto_zero_plugin/proto_zero_plugin.cc

Project Member

Comment 6 by bugdroid1@chromium.org, Jul 13 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3671b588234ec348707f079dea4b151164ffcb9b

commit 3671b588234ec348707f079dea4b151164ffcb9b
Author: mostynb <mostynb@opera.com>
Date: Wed Jul 13 22:54:33 2016

fix gyp build after proto_zero_plugin skeleton landed

Followup to https://codereview.chromium.org/2147613002 / crrev.com/2147613002

BUG= 608721 

Review-Url: https://codereview.chromium.org/2146063003
Cr-Commit-Position: refs/heads/master@{#405330}

[modify] https://crrev.com/3671b588234ec348707f079dea4b151164ffcb9b/components/tracing.gyp

Skeleton of ProtoZero plugin has been landed.
Next steps:

Second CL:
- Put full implementation of plugin (with commented runtime calls)
- README.chromium

Third CL:
- Adjustments to Primiano's proto zero runtime
- Uncommenting runtime calls
- Tests for generated stubs

Fourth CL:
- Fix design pitfall in proto_library.gni by adding path evaluation from dependency label.
It's terrible to put such boilerplate in every proto_library target which use custom generator plugin in order to satisfy cross compilation and Windows.

  plugin_host_label = generator_plugin_label + "($host_toolchain)"
  generator_plugin =
      rebase_path(get_label_info(plugin_host_label, "root_out_dir") + "/" +
                      get_label_info(plugin_host_label, "name"),
                  root_build_dir)
  if (is_win) {
    generator_plugin += ".exe"
  }

  deps = [
    plugin_host_label,
  ]
Project Member

Comment 8 by bugdroid1@chromium.org, Jul 15 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/4a7290ed1374f978aa05c068913acc6e9bb38f67

commit 4a7290ed1374f978aa05c068913acc6e9bb38f67
Author: kraynov <kraynov@chromium.org>
Date: Fri Jul 15 19:39:00 2016

ProtoZero plugin implementation.

Continuation of crrev.com/2147613002 with complete implementation of
generator plugin. Appenders are commented before getting final
version of the runtime.
Plugin output example: pastebin.com/HXyTwETy
Conventional protoc's C++ output: pastebin.com/X0vxYqgK

BUG= 608721 

Review-Url: https://codereview.chromium.org/2145423002
Cr-Commit-Position: refs/heads/master@{#405826}

[modify] https://crrev.com/4a7290ed1374f978aa05c068913acc6e9bb38f67/components/tracing/test/example_messages.proto
[modify] https://crrev.com/4a7290ed1374f978aa05c068913acc6e9bb38f67/components/tracing/tools/proto_zero_plugin/proto_zero_generator.cc

Project Member

Comment 10 by bugdroid1@chromium.org, Aug 5 2016

Status: Fixed (was: Assigned)

Sign in to add a comment