Chromium Code Reviews| OLD | NEW | 
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 // Call stack sample data for a given profiling session. | |
| 6 | |
| 7 syntax = "proto2"; | |
| 8 | |
| 9 option optimize_for = LITE_RUNTIME; | |
| 10 | |
| 11 package metrics; | |
| 12 | |
| 13 // Next tag: 5 | |
| 14 message CallStackProfile { | |
| 15 | |
| 
 
Ilya Sherman
2015/03/17 04:54:35
nit: Please replace this newline with documentatio
 
Mike Wittman
2015/03/18 00:54:28
Done.
 
 | |
| 16 message Sample { | |
| 17 // The callstack. Sample.entries[0] represents the call on the top of the | |
| 18 // stack. | |
| 19 repeated CallStackEntry entry = 1; | |
| 
 
Ilya Sherman
2015/03/17 04:54:35
nit: Please leave a blank line after this one.
 
Mike Wittman
2015/03/18 00:54:27
Done.
 
 | |
| 20 // Number of times this stack signature occurs. | |
| 21 optional int64 count = 2; | |
| 22 } | |
| 23 | |
| 24 // The callstack and counts. | |
| 25 repeated Sample sample = 1; | |
| 
 
Ilya Sherman
2015/03/17 04:54:35
nit: Please leave a blank line here.
 
Mike Wittman
2015/03/18 00:54:27
Done.
 
 | |
| 26 // List of module ids found in this sample. | |
| 27 repeated ModuleIdentifier module_id = 2; | |
| 28 | |
| 29 // Duration of this profile. | |
| 30 optional int32 profile_duration_ms = 3; | |
| 
 
Ilya Sherman
2015/03/17 04:54:35
nit: Please leave a blank line here.
 
Mike Wittman
2015/03/18 00:54:28
Done.
 
 | |
| 31 // Time between samples. | |
| 32 optional int32 sampling_period_ms = 4; | |
| 33 } | |
| 34 | |
| 35 // Describes an entry in the callstack. | |
| 36 message CallStackEntry { | |
| 37 // Instruction pointer subtracted by module base. | |
| 38 optional uint64 address = 1; | |
| 
 
Ilya Sherman
2015/03/17 04:54:35
nit: Please leave a blank line here.
 
Mike Wittman
2015/03/18 00:54:28
Done.
 
 | |
| 39 // Index to the module identifier in |module_ids| of CallStackProfile. | |
| 40 optional int32 module_id_index = 2; | |
| 41 } | |
| 
 
Ilya Sherman
2015/03/17 04:54:35
Why are some of the messages declared as inner mes
 
Mike Wittman
2015/03/18 00:54:28
In the server-side review (cr/87065567) Sample was
 
Ilya Sherman
2015/03/19 00:10:19
That's fair, but it doesn't look like the reviewer
 
Ilya Sherman
2015/03/19 02:01:16
Bump.
 
Mike Wittman
2015/03/19 21:51:18
Sorry, this slipped my mind. Made the messages int
 
 | |
| 42 | |
| 43 // Uniquely identifies a module. | |
| 44 message ModuleIdentifier { | |
| 45 // A hash that uniquely identifies a particular program version with high | |
| 46 // probability. This is parsed from headers of the loaded module. | |
| 47 // For binaries generated by GNU tools: | |
| 48 // Contents of the .note.gnu.build-id field. | |
| 49 // On Windows: | |
| 50 // GUID + AGE in the debug image headers of a module. | |
| 51 optional bytes build_id = 1; | |
| 
 
Ilya Sherman
2015/03/17 04:54:35
nit: Please leave a blank line here.
 
Ilya Sherman
2015/03/17 04:54:35
"bytes" fields are generally discouraged, same as
 
Mike Wittman
2015/03/18 00:54:28
Done.
 
Mike Wittman
2015/03/18 00:54:28
Yes. This was addressed in the server-side review:
 
 | |
| 52 // MD5Sum Prefix of the module name. This is the same hashing scheme as used | |
| 53 // to hash UMA histogram names. | |
| 54 optional fixed64 name_md5_prefix = 2; | |
| 55 } | |
| OLD | NEW |