1 // The file format generated by report_sample.proto is as below:
2 // LittleEndian32(record_size_0)
3 // message Record(record_0) (having record_size_0 bytes)
4 // LittleEndian32(record_size_1)
5 // message Record(record_1) (having record_size_1 bytes)
7 // LittleEndian32(record_size_N)
8 // message Record(record_N) (having record_size_N bytes)
12 option optimize_for = LITE_RUNTIME;
13 package simpleperf_report_proto;
14 option java_package = "com.android.tools.profiler.proto";
15 option java_outer_classname = "SimpleperfReport";
18 // Wall clock time for current sample.
19 // By default, it is perf clock used in kernel.
20 optional uint64 time = 1;
21 optional int32 thread_id = 2;
23 message CallChainEntry {
24 // virtual address of the instruction in elf file
25 optional uint64 vaddr_in_file = 1;
27 // index of the elf file containing the instruction
28 optional uint32 file_id = 2;
30 // symbol_id refers to the name of the function containing the instruction.
31 // If the function name is found, it is a valid index in the symbol table
32 // of File with 'id' field being file_id, otherwise it is -1.
33 optional int32 symbol_id = 3;
36 repeated CallChainEntry callchain = 3;
38 // Simpleperf generates one sample whenever a specified amount of events happen
39 // while running a monitored thread. So each sample belongs to one event type.
40 // Event type can be cpu-cycles, cpu-clock, sched:sched_switch or other types.
41 // By using '-e' option, we can ask simpleperf to record samples for one or more
43 // Each event type generates samples independently. But recording more event types
44 // will cost more cpu time generating samples, which may affect the monitored threads
45 // and sample lost rate.
46 // event_count field shows the count of the events (belong to the sample's event type)
47 // that have happened since last sample (belong to the sample's event type) for the
48 // same thread. However, if there are lost samples between current sample and previous
49 // sample, the event_count is the count of events from the last lost sample.
50 optional uint64 event_count = 4;
52 // An index in meta_info.event_type, shows which event type current sample belongs to.
53 optional uint32 event_type_id = 5;
56 message LostSituation {
57 optional uint64 sample_count = 1;
58 optional uint64 lost_count = 2;
62 // unique id for each file, starting from 0, and add 1 each time.
63 optional uint32 id = 1;
65 // file path, like /system/lib/libc.so.
66 optional string path = 2;
68 // symbol table of the file.
69 repeated string symbol = 3;
73 optional uint32 thread_id = 1;
74 optional uint32 process_id = 2;
75 optional string thread_name = 3;
79 repeated string event_type = 1;
85 LostSituation lost = 2;
88 MetaInfo meta_info = 5;