OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 syntax = "proto2"; | 5 syntax = "proto2"; |
6 option optimize_for = LITE_RUNTIME; | 6 option optimize_for = LITE_RUNTIME; |
7 | 7 |
8 package tracing.proto; | 8 package tracing.proto; |
9 | 9 |
| 10 // Note on field numbers: fields in the range [1, 15] can be encoded using a |
| 11 // single byte preamble. Hence they should be used only for the most commonly |
| 12 // used fields (to save trace size). Use the range 16+ for fields that are not |
| 13 // expected to be used frequently. |
10 message Event { | 14 message Event { |
11 // TODO(kraynov): Make proto definitions. | 15 // Using ASCII codes as enum values, according to the legacy phase arguments |
| 16 // ("ph") of the Trace Event Format doc (https://goo.gl/mSXylN). |
| 17 enum EventType { |
| 18 METADATA = 77; // = 'M'. |
| 19 COMPLETE = 88; // = 'X'. |
| 20 }; |
| 21 |
| 22 optional EventType type = 1; |
| 23 |
| 24 oneof name { |
| 25 int64 name_id = 2; |
| 26 string name_str = 16; |
| 27 } |
| 28 |
| 29 optional int64 category_id = 4; |
| 30 |
| 31 optional uint64 timestamp = 5; |
| 32 optional uint64 thread_timestamp = 6; |
| 33 |
| 34 // TODO(primiano,kraynov): Add args and further fields in next CLs. |
12 } | 35 } |
OLD | NEW |