| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 // Call stack sample data for a given profiling session. | 5 // Call stack sample data for a given profiling session. |
| 6 | 6 |
| 7 syntax = "proto2"; | 7 syntax = "proto2"; |
| 8 | 8 |
| 9 option optimize_for = LITE_RUNTIME; | 9 option optimize_for = LITE_RUNTIME; |
| 10 option java_outer_classname = "CallStackProfileProtos"; | 10 option java_outer_classname = "CallStackProfileProtos"; |
| 11 option java_package = "org.chromium.components.metrics"; | 11 option java_package = "org.chromium.components.metrics"; |
| 12 | 12 |
| 13 package metrics; | 13 package metrics; |
| 14 | 14 |
| 15 import "execution_context.proto"; |
| 16 |
| 15 // Next tag: 5 | 17 // Next tag: 5 |
| 16 message CallStackProfile { | 18 message CallStackProfile { |
| 17 // Describes an entry in the callstack. | 19 // Describes an entry in the callstack. |
| 18 message Entry { | 20 message Entry { |
| 19 // Instruction pointer subtracted by module base. | 21 // Instruction pointer subtracted by module base. |
| 20 optional uint64 address = 1; | 22 optional uint64 address = 1; |
| 21 | 23 |
| 22 // Index to the module identifier in |module_ids| of CallStackProfile. | 24 // Index to the module identifier in |module_ids| of CallStackProfile. |
| 23 optional int32 module_id_index = 2; | 25 optional int32 module_id_index = 2; |
| 24 } | 26 } |
| 25 | 27 |
| 26 // A sample consisting of one or more callstacks with the same stack frames | 28 // A sample consisting of one or more callstacks with the same stack frames |
| 27 // and instruction pointers. | 29 // and instruction pointers. |
| 28 message Sample { | 30 message Sample { |
| 29 // The callstack. Sample.entries[0] represents the call on the top of the | 31 // The callstack. Sample.entries[0] represents the call on the top of the |
| 30 // stack. | 32 // stack. |
| 31 repeated Entry entry = 1; | 33 repeated Entry entry = 1; |
| 32 | 34 |
| 33 // Number of times this stack signature occurs. | 35 // Number of times this stack signature occurs. |
| 34 optional int64 count = 2; | 36 optional int64 count = 2; |
| 37 |
| 38 // This repeating field indicates the current phase of the system such as |
| 39 // whether it is in startup, general operation, or shutdown. It is a full |
| 40 // list with the first sample and after that each indicates only the new |
| 41 // phases that are achieved. |
| 42 repeated ProcessPhase process_phase = 3; |
| 35 } | 43 } |
| 36 | 44 |
| 37 // Uniquely identifies a module. | 45 // Uniquely identifies a module. |
| 38 message ModuleIdentifier { | 46 message ModuleIdentifier { |
| 39 // A hash that uniquely identifies a particular program version with high | 47 // A hash that uniquely identifies a particular program version with high |
| 40 // probability. This is parsed from headers of the loaded module. | 48 // probability. This is parsed from headers of the loaded module. |
| 41 // For binaries generated by GNU tools: | 49 // For binaries generated by GNU tools: |
| 42 // Contents of the .note.gnu.build-id field. | 50 // Contents of the .note.gnu.build-id field. |
| 43 // On Windows: | 51 // On Windows: |
| 44 // GUID + AGE in the debug image headers of a module. | 52 // GUID + AGE in the debug image headers of a module. |
| 45 optional string build_id = 1; | 53 optional string build_id = 1; |
| 46 | 54 |
| 47 // MD5Sum Prefix of the module name. This is the same hashing scheme as used | 55 // MD5Sum Prefix of the module name. This is the same hashing scheme as used |
| 48 // to hash UMA histogram names. | 56 // to hash UMA histogram names. |
| 49 optional fixed64 name_md5_prefix = 2; | 57 optional fixed64 name_md5_prefix = 2; |
| 50 } | 58 } |
| 51 | 59 |
| 52 // The callstack and counts. | 60 // The callstack and counts. |
| 53 repeated Sample sample = 1; | 61 repeated Sample sample = 1; |
| 54 | 62 |
| 55 // List of module ids found in this sample. | 63 // List of module ids found in this sample. |
| 56 repeated ModuleIdentifier module_id = 2; | 64 repeated ModuleIdentifier module_id = 2; |
| 57 | 65 |
| 58 // Duration of this profile. | 66 // Duration of this profile. |
| 59 optional int32 profile_duration_ms = 3; | 67 optional int32 profile_duration_ms = 3; |
| 60 | 68 |
| 61 // Time between samples. | 69 // Time between samples. |
| 62 optional int32 sampling_period_ms = 4; | 70 optional int32 sampling_period_ms = 4; |
| 63 } | 71 } |
| OLD | NEW |