/
CtfTestTrace.java
424 lines (388 loc) · 11.4 KB
/
CtfTestTrace.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
/*******************************************************************************
* Copyright (c) 2013, 2015 Ericsson, Efficios Inc.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*******************************************************************************/
package org.eclipse.tracecompass.testtraces.ctf;
import java.net.URL;
/**
* Here is the list of the available test traces for the CTF parser.
*
* @author Alexandre Montplaisir
*/
public enum CtfTestTrace {
/**
* Example kernel trace
*
* <pre>
* Trace Size: 13 MB
* Tracer: lttng-modules 2.0.0
* Event count: 695 319
* Kernel version: 3.0.0-16-generic-pae
* Trace length: 10s
* </pre>
*/
KERNEL("/kernel", 695319, 10),
/**
* Another kernel trace
*
* <pre>
* Trace Size: 14 MB
* Tracer: lttng-modules 2.0.0
* Event count: 595 641
* Kernel version: 3.2.0-18-generic
* Trace length: 11s
* </pre>
*/
TRACE2("/trace2", 595641, 11),
/**
* Kernel trace with event contexts: pid, ppid, tid, procname,
* perf_page_fault, perf_major_faults, perf_minor_faults
*
* <pre>
* Trace Size: 56 MB
* Tracer: lttng-modules 2.1.0
* Event count: 714 484
* Kernel version: 3.8.1
* Trace length: 29s
* </pre>
*/
KERNEL_VM("/kernel_vm", 714484, 29),
/**
* Kernel trace with all events enabled. Contains 'inet_sock_local_*' events
* provided by Francis's Giraldeau lttng-modules addons branch to trace TCP
* events. Can be used along with {@link CtfTestTrace#SYNC_DEST} for trace
* synchronization.
*
* <pre>
* Trace Size: 2.4 MB
* Tracer: lttng-modules 2.1.0
* Event count: 110 771
* Kernel version: 3.6.11-1-ARCH
* Trace length: 23s
* </pre>
*/
SYNC_SRC("/synctraces/scp_src", 110771, 23),
/**
* Kernel trace with all events enabled. Contains 'inet_sock_local_*' events
* provided by Francis's Giraldeau lttng-modules addons branch to trace TCP
* events. Can be used along with {@link CtfTestTrace#SYNC_SRC} for trace
* synchronization.
*
* <pre>
* Trace Size: 1.9 MB
* Tracer: lttng-modules 2.1.0
* Event count: 85 729
* Kernel version: 3.6.11-1-ARCH
* Trace length: 17s
* </pre>
*/
SYNC_DEST("/synctraces/scp_dest", 85729, 17),
/**
* LTTng Kernel trace. Contains 'inet_sock_local_*' events provided by
* Francis's Giraldeau lttng-modules addons branch to trace TCP events. Can
* be used along with {@link CtfTestTrace#DJANGO_DB} and
* {@link CtfTestTrace#DJANGO_HTTPD} for trace synchronization.
*
* <pre>
* Trace Size: 33 MB
* Tracer: lttng-modules 2.4.0
* Event count: 754 787
* Kernel version: 3.13.0-24-generic
* Trace length: 15s
* </pre>
*/
DJANGO_CLIENT("/django-benchmark/django-client", 754787, 15),
/**
* LTTng Kernel trace. Contains 'inet_sock_local_*' events provided by
* Francis's Giraldeau lttng-modules addons branch to trace TCP events. Can
* be used along with {@link CtfTestTrace#DJANGO_CLIENT} and
* {@link CtfTestTrace#DJANGO_HTTPD} for trace synchronization.
*
* <pre>
* Trace Size: 28 MB
* Tracer: lttng-modules 2.4.0
* Event count: 692 098
* Kernel version: 3.13.0-24-generic
* Trace length: 14s
* </pre>
*/
DJANGO_DB("/django-benchmark/django-db", 692098, 14),
/**
* LTTng Kernel trace. Contains 'inet_sock_local_*' events provided by
* Francis's Giraldeau lttng-modules addons branch to trace TCP events. Can
* be used along with {@link CtfTestTrace#DJANGO_DB} and
* {@link CtfTestTrace#DJANGO_CLIENT} for trace synchronization.
*
* <pre>
* Trace Size: 31 MB
* Tracer: lttng-modules 2.4.0
* Event count: 779 096
* Kernel version:3.13.0-24-generic
* Trace length: 13s
* </pre>
*/
DJANGO_HTTPD("/django-benchmark/django-httpd", 779096, 13),
/**
* UST trace with lots of lost events
*
* <pre>
* Trace Size: 3.4 MB
* Tracer: lttng-ust 2.3
* Event count: 1 000 000, with 967 700 lost events
* Trace length: 279ms
* </pre>
*/
HELLO_LOST("/hello-lost", 1000000, 0),
/**
* UST trace with lttng-ust-cyg-profile events (aka -finstrument-functions)
*
* <pre>
* Trace Size: 236 KB
* Tracer: lttng-ust 2.3
* Event count: 4 977
* Trace length: 10s
* </pre>
*/
CYG_PROFILE("/cyg-profile/glxgears-cyg-profile", 4977, 10),
/**
* UST trace with lttng-ust-cyg-profile-fast events (no address in
* func_exit)
*
* <pre>
* Trace Size: 184 KB
* Tracer: lttng-ust 2.3
* Event count: 5 161
* Trace length: 11s
* </pre>
*/
CYG_PROFILE_FAST("/cyg-profile/glxgears-cyg-profile-fast", 5161, 11),
/** Trace with non-standard field sizes */
FUNKY_TRACE("/funky_trace", 100002, 0),
/**
* Kernel Trace with 64 bit aligned headers
*
* <pre>
* Trace Size: 1.1 MB
* Tracer: lttng-kernel 2.5
* Event count: 31 556
* Trace length: 6 s
* </pre>
*/
ARM_64_BIT_HEADER("/bug446190", 31556, 6),
/**
* Kernel Trace with flipping endianness
*
* <pre>
* Trace Size: 327 KB
* Tracer: lttng-kernel 2.5
* Event count: 14 310
* Trace length: 41 s
* </pre>
*/
FLIPPING_ENDIANNESS("/flipping-endianness", 14310, 41),
/**
* Example dynamic scope, timestamp in field, empty stream trace
*
* <pre>
* Trace Size: 3.5 MB
* Tracer: generated
* Event count: 101 003
* Kernel version: 4.0.6-1
* Trace length: 1 ms
* </pre>
*/
DYNSCOPE("/ctfwriter_JF8nq3", 101003, 1),
/** Set of many traces, do not call getTrace */
TRACE_EXPERIMENT("/exp", -1, -1),
/**
* UST Trace with Debug Info information (dev version)
*
* <pre>
* Trace Size: 76 KB (including index/)
* Tracer: lttng-ust 2.8~pre
* Event count: 41
* Trace length: ~1 s
* </pre>
*
* @deprecated Some event names were changed between the moment this trace
* was taken, and the final LTTng 2.8 release. Please use the
* updated {@link #DEBUG_INFO3} trace instead.
*/
@Deprecated
DEBUG_INFO("/debuginfo-test-app2", 41, 1),
/**
* UST Trace with Debug Info information, LTTng 2.8-rc2 version
*
* <pre>
* Trace Size: 144 KB (including index/)
* Tracer: lttng-ust 2.8 RC2
* Event count: 291
* Trace length: ~2 s
* </pre>
*
* @deprecated Event fields has_debug_link and has_build_id have been added
* after this trace was taken and before the final release.
*/
@Deprecated
DEBUG_INFO3("/debuginfo-test-app3", 291, 2),
/**
* UST Trace with Debug Info information, final LTTng 2.8 version
*
* <pre>
* Trace Size: 52 KB (including index/)
* Tracer: lttng-ust 2.8
* Event count: 32
* Trace length: ~1 s
* </pre>
*/
DEBUG_INFO4("/debuginfo-test-app4", 32, 1),
/**
* Synthetic UST trace simulating a process doing an exec, with debug
* information events.
*
* <pre>
* Trace Size: 36 KB
* Tracer: Babeltrace CTF writer trying to impersonate lttng-ust 2.8
* Event count: 9
* Trace length: ~1 s
* </pre>
*/
DEBUG_INFO_SYNTH_EXEC("/debuginfo-synth-exec", 9, 1),
/**
* Synthetic UST trace simulating two processes doing a statedump
* simultaneously, with debug information events.
*
* <pre>
* Trace Size: 36 KB
* Tracer: Babeltrace CTF writer trying to impersonate lttng-ust 2.8
* Event count: 12
* Trace length: ~1 s
* </pre>
*/
DEBUG_INFO_SYNTH_TWO_PROCESSES("/debuginfo-synth-two-processes", 12, 1),
/**
* Synthetic UST trace simulating various combination of binaries with build
* IDs and debug links, with debug information events.
*
* <pre>
* Trace Size: 36 KB
* Tracer: Babeltrace CTF writer trying to impersonate lttng-ust 2.8
* Event count: 20
* Trace length: ~1 s
* </pre>
*/
DEBUG_INFO_SYNTH_BUILDID_DEBUGLINK("/debuginfo-synth-buildid-debuglink", 20, 1),
/**
* UST Trace with Memory analysis information
*
* <pre>
* Trace Size: 12 MB
* Tracer: lttng-ust 2.7
* Event count: 328056
* Trace length: ~0.53 s
* </pre>
*/
MEMORY_ANALYSIS("/memory", 328056, 1),
/**
* CTF trace coming from the perf-CTF converter.
*
* CPUs are not defined by standard "cpu_id" CTF data, but by event fields
* called "perf_cpu".
*
* <pre>
* Trace Size: 196 KB
* Tracer: perf
* Event count: 1500
* Trace length: 0.417057183 s
* </pre>
*/
PERF_TASKSET2("/perf-taskset2", 1500, 1),
/**
* Kernel trace tracing the creation of multiple threads
*
* This would typically used to test the vertical scaling of the analysis
* with many threads.
*
* <pre>
* Trace Size: 8.2M
* Tracer: lttng-kernel 2.8~pre
* Event count: 240 644
* Trace length: 0.432 662 358 s
* </pre>
*/
MANY_THREADS("/many-threads", 240644, 1),
/**
* Kernel trace of the "context-switch" experiment, which tests the clock
* offsetting of different traces taken on the same host with different
* clock offsets.
*
* <pre>
* Trace Size: 4.6 MB
* Tracer: lttng-kernel 2.6.3
* Event count: 241 566
* Trace length: ~92 s
* </pre>
*/
CONTEXT_SWITCHES_KERNEL("/context-switches/context-switches-kernel", 241566, 92),
/**
* Userspace trace of the "context-switch" experiment, which tests the clock
* offsetting of different traces taken on the same host with different
* clock offsets.
*
* <pre>
* Trace Size: 136 KB
* Tracer: lttng-ust 2.6.3
* Event count: 3934
* Trace length: ~49 s
* </pre>
*/
CONTEXT_SWITCHES_UST("/context-switches/context-switches-ust", 3934, 49),
/**
* Trace with streams of different start/end times, can be used to test the
* stream intersection operations.
*
* <pre>
* Trace Size: 19 MB
* Tracer: lttng-kernel 2.10.0
* Event count: 534619
* Trace length: ~6 s
* </pre>
*/
UNEVEN_STREAMS("/uneven-streams", 534619, 16);
private final String fTraceName;
private final int fNbEvent;
private int fDuration;
private CtfTestTrace(String traceName, int nbEvent, int time) {
fTraceName = traceName;
fNbEvent = nbEvent;
fDuration = time;
}
public URL getTraceURL() {
URL url = this.getClass().getResource(fTraceName);
if (url == null) {
/* Project configuration problem? */
throw new IllegalStateException("Test trace not found");
}
return url;
}
/**
* Get the number of events for a trace
*
* @return the number of events, -1 if irrelevant
*/
public int getNbEvents() {
return fNbEvent;
}
/**
* Get the duration in seconds of a trace
*
* @return the duration in seconds of a trace, -1 if irrelevant
*/
public int getDuration() {
return fDuration;
}
}