1# Sequence 1 defaults to track for "t1". 2packet { 3 trusted_packet_sequence_id: 1 4 timestamp: 0 5 incremental_state_cleared: true 6 track_descriptor { 7 uuid: 1 8 parent_uuid: 10 9 thread { 10 pid: 5 11 tid: 1 12 thread_name: "t1" 13 } 14 } 15 trace_packet_defaults { 16 track_event_defaults { 17 track_uuid: 1 18 } 19 } 20} 21# Sequence 2 defaults to track for "t2". 22packet { 23 trusted_packet_sequence_id: 2 24 timestamp: 0 25 incremental_state_cleared: true 26 track_descriptor { 27 uuid: 2 28 parent_uuid: 10 29 thread { 30 pid: 5 31 tid: 2 32 thread_name: "t2" 33 } 34 } 35 trace_packet_defaults { 36 track_event_defaults { 37 track_uuid: 2 38 } 39 } 40} 41# Both thread tracks are nested underneath this process track. 42packet { 43 trusted_packet_sequence_id: 1 44 timestamp: 0 45 track_descriptor { 46 uuid: 10 47 process { 48 pid: 5 49 process_name: "p1" 50 } 51 } 52} 53# And we have an async track underneath the process too. 54packet { 55 trusted_packet_sequence_id: 1 56 timestamp: 0 57 track_descriptor { 58 uuid: 11 59 parent_uuid: 10 60 name: "async" 61 } 62} 63 64# ---------------------- 65# Slices 66# ---------------------- 67 68# First we create an event with no relationships just a single event on a track 69# by it self. For both threads and async track. 70# 71# t1 |----------| 72# --------------------- 73# t2 |-----| 74# -------------------- 75# async |-------------| 76 77# Should appear on default track "t1". 78packet { 79 trusted_packet_sequence_id: 1 80 timestamp: 1000 81 track_event { 82 categories: "cat" 83 name: "event1_on_t1_no_relationships" 84 type: 1 85 } 86} 87packet { 88 trusted_packet_sequence_id: 1 89 timestamp: 4000 90 track_event { 91 categories: "cat" 92 name: "event1_on_t1_no_relationships" 93 type: 2 94 } 95} 96# Should appear on default track "t2". 97packet { 98 trusted_packet_sequence_id: 2 99 timestamp: 2000 100 track_event { 101 categories: "cat" 102 name: "event1_on_t2_no_relationships" 103 type: 1 104 } 105} 106packet { 107 trusted_packet_sequence_id: 2 108 timestamp: 3000 109 track_event { 110 categories: "cat" 111 name: "event1_on_t2_no_relationships" 112 type: 2 113 } 114} 115# Should appear on async track. 116packet { 117 trusted_packet_sequence_id: 1 118 timestamp: 1000 119 track_event { 120 track_uuid: 11 121 categories: "cat" 122 name: "event1_on_async_no_relationships" 123 type: 1 124 } 125} 126packet { 127 trusted_packet_sequence_id: 1 128 timestamp: 5000 129 track_event { 130 track_uuid: 11 131 categories: "cat" 132 name: "event1_on_async_no_relationships" 133 type: 2 134 } 135} 136 137# Next we create stacks of various depths for the different tracks. 138# t1 |--------| 139# |---| 140# --------------------------------- 141# t2 |-------------------| 142# |---| |-----| 143# | |-| 144# --------------------------------- 145# async |----------------------| 146# |-----------| 147 148# Should appear on default track "t1". 149packet { 150 trusted_packet_sequence_id: 1 151 timestamp: 6000 152 track_event { 153 categories: "cat" 154 name: "event2_depth_0_on_t1" 155 type: 1 156 } 157} 158packet { 159 trusted_packet_sequence_id: 1 160 timestamp: 7000 161 track_event { 162 categories: "cat" 163 name: "event2_depth_1_on_t1" 164 type: 1 165 } 166} 167packet { 168 trusted_packet_sequence_id: 1 169 timestamp: 8000 170 track_event { 171 categories: "cat" 172 name: "event2_depth_1_on_t1" 173 type: 2 174 } 175} 176packet { 177 trusted_packet_sequence_id: 1 178 timestamp: 9000 179 track_event { 180 categories: "cat" 181 name: "event2_depth_0_on_t1" 182 type: 2 183 } 184} 185 186# Should appear on default track "t2". 187packet { 188 trusted_packet_sequence_id: 1 189 timestamp: 10000 190 track_event { 191 categories: "cat" 192 name: "event2_depth_0_on_t2" 193 type: 1 194 } 195} 196packet { 197 trusted_packet_sequence_id: 1 198 timestamp: 11000 199 track_event { 200 categories: "cat" 201 name: "event2_first_depth_1_on_t2" 202 type: 1 203 } 204} 205packet { 206 trusted_packet_sequence_id: 1 207 timestamp: 12000 208 track_event { 209 categories: "cat" 210 name: "event2_first_depth_2_on_t2" 211 type: 3 212 } 213} 214packet { 215 trusted_packet_sequence_id: 1 216 timestamp: 13000 217 track_event { 218 categories: "cat" 219 name: "event2_first_depth_1_on_t2" 220 type: 2 221 } 222} 223packet { 224 trusted_packet_sequence_id: 1 225 timestamp: 15000 226 track_event { 227 categories: "cat" 228 name: "event2_second_depth_1_on_t2" 229 type: 1 230 } 231} 232packet { 233 trusted_packet_sequence_id: 1 234 timestamp: 16000 235 track_event { 236 categories: "cat" 237 name: "event2_second_depth_2_on_t2" 238 type: 1 239 } 240} 241packet { 242 trusted_packet_sequence_id: 1 243 timestamp: 17000 244 track_event { 245 categories: "cat" 246 name: "event2_second_depth_2_on_t2" 247 type: 2 248 } 249} 250packet { 251 trusted_packet_sequence_id: 1 252 timestamp: 18000 253 track_event { 254 categories: "cat" 255 name: "event2_second_depth_1_on_t2" 256 type: 2 257 } 258} 259packet { 260 trusted_packet_sequence_id: 1 261 timestamp: 19000 262 track_event { 263 categories: "cat" 264 name: "event2_depth_0_on_t2" 265 type: 2 266 } 267} 268# Should appear on async track. 269packet { 270 trusted_packet_sequence_id: 1 271 timestamp: 6000 272 track_event { 273 track_uuid: 11 274 categories: "cat" 275 name: "event2_on_async_depth_0" 276 type: 1 277 } 278} 279packet { 280 trusted_packet_sequence_id: 1 281 timestamp: 9000 282 track_event { 283 track_uuid: 11 284 categories: "cat" 285 name: "event2_on_async_depth_1" 286 type: 1 287 } 288} 289packet { 290 trusted_packet_sequence_id: 1 291 timestamp: 13000 292 track_event { 293 track_uuid: 11 294 categories: "cat" 295 name: "event1_on_async_depth_1" 296 type: 2 297 } 298} 299packet { 300 trusted_packet_sequence_id: 1 301 timestamp: 14000 302 track_event { 303 track_uuid: 11 304 categories: "cat" 305 name: "event2_on_async_depth_0" 306 type: 2 307 } 308} 309