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 | 6 |
7 option optimize_for = LITE_RUNTIME; | 7 option optimize_for = LITE_RUNTIME; |
8 | 8 |
9 package browser_watcher; | 9 package browser_watcher; |
10 | 10 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 // specific version and build of the associated debug file. This may be | 42 // specific version and build of the associated debug file. This may be |
43 // the same as code_identifier when the debug_file and code_file are | 43 // the same as code_identifier when the debug_file and code_file are |
44 // identical or when the same identifier is used to identify distinct | 44 // identical or when the same identifier is used to identify distinct |
45 // debug and code files. | 45 // debug and code files. |
46 optional string debug_identifier = 6; | 46 optional string debug_identifier = 6; |
47 | 47 |
48 // A human-readable representation of the code module's version. | 48 // A human-readable representation of the code module's version. |
49 optional string version = 7; | 49 optional string version = 7; |
50 } | 50 } |
51 | 51 |
| 52 // An activity represents information about something of interest on a thread. |
| 53 // Next id: 9 |
| 54 message Activity { |
| 55 enum Type { |
| 56 NONE = 0; |
| 57 ACT_TASK_RUN = 1; |
| 58 ACT_LOCK_ACQUIRE = 2; |
| 59 ACT_EVENT_WAIT = 3; |
| 60 ACT_THREAD_JOIN = 4; |
| 61 ACT_PROCESS_WAIT = 5; |
| 62 } |
| 63 |
| 64 // Identifies the type of the activity (and specifies which fields are |
| 65 // relevant). |
| 66 optional Type type = 1; |
| 67 |
| 68 // Creation time of the activity. |
| 69 optional int64 time = 2; |
| 70 |
| 71 // The address that is the origin of the activity. |
| 72 // Expected for ACT_TASK_* |
| 73 optional uint64 origin_address = 3; |
| 74 |
| 75 // The sequence identifier of the posted task. |
| 76 // Expected for ACT_TASK_* |
| 77 optional uint64 task_sequence_id = 4; |
| 78 |
| 79 // The memory address of the lock object. |
| 80 optional uint64 lock_address = 5; |
| 81 |
| 82 // The memory address of the event object. |
| 83 optional uint64 event_address = 6; |
| 84 |
| 85 // A unique identifier for a thread within a process. |
| 86 optional int64 thread_id = 7; |
| 87 |
| 88 // A unique identifier for a process. |
| 89 optional int64 process_id = 8; |
| 90 } |
| 91 |
52 // The state of a thread. | 92 // The state of a thread. |
| 93 // Next id: 5 |
53 message ThreadState { | 94 message ThreadState { |
| 95 // The name of the thread, up to a maxiumum length. |
54 optional string thread_name = 1; | 96 optional string thread_name = 1; |
55 // TODO(manzagop): flesh out. | 97 |
| 98 // The identifier of the thread. |
| 99 optional int64 thread_id = 2; |
| 100 |
| 101 // The activity stack. |activity_count| specifies the number of activities on |
| 102 // stack and |activities| holds the base of the stack (up to a maximum size). |
| 103 optional int32 activity_count = 3; |
| 104 repeated Activity activities = 4; |
56 } | 105 } |
57 | 106 |
58 // The state of a process. | 107 // The state of a process. |
| 108 // Next id: 4 |
59 message ProcessState { | 109 message ProcessState { |
| 110 // The identifier of the process. |
| 111 optional int64 process_id = 3; |
| 112 |
60 // Note: likely only a subset of modules of interest (e.g. Chromium's own | 113 // Note: likely only a subset of modules of interest (e.g. Chromium's own |
61 // modules). | 114 // modules). |
62 repeated CodeModule modules = 1; | 115 repeated CodeModule modules = 1; |
63 repeated ThreadState threads = 2; | 116 repeated ThreadState threads = 2; |
64 // TODO(manzagop): add experiment state. | 117 // TODO(manzagop): add experiment state. |
65 } | 118 } |
66 | 119 |
67 // A stability report contains information pertaining to the execution of a | 120 // A stability report contains information pertaining to the execution of a |
68 // single logical instance of a "chrome browser". It is comprised of information | 121 // single logical instance of a "chrome browser". It is comprised of information |
69 // about the system state and about the chrome browser's processes. | 122 // about the system state and about the chrome browser's processes. |
70 message StabilityReport { | 123 message StabilityReport { |
71 optional SystemState system_state = 1; | 124 optional SystemState system_state = 1; |
72 // TODO(manzagop): revisit whether a single repeated field should contain all | 125 // TODO(manzagop): revisit whether a single repeated field should contain all |
73 // processes, or whether it's preferable to have separate fields per type. | 126 // processes, or whether it's preferable to have separate fields per type. |
74 // TODO(manzagop): add information about the type of process, pid, process | 127 // TODO(manzagop): add information about the type of process, pid, process |
75 // times (e.g. start time), hierarchical relationships (e.g. parent pid), | 128 // times (e.g. start time), hierarchical relationships (e.g. parent pid), |
76 // command line, etc. | 129 // command line, etc. |
77 repeated ProcessState process_states = 2; | 130 repeated ProcessState process_states = 2; |
78 } | 131 } |
OLD | NEW |