1packet { 2 process_tree { 3 processes { 4 pid: 1 5 ppid: 0 6 cmdline: "init" 7 uid: 0 8 } 9 processes { 10 pid: 2 11 ppid: 1 12 cmdline: "system_server" 13 uid: 1000 14 } 15 } 16} 17 18packet { 19 clock_snapshot { 20 clocks: { 21 clock_id: 6 # BOOTTIME 22 timestamp: 0 23 } 24 clocks: { 25 clock_id: 4 # MONOTONIC_COARSE 26 timestamp: 10 27 } 28 } 29} 30 31packet { 32 trusted_packet_sequence_id: 999 33 previous_packet_dropped: true 34 incremental_state_cleared: true 35 timestamp: 10 36 profile_packet { 37 strings { 38 iid: 1 39 str: "f1" 40 } 41 strings { 42 iid: 2 43 str: "f2" 44 } 45 strings { 46 iid: 3 47 str: "f3" 48 } 49 strings { 50 iid: 4 51 str: "liblib.so" 52 } 53 strings { 54 iid: 5 55 str: "build-id" 56 } 57 frames { 58 iid: 1 59 function_name_id: 1 60 mapping_id: 1 61 rel_pc: 0x1000 62 } 63 frames { 64 iid: 2 65 function_name_id: 2 66 mapping_id: 1 67 rel_pc: 0x2000 68 } 69 frames { 70 iid: 3 71 function_name_id: 3 72 mapping_id: 1 73 rel_pc: 0x3000 74 } 75 frames { 76 iid: 4 77 function_name_id: 2 78 mapping_id: 2 79 rel_pc: 0x4000 80 } 81 callstacks { 82 iid: 1 83 frame_ids: 1 84 frame_ids: 2 85 frame_ids: 3 86 } 87 callstacks { 88 iid: 2 89 frame_ids: 1 90 frame_ids: 4 91 } 92 mappings { 93 iid: 1 94 path_string_ids: 4 95 build_id: 5 96 } 97 mappings { 98 iid: 2 99 path_string_ids: 4 100 build_id: 5 101 } 102 process_dumps { 103 pid: 2 104 samples { 105 callstack_id: 1 106 self_allocated: 2000 107 self_freed: 1000 108 alloc_count: 2 109 free_count: 1 110 } 111 samples { 112 callstack_id: 2 113 self_allocated: 100 114 self_freed: 10 115 alloc_count: 10 116 free_count: 1 117 } 118 } 119 } 120} 121# Add some symbolization packets 122packet { 123 module_symbols { 124 path: "/liblib.so" 125 build_id: "build-id" 126 address_symbols { 127 address: 0x3000 128 lines { 129 function_name: "symbolized f3" 130 source_file_name: "f3.cc" 131 line_number: 33 132 } 133 } 134 address_symbols { 135 address: 0x2000 136 lines { 137 function_name: "symbolized f2" 138 source_file_name: "f2.cc" 139 line_number: 22 140 } 141 } 142 address_symbols { 143 address: 0x4000 144 lines { 145 function_name: "symbolized f2" 146 source_file_name: "f2.cc" 147 line_number: 23 148 } 149 } 150 } 151} 152