blob: 8981eadc5982b2ff77f305fee924bcf4412dad45 [file] [log] [blame]
Than McIntosh7e2f4e92015-03-05 11:05:02 -05001
2syntax = "proto2";
3
4option java_package = "com.google.common.logging";
5
Than McIntosh124dd422015-04-29 14:48:32 -04006option optimize_for = LITE_RUNTIME;
7
Than McIntosh7e2f4e92015-03-05 11:05:02 -05008package wireless_android_play_playlog;
9
10// An entry of the map from a stack of addresses to count.
11// Address here is the offset of the instruction address to the load address
12// of the load_module.
13message AddressSample {
14 // List of addresses that represents a call stack.
15 // address[0] is the leaf of the call stack.
16 repeated uint64 address = 1;
17
18 // List of load_module_ids that represents a call stack.
19 // load_module_id[0] is the leaf of the call stack.
20 // This field can be set as empty if all frame share the same load_module_id
21 // with LoadModuleSamples.load_module_id.
22 repeated int32 load_module_id = 2;
23
24 // Total count that the address/address_range is sampled.
25 optional int64 count = 3;
26};
27
28// An entry of the map from address_range to count.
29// [start, end] represents the range of addresses, end->to represents the
30// taken branch that ends the range.
31message RangeSample {
32 // Start instruction address of a range.
33 optional uint64 start = 1;
34
35 // If "end" and "to" is not provided, "start" represents a single instruction.
36 optional uint64 end = 2;
37 optional uint64 to = 3;
38
39 // Total count that the address/address_range is sampled.
40 optional int64 count = 4;
41};
42
43// A load module.
44message LoadModule {
45 // Name of the load_module.
46 optional string name = 1;
47
48 // LoadModule's linker build_id.
49 optional string build_id = 2;
Andreas Gampef9a35612018-01-04 14:22:50 -080050
51 // On-device symbolized entries.
52 repeated string symbol = 3;
Than McIntosh7e2f4e92015-03-05 11:05:02 -050053}
54
55// All samples for a load_module.
56message LoadModuleSamples {
57 optional int32 load_module_id = 1;
58
59 // Map from a stack of addresses to count.
60 repeated AddressSample address_samples = 2;
61
62 // Map from a range triplet (start, end, to) to count.
63 repeated RangeSample range_samples = 3;
64}
65
66// All samples for a program.
67message ProgramSamples {
68 // Name of the program.
69 optional string name = 1;
70
71 // Load module profiles.
72 repeated LoadModuleSamples modules = 2;
73}
74
75// A compressed representation of a perf profile, which contains samples from
76// multiple binaries.
77message AndroidPerfProfile {
78
79 // Type of the hardware event.
80 enum EventType {
81 CYCLE = 0;
82 BRANCH = 1;
83 }
84 // Hardware event used in profiling.
85 optional EventType event = 1;
86
87 // Total number of samples in this profile.
88 // This is the sum of counts of address_samples and range_samples in all
89 // load_module_samples.
90 optional int64 total_samples = 2;
91
92 // Samples for all profiled programs.
93 repeated ProgramSamples programs = 3;
94
95 // List of all load modules.
96 repeated LoadModule load_modules = 4;
Than McIntoshebb94682015-06-10 11:47:01 -040097
98 // is device screen on at point when profile is collected?
99 optional bool display_on = 5;
100
101 // system load at point when profile is collected; corresponds
102 // to first value from /proc/loadavg multiplied by 100 then
103 // converted to int32
104 optional int32 sys_load_average = 6;
Than McIntosh8c7c7db2015-09-03 15:16:04 -0400105
106 // At the point when the profile was collected, was a camera active?
107 optional bool camera_active = 7;
108
109 // At the point when the profile was collected, was the device still booting?
110 optional bool booting = 8;
111
112 // At the point when the profile was collected, was the device plugged into
113 // a charger?
114 optional bool on_charger = 9;
115
116 // CPU utilization measured prior to profile collection (expressed as
117 // 100 minus the idle percentage).
118 optional int32 cpu_utilization = 10;
119
Than McIntoshebb94682015-06-10 11:47:01 -0400120}