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

Issue 1947373002: Tracing V2 prototype [NOT FOR REVIEW]

Created:
4 years, 7 months ago by Primiano Tucci (use gerrit)
Modified:
4 years, 6 months ago
Reviewers:
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 prototype [NOT FOR REVIEW] VIEWER DISCRETION IS ADVISED This is a highly dirty prototype of tracing v2. It serves as a proof of concept, showing how to rebase existing trace macros on zero-copy zero-malloc protobuf. Also it serves as a baseline to get some perf numbers. There are quite some micro-optimizations still possible, didn't spend too much time. perf TL;DR - simple trace events are marginally slower on arm (in the 10% ballpark) and slighly faster on x86. - complex trace events are ~2x faster in Tracing V2 \o/ Also the proto generator (tracing_protoc.py) is all hacked up. kraynov is working on a proper one in C++ based on protoc plugin infrastructure. All times are us. from ThreadTicks. On X86_64 ------------------------------------------------------------------------------ Using Tracing V=1, N-args=0 times (for 100 runs): avg: 95, med: 106 Using Tracing V=2, N-args=0 times (for 100 runs): avg: 93, med: 88 Using Tracing V=1, N-args=1 times (for 100 runs): avg: 92, med: 105 Using Tracing V=2, N-args=1 times (for 100 runs): avg: 97, med: 93 Using Tracing V=1, N-args=2 times (for 100 runs): avg: 93, med: 85 Using Tracing V=2, N-args=2 times (for 100 runs): avg: 102, med: 102 Using Tracing V=1, N-args=42 times (for 100 runs): avg: 196, med: 205 Using Tracing V=2, N-args=42 times (for 100 runs): avg: 125, med: 118 ------------------------------------------------------------------------------ On arm ------------------------------------------------------------------------------ Using Tracing V=1, N-args=0 times (for 100 runs): avg: 2247, med: 2442 Using Tracing V=2, N-args=0 times (for 100 runs): avg: 2445, med: 2472 Using Tracing V=1, N-args=1 times (for 100 runs): avg: 2397, med: 2411 Using Tracing V=2, N-args=1 times (for 100 runs): avg: 2718, med: 2717 Using Tracing V=1, N-args=2 times (for 100 runs): avg: 2388, med: 2442 Using Tracing V=2, N-args=2 times (for 100 runs): avg: 2805, med: 2838 Using Tracing V=1, N-args=42 times (for 100 runs): avg: 6761, med: 6897 Using Tracing V=2, N-args=42 times (for 100 runs): avg: 3464, med: 3388 ------------------------------------------------------------------------------ BUG=

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : . #

Patch Set 4 : . #

Patch Set 5 : WORKS #

Patch Set 6 : BACKUP while refactoring, doesnt build yet #

Patch Set 7 : backup #

Patch Set 8 : backup #

Patch Set 9 : backup #

Patch Set 10 : backup #

Patch Set 11 : backup #

Patch Set 12 : backup #

Patch Set 13 : backup #

Patch Set 14 : WORKS #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1615 lines, -8 lines) Patch
M base/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 5 chunks +49 lines, -0 lines 0 comments Download
A base/trace_event/common/proto/event.proto View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +58 lines, -0 lines 0 comments Download
A base/trace_event/common/proto/event_args_simple.proto View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +28 lines, -0 lines 0 comments Download
A base/trace_event/common/proto/event_args_test.proto View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +15 lines, -0 lines 0 comments Download
A base/trace_event/common/proto/events_chunk.proto View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +24 lines, -0 lines 0 comments Download
M base/trace_event/trace_log.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +6 lines, -0 lines 0 comments Download
M base/trace_event/trace_log.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 8 chunks +56 lines, -3 lines 0 comments Download
A base/trace_event/v2/append_only_proto_message.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +88 lines, -0 lines 0 comments Download
A base/trace_event/v2/append_only_proto_message.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +174 lines, -0 lines 0 comments Download
A base/trace_event/v2/append_only_proto_message_perftest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +129 lines, -0 lines 0 comments Download
A base/trace_event/v2/append_only_proto_message_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +79 lines, -0 lines 0 comments Download
A base/trace_event/v2/proto_utils.h View 1 2 3 4 5 6 7 8 1 chunk +70 lines, -0 lines 0 comments Download
A + base/trace_event/v2/proto_utils.cc View 1 2 3 4 5 6 7 8 1 chunk +7 lines, -5 lines 0 comments Download
A base/trace_event/v2/ring_buffer.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +112 lines, -0 lines 0 comments Download
A base/trace_event/v2/ring_buffer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +215 lines, -0 lines 0 comments Download
A base/trace_event/v2/scattered_buffer.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +74 lines, -0 lines 0 comments Download
A base/trace_event/v2/scattered_buffer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +73 lines, -0 lines 0 comments Download
A base/trace_event/v2/trace_event.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +68 lines, -0 lines 0 comments Download
A base/trace_event/v2/trace_event.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +55 lines, -0 lines 0 comments Download
A base/trace_event/v2/tracing_protoc.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +235 lines, -0 lines 0 comments Download

Messages

