Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(784)

Side by Side Diff: components/metrics/public/interfaces/call_stack_profile_collector.mojom

Issue 2362493002: Stack sampling profiler: set process and thread information (Closed)
Patch Set: fix JankTimeBomb unit test Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 module metrics.mojom; 5 module metrics.mojom;
6 6
7 import "mojo/common/common_custom_types.mojom"; 7 import "mojo/common/common_custom_types.mojom";
8 8
9 // These structs mirror the corresponding types in base::StackSamplingProfiler. 9 // These structs mirror the corresponding types in base::StackSamplingProfiler.
10 10
11 struct CallStackModule { 11 struct CallStackModule {
12 uint64 base_address; 12 uint64 base_address;
13 string id; 13 string id;
14 mojo.common.mojom.FilePath filename; 14 mojo.common.mojom.FilePath filename;
15 }; 15 };
16 16
17 struct CallStackFrame { 17 struct CallStackFrame {
18 uint64 instruction_pointer; 18 uint64 instruction_pointer;
19 uint64 module_index; 19 uint64 module_index;
20 }; 20 };
21 21
22 struct CallStackProfile { 22 struct CallStackProfile {
23 array<CallStackModule> modules; 23 array<CallStackModule> modules;
24 array<array<CallStackFrame>> samples; 24 array<array<CallStackFrame>> samples;
25 mojo.common.mojom.TimeDelta profile_duration; 25 mojo.common.mojom.TimeDelta profile_duration;
26 mojo.common.mojom.TimeDelta sampling_period; 26 mojo.common.mojom.TimeDelta sampling_period;
27 }; 27 };
28 28
29 enum Process {
30 UNKNOWN_PROCESS,
31 BROWSER_PROCESS,
32 RENDERER_PROCESS,
33 GPU_PROCESS,
34 UTILITY_PROCESS,
35 ZYGOTE_PROCESS,
36 SANDBOX_HELPER_PROCESS,
37 PPAPI_PLUGIN_PROCESS,
38 PPAPI_BROKER_PROCESS,
39 };
40
41 enum Thread {
42 UNKNOWN_THREAD,
43
44 UI_THREAD,
45 FILE_THREAD,
46 FILE_USER_BLOCKING_THREAD,
47 PROCESS_LAUNCHER_THREAD,
48 CACHE_THREAD,
49 IO_THREAD,
50 DB_THREAD,
51
52 GPU_MAIN_THREAD,
53
54 RENDER_THREAD,
55 UTILITY_THREAD,
56 };
57
29 enum Trigger { 58 enum Trigger {
30 UNKNOWN, 59 UNKNOWN,
31 PROCESS_STARTUP, 60 PROCESS_STARTUP,
32 JANKY_TASK, 61 JANKY_TASK,
33 THREAD_HUNG, 62 THREAD_HUNG,
34 }; 63 };
35 64
36 enum SampleOrderingSpec { 65 enum SampleOrderingSpec {
37 MAY_SHUFFLE, 66 MAY_SHUFFLE,
38 PRESERVE_ORDER, 67 PRESERVE_ORDER,
39 }; 68 };
40 69
41 struct CallStackProfileParams { 70 struct CallStackProfileParams {
71 Process process;
72 Thread thread;
42 Trigger trigger; 73 Trigger trigger;
43 SampleOrderingSpec ordering_spec; 74 SampleOrderingSpec ordering_spec;
44 }; 75 };
45 76
46 interface CallStackProfileCollector { 77 interface CallStackProfileCollector {
47 Collect(CallStackProfileParams params, 78 Collect(CallStackProfileParams params,
48 mojo.common.mojom.TimeTicks start_timestamp, 79 mojo.common.mojom.TimeTicks start_timestamp,
49 array<CallStackProfile> profiles); 80 array<CallStackProfile> profiles);
50 }; 81 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698