| Yabin Cui | 42c8dc6 | 2016-06-03 15:06:53 -0700 | [diff] [blame^] | 1 | // The file format generated by report_sample.proto is as below: |
| 2 | // LittleEndian32(record_size_0) |
| 3 | // message Record(record_0) (having record_size_0 bytes) |
| 4 | // LittleEndian32(record_size_1) |
| 5 | // message Record(record_1) (having record_size_1 bytes) |
| 6 | // ... |
| 7 | // LittleEndian32(record_size_N) |
| 8 | // message Record(record_N) (having record_size_N bytes) |
| 9 | // LittleEndian32(0) |
| 10 | |
| 11 | syntax = "proto2"; |
| 12 | option optimize_for = LITE_RUNTIME; |
| 13 | package simpleperf_report_proto; |
| 14 | |
| 15 | message Sample { |
| 16 | optional uint64 time = 1; |
| 17 | |
| 18 | message CallChainEntry { |
| 19 | optional uint64 ip = 1; |
| 20 | optional string symbol = 2; |
| 21 | optional string file = 3; |
| 22 | } |
| 23 | |
| 24 | repeated CallChainEntry callchain = 2; |
| 25 | } |
| 26 | |
| 27 | message Record { |
| 28 | enum Type { |
| 29 | UNKOWN = 1; |
| 30 | SAMPLE = 2; |
| 31 | } |
| 32 | |
| 33 | // Identifies which field is filled in. |
| 34 | optional Type type = 1; |
| 35 | |
| 36 | // One of the following will be filled in. |
| 37 | optional Sample sample = 2; |
| 38 | } |