Total messages: 5 (5 generated)
Primiano Tucci (use gerrit)
Description was changed from ========== WIP Tracing V2 BUG= ========== to ========== Tracing V2 prototype ...
4 years, 7 months ago (2016-05-25 17:20:36 UTC) #1
Primiano Tucci (use gerrit)
Description was changed from ========== Tracing V2 prototype [NOT FOR REVIEW] This is highly dirty ...
4 years, 7 months ago (2016-05-25 19:16:11 UTC) #2
Primiano Tucci (use gerrit)
Description was changed from ========== Tracing V2 prototype [NOT FOR REVIEW] This is highly dirty ...
4 years, 7 months ago (2016-05-25 19:18:30 UTC) #3
Primiano Tucci (use gerrit)
Description was changed from ========== Tracing V2 prototype [NOT FOR REVIEW] This is highly dirty ...
4 years, 7 months ago (2016-05-25 19:19:22 UTC) #4
Primiano Tucci (use gerrit)
4 years, 6 months ago (2016-05-27 10:33:53 UTC) #5
Description was changed from

==========
Tracing V2 prototype [NOT FOR REVIEW]

This is highly dirty prototype of tracing v2.
It serves as a proof of concept, showing how to base
existing trace macros on protobuf.
Also it serves as a baseline to get some perf numbers.
There are quite some micro-optimizations still possible,
didn't spend too much time.

perf TL;DR
 - simple trace events are marginally slower on arm (in the 10% ballpark)
 and slighly faster on x86.
 - complex trace events are ~2x faster in Tracing V2 \o/

Also the proto generator (tracing_protoc.py) is all hacked up.
kraynov is working on a proper one in C++ based on protoc
plugin infrastructure.

All times are us. from ThreadTicks.

On X86_64
------------------------------------------------------------------------------
Using Tracing V=1, N-args=0    times (for 100 runs): avg:   95, med:  106 
Using Tracing V=2, N-args=0    times (for 100 runs): avg:   93, med:   88 

Using Tracing V=1, N-args=1    times (for 100 runs): avg:   92, med:  105 
Using Tracing V=2, N-args=1    times (for 100 runs): avg:   97, med:   93 

Using Tracing V=1, N-args=2    times (for 100 runs): avg:   93, med:   85 
Using Tracing V=2, N-args=2    times (for 100 runs): avg:  102, med:  102 

Using Tracing V=1, N-args=42    times (for 100 runs): avg:  196, med:  205 
Using Tracing V=2, N-args=42    times (for 100 runs): avg:  125, med:  118 
------------------------------------------------------------------------------

On arm
------------------------------------------------------------------------------
Using Tracing V=1, N-args=0    times (for 100 runs): avg: 2247, med: 2442 
Using Tracing V=2, N-args=0    times (for 100 runs): avg: 2445, med: 2472 

Using Tracing V=1, N-args=1    times (for 100 runs): avg: 2397, med: 2411 
Using Tracing V=2, N-args=1    times (for 100 runs): avg: 2718, med: 2717 

Using Tracing V=1, N-args=2    times (for 100 runs): avg: 2388, med: 2442 
Using Tracing V=2, N-args=2    times (for 100 runs): avg: 2805, med: 2838 

Using Tracing V=1, N-args=42    times (for 100 runs): avg: 6761, med: 6897 
Using Tracing V=2, N-args=42    times (for 100 runs): avg: 3464, med: 3388 
------------------------------------------------------------------------------

BUG=
==========

to

==========
Tracing V2 prototype [NOT FOR REVIEW]

VIEWER DISCRETION IS ADVISED
This is a highly dirty prototype of tracing v2.

It serves as a proof of concept, showing how to rebase
existing trace macros on zero-copy zero-malloc protobuf.
Also it serves as a baseline to get some perf numbers.
There are quite some micro-optimizations still possible,
didn't spend too much time.

perf TL;DR
 - simple trace events are marginally slower on arm (in the 10% ballpark)
 and slighly faster on x86.
 - complex trace events are ~2x faster in Tracing V2 \o/

Also the proto generator (tracing_protoc.py) is all hacked up.
kraynov is working on a proper one in C++ based on protoc
plugin infrastructure.

All times are us. from ThreadTicks.

On X86_64
------------------------------------------------------------------------------
Using Tracing V=1, N-args=0    times (for 100 runs): avg:   95, med:  106 
Using Tracing V=2, N-args=0    times (for 100 runs): avg:   93, med:   88 

Using Tracing V=1, N-args=1    times (for 100 runs): avg:   92, med:  105 
Using Tracing V=2, N-args=1    times (for 100 runs): avg:   97, med:   93 

Using Tracing V=1, N-args=2    times (for 100 runs): avg:   93, med:   85 
Using Tracing V=2, N-args=2    times (for 100 runs): avg:  102, med:  102 

Using Tracing V=1, N-args=42    times (for 100 runs): avg:  196, med:  205 
Using Tracing V=2, N-args=42    times (for 100 runs): avg:  125, med:  118 
------------------------------------------------------------------------------

On arm
------------------------------------------------------------------------------
Using Tracing V=1, N-args=0    times (for 100 runs): avg: 2247, med: 2442 
Using Tracing V=2, N-args=0    times (for 100 runs): avg: 2445, med: 2472 

Using Tracing V=1, N-args=1    times (for 100 runs): avg: 2397, med: 2411 
Using Tracing V=2, N-args=1    times (for 100 runs): avg: 2718, med: 2717 

Using Tracing V=1, N-args=2    times (for 100 runs): avg: 2388, med: 2442 
Using Tracing V=2, N-args=2    times (for 100 runs): avg: 2805, med: 2838 

Using Tracing V=1, N-args=42    times (for 100 runs): avg: 6761, med: 6897 
Using Tracing V=2, N-args=42    times (for 100 runs): avg: 3464, med: 3388 
------------------------------------------------------------------------------

BUG=
==========

Powered by Google App Engine
This is Rietveld 408576698