• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright 2016 The Chromium Authors
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5syntax = "proto2";
6
7option optimize_for = LITE_RUNTIME;
8option java_package = "org.chromium.components.metrics";
9
10option java_outer_classname = "ExecutionContextProtos";
11
12package metrics;
13
14// Enums corresponding to the Chrome execution context in which data was
15// collected.
16
17// Chrome process type. Derived from content/public/common/process_type.h.
18enum Process {
19  UNKNOWN_PROCESS = 0;
20  BROWSER_PROCESS = 1;
21  RENDERER_PROCESS = 2;
22  GPU_PROCESS = 3;
23  UTILITY_PROCESS = 4;
24  ZYGOTE_PROCESS = 5;
25  SANDBOX_HELPER_PROCESS = 6;
26  PPAPI_PLUGIN_PROCESS = 7;
27  PPAPI_BROKER_PROCESS = 8;
28  NETWORK_SERVICE_PROCESS = 10;
29
30  // A Chrome process not identified by any other enum. Defined for the benefit
31  // of Chrome OS. Do not use for the Chrome sampling profiler; define a new
32  // enum instead.
33  OTHER_PROCESS = 9;
34}
35
36// Chrome thread. This list is not exhaustive.
37enum Thread {
38  UNKNOWN_THREAD = 0;
39
40  // The 'main thread' in various processes. In browser process, this is
41  // sometimes also called the 'ui thread'.
42  MAIN_THREAD = 1;
43
44  FILE_THREAD = 2;                // Deprecated.
45  FILE_USER_BLOCKING_THREAD = 3;  // Deprecated.
46  PROCESS_LAUNCHER_THREAD = 4;    // Deprecated.
47  CACHE_THREAD = 5;               // Deprecated.
48
49  IO_THREAD = 6;
50
51  DB_THREAD = 7;        // Deprecated.
52  GPU_MAIN_THREAD = 8;  // Deprecated.
53  RENDER_THREAD = 9;    // Deprecated.
54  UTILITY_THREAD = 10;  // Deprecated.
55
56  // Compositor thread (can be in both renderer and gpu processes).
57  COMPOSITOR_THREAD = 11;
58
59  // Task scheduler thread.
60  SCHEDULER_WORKER_THREAD = 13;
61
62  COMPOSITOR_TILE_WORKER_THREAD = 14;
63
64  SERVICE_WORKER_THREAD = 15;
65
66  // DedicatedWorker thread in the renderer process.
67  DEDICATED_WORKER_THREAD = 18;
68
69  // Thread pool thread (can be in different Chrome processes).
70  THREAD_POOL_THREAD = 16;
71
72  // GPU memory thread (in renderer process).
73  GPU_MEMORY_THREAD = 17;
74
75  // The thread for Chrome memory tracing (can be in different processes).
76  MEMORY_INFRA_THREAD = 19;
77
78  // Media thread (in renderer process).
79  MEDIA_THREAD = 20;
80
81  // WebRTC threads, e.g. WebRTC_Signaling,WebRTC_Network (in renderer process).
82  WEBRTC_THREAD = 21;
83
84  // DRM threads (in GPU process).
85  DRM_THREAD = 22;
86
87  // Audio device threads (in renderer process), a worker thread type used to
88  // transfer data between the browser and the renderer process.
89  AUDIO_DEVICE_THREAD = 23;
90
91  // Audio threads that are not in the renderer processes.
92  AUDIO_THREAD = 24;
93
94  // Dav1d worker threads (in renderer process), which runs the AV1 codec.
95  DAV1D_WORKER_THREAD = 25;
96
97  // A Chrome thread not identified by any other enum. Defined for the benefit
98  // of Chrome OS. Do not use for the Chrome sampling profiler; define a new
99  // enum instead.
100  OTHER_THREAD = 12;
101}
102
103// Process phases, or where in the lifetime of the process it is such as
104// startup, normal operation, shutdown, etc. These don't necessarily occur in
105// the order defined here so it's fine to add new ones to further segregrate
106// the lifetime of a process.
107enum ProcessPhase {
108  // The browser's main message loop has been started.
109  // Based on histogram Startup.MessageLoopStartTime
110  MAIN_LOOP_START = 0;
111
112  // The beginning of navigation in the first web contents' main frame.
113  // Based on histogram Startup.FirstWebContents.MainNavigationStart
114  MAIN_NAVIGATION_START = 1;
115
116  // The navigation is committed (first bytes received) in the first web
117  // contents' main frame.
118  // Based on histogram Startup.FirstWebContents.MainNavigationFinished
119  MAIN_NAVIGATION_FINISHED = 2;
120
121  // First non-empty paint of the first web contents.
122  // Based on histogram Startup.FirstWebContents.NonEmptyPaint2
123  FIRST_NONEMPTY_PAINT = 3;
124
125  // Process shutdown has begun.
126  SHUTDOWN_START = 4;
127}
128