1/*
2 * Copyright (C) 2020 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17syntax = "proto2";
18
19package perfetto.protos;
20
21// Describes the attributes for a Chrome process. Must be paired with a
22// ProcessDescriptor in the same TrackDescriptor.
23//
24// Next id: 6.
25message ChromeProcessDescriptor {
26  // See chromium's content::ProcessType.
27  enum ProcessType {
28    PROCESS_UNSPECIFIED = 0;
29    PROCESS_BROWSER = 1;
30    PROCESS_RENDERER = 2;
31    PROCESS_UTILITY = 3;
32    PROCESS_ZYGOTE = 4;
33    PROCESS_SANDBOX_HELPER = 5;
34    PROCESS_GPU = 6;
35    PROCESS_PPAPI_PLUGIN = 7;
36    PROCESS_PPAPI_BROKER = 8;
37    PROCESS_SERVICE_NETWORK = 9;
38    PROCESS_SERVICE_TRACING = 10;
39    PROCESS_SERVICE_STORAGE = 11;
40    PROCESS_SERVICE_AUDIO = 12;
41    PROCESS_SERVICE_DATA_DECODER = 13;
42    PROCESS_SERVICE_UTIL_WIN = 14;
43    PROCESS_SERVICE_PROXY_RESOLVER = 15;
44    PROCESS_SERVICE_CDM = 16;
45    PROCESS_SERVICE_VIDEO_CAPTURE = 17;
46    PROCESS_SERVICE_UNZIPPER = 18;
47    PROCESS_SERVICE_MIRRORING = 19;
48    PROCESS_SERVICE_FILEPATCHER = 20;
49    PROCESS_SERVICE_TTS = 21;
50    PROCESS_SERVICE_PRINTING = 22;
51    PROCESS_SERVICE_QUARANTINE = 23;
52    PROCESS_SERVICE_CROS_LOCALSEARCH = 24;
53    PROCESS_SERVICE_CROS_ASSISTANT_AUDIO_DECODER = 25;
54    PROCESS_SERVICE_FILEUTIL = 26;
55    PROCESS_SERVICE_PRINTCOMPOSITOR = 27;
56    PROCESS_SERVICE_PAINTPREVIEW = 28;
57    PROCESS_SERVICE_SPEECHRECOGNITION = 29;
58    PROCESS_SERVICE_XRDEVICE = 30;
59    PROCESS_SERVICE_READICON = 31;
60    PROCESS_SERVICE_LANGUAGEDETECTION = 32;
61    PROCESS_SERVICE_SHARING = 33;
62    PROCESS_SERVICE_MEDIAPARSER = 34;
63    PROCESS_SERVICE_QRCODEGENERATOR = 35;
64    PROCESS_SERVICE_PROFILEIMPORT = 36;
65    PROCESS_SERVICE_IME = 37;
66    PROCESS_SERVICE_RECORDING = 38;
67    PROCESS_SERVICE_SHAPEDETECTION = 39;
68  }
69  optional ProcessType process_type = 1;
70  optional int32 process_priority = 2;
71
72  // To support old UI. New UI should determine default sorting by process_type.
73  optional int32 legacy_sort_index = 3;
74
75  // Name of the hosting app for WebView. Used to match renderer processes to
76  // their hosting apps.
77  optional string host_app_package_name = 4;
78
79  // The ID to link crashes to trace.
80  // Notes:
81  // * The ID is per process. So, each trace may contain many IDs, and you need
82  //   to look for the ID from crashed process to find the crash report.
83  // * Having a "chrome-trace-id" in crash doesn't necessarily mean we can
84  //   get an uploaded trace, since uploads could have failed.
85  // * On the other hand, if there was a crash during the session and trace was
86  //   uploaded, it is very likely to find a crash report with the trace ID.
87  // * This is not crash ID or trace ID. It is just a random 64-bit number
88  //   recorded in both traces and crashes. It is possible to have collisions,
89  //   though very rare.
90  optional uint64 crash_trace_id = 5;
91}
92