File: stability_report.proto

package info (click to toggle)
chromium-browser 57.0.2987.98-1~deb8u1
  • links: PTS, VCS
  • area: main
  • in suites: jessie
  • size: 2,637,852 kB
  • ctags: 2,544,394
  • sloc: cpp: 12,815,961; ansic: 3,676,222; python: 1,147,112; asm: 526,608; java: 523,212; xml: 286,794; perl: 92,654; sh: 86,408; objc: 73,271; makefile: 27,698; cs: 18,487; yacc: 13,031; tcl: 12,957; pascal: 4,875; ml: 4,716; lex: 3,904; sql: 3,862; ruby: 1,982; lisp: 1,508; php: 1,368; exp: 404; awk: 325; csh: 117; jsp: 39; sed: 37
file content (162 lines) | stat: -rw-r--r-- 5,240 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

syntax = "proto2";

option optimize_for = LITE_RUNTIME;

package browser_watcher;

// The state of the system on which Chrome is running (shutting down, battery
// level, load, etc.).
// Next id: 1
message SystemState {
  // TODO(manzagop): flesh out.
}

// Next id: 8
message CodeModule {
  // The base address of this code module as it was loaded by the process.
  optional int64 base_address = 1;

  // The size of the code module.
  optional int64 size = 2;

  // The path or file name that the code module was loaded from.
  optional string code_file = 3;

  // An identifying string used to discriminate between multiple versions and
  // builds of the same code module.  This may contain a uuid, timestamp,
  // version number, or any combination of this or other information, in an
  // implementation-defined format.
  optional string code_identifier = 4;

  // The filename containing debugging information associated with the code
  // module.  If debugging information is stored in a file separate from the
  // code module itself (as is the case when .pdb or .dSYM files are used),
  // this will be different from code_file.  If debugging information is
  // stored in the code module itself (possibly prior to stripping), this
  // will be the same as code_file.
  optional string debug_file = 5;

  // An identifying string similar to code_identifier, but identifies a
  // specific version and build of the associated debug file.  This may be
  // the same as code_identifier when the debug_file and code_file are
  // identical or when the same identifier is used to identify distinct
  // debug and code files.
  optional string debug_identifier = 6;

  // A human-readable representation of the code module's version.
  optional string version = 7;
}

// A typed value holds values of interest or references to such values.
// Next id: 9
message TypedValue {
  // A reference to a value of interest.
  message Reference {
    optional uint64 address = 1;
    optional int64 size = 2;
  }

  oneof value {
    bytes bytes_value = 1;
    Reference bytes_reference = 2;
    string string_value = 3;
    Reference string_reference = 4;
    string char_value = 5;
    bool bool_value = 6;
    int64 signed_value = 7;
    uint64 unsigned_value = 8;
  }
}

// An activity represents information about something of interest on a thread.
// Next id: 10
message Activity {
  enum Type {
    UNKNOWN = 0;
    ACT_TASK_RUN = 1;
    ACT_LOCK_ACQUIRE = 2;
    ACT_EVENT_WAIT = 3;
    ACT_THREAD_JOIN = 4;
    ACT_PROCESS_WAIT = 5;
  }

  // Identifies the type of the activity (and specifies which fields are
  // relevant).
  optional Type type = 1;

  // Creation time of the activity.
  optional int64 time = 2;

  // The address that is the origin of the activity.
  // Expected for ACT_TASK_*
  optional uint64 origin_address = 3;

  // The sequence identifier of the posted task.
  // Expected for ACT_TASK_*
  optional uint64 task_sequence_id = 4;

  // The memory address of the lock object.
  optional uint64 lock_address = 5;

  // The memory address of the event object.
  optional uint64 event_address = 6;

  // A unique identifier for a thread within a process.
  optional int64 thread_id = 7;

  // A unique identifier for a process.
  optional int64 process_id = 8;

  // A key-value store.
  map<string, TypedValue> user_data = 9;
}

// The state of a thread.
// Next id: 5
message ThreadState {
  // The name of the thread, up to a maxiumum length.
  optional string thread_name = 1;

  // The identifier of the thread.
  optional int64 thread_id = 2;

  // The activity stack. |activity_count| specifies the number of activities on
  // stack and |activities| holds the base of the stack (up to a maximum size).
  optional int32 activity_count = 3;
  repeated Activity activities = 4;
}

// The state of a process.
// Next id: 4
message ProcessState {
  // The identifier of the process.
  optional int64 process_id = 3;

  // Note: likely only a subset of modules of interest (e.g. Chromium's own
  // modules).
  repeated CodeModule modules = 1;
  repeated ThreadState threads = 2;
  // TODO(manzagop): add experiment state.
}

// A stability report contains information pertaining to the execution of a
// single logical instance of a "chrome browser". It is comprised of information
// about the system state and about the chrome browser's processes.
// Next id: 5
message StabilityReport {
  optional SystemState system_state = 1;
  // TODO(manzagop): revisit whether a single repeated field should contain all
  //     processes, or whether it's preferable to have separate fields per type.
  // TODO(manzagop): add information about the type of process, pid, process
  //     times (e.g. start time), hierarchical relationships (e.g. parent pid),
  //     command line, etc.
  repeated ProcessState process_states = 2;
  // TODO(manzagop): if/when reports contain multiple processes, attribute and
  //     relocate these to their process (and perhaps thread).
  repeated string log_messages = 3;
  map<string, TypedValue> global_data = 4;
}