Commit | Line | Data |
---|---|---|
7411cd67 | 1 | /******************************************************************************* |
ed902a2b | 2 | * Copyright (c) 2014, 2015 Ericsson |
7411cd67 AM |
3 | * |
4 | * All rights reserved. This program and the accompanying materials are | |
5 | * made available under the terms of the Eclipse Public License v1.0 which | |
6 | * accompanies this distribution, and is available at | |
7 | * http://www.eclipse.org/legal/epl-v10.html | |
8 | * | |
9 | * Contributors: | |
10 | * Alexandre Montplaisir - Initial API and implementation | |
11 | ******************************************************************************/ | |
12 | ||
e363eae1 | 13 | package org.eclipse.tracecompass.analysis.os.linux.core.trace; |
7411cd67 AM |
14 | |
15 | import java.util.Collection; | |
051db42f | 16 | import java.util.Collections; |
7411cd67 | 17 | |
bd0e2f70 AM |
18 | import org.eclipse.jdt.annotation.Nullable; |
19 | ||
7411cd67 AM |
20 | /** |
21 | * Interface to define "concepts" present in the Linux kernel (represented by | |
22 | * its tracepoints), that can then be exposed by different tracers under | |
23 | * different names. | |
24 | * | |
25 | * @author Alexandre Montplaisir | |
b89d8ade | 26 | * @author Matthew Khouzam - Javadoc |
7411cd67 | 27 | */ |
7411cd67 AM |
28 | public interface IKernelAnalysisEventLayout { |
29 | ||
30 | // ------------------------------------------------------------------------ | |
31 | // Common definitions | |
32 | // ------------------------------------------------------------------------ | |
33 | ||
34 | /** | |
35 | * Whenever a process appears for the first time in a trace, we assume it | |
36 | * starts inside this system call. (The syscall prefix is defined by the | |
37 | * implementer of this interface.) | |
38 | * | |
39 | * TODO Change to a default method with Java 8? | |
40 | */ | |
41 | String INITIAL_SYSCALL_NAME = "clone"; //$NON-NLS-1$ | |
42 | ||
43 | // ------------------------------------------------------------------------ | |
44 | // Event names | |
45 | // ------------------------------------------------------------------------ | |
46 | ||
b89d8ade MK |
47 | /** |
48 | * The system has just entered an interrupt handler or interrupt service | |
49 | * routine. On some systems, this is known as the first level interrupt | |
50 | * handler. | |
51 | * | |
52 | * @return the event name | |
53 | */ | |
7411cd67 | 54 | String eventIrqHandlerEntry(); |
b89d8ade MK |
55 | |
56 | /** | |
57 | * The system will soon return from an interrupt handler or interrupt | |
58 | * service routine. | |
59 | * | |
60 | * @return the event name | |
61 | */ | |
7411cd67 | 62 | String eventIrqHandlerExit(); |
b89d8ade MK |
63 | |
64 | /** | |
65 | * Whenever a system call is about to return to userspace, or a hardware | |
66 | * interrupt handler exits, any 'software interrupts' which are marked | |
67 | * pending (usually by hardware interrupts) are run. Much of the real | |
68 | * interrupt handling work is done here. The soft IRQ is also known as a | |
69 | * deferred IRQ in windows. An event identifying as this needs to occur as | |
70 | * the system is beginning to process the interrupt. | |
71 | * | |
72 | * @return the event name | |
73 | */ | |
7411cd67 | 74 | String eventSoftIrqEntry(); |
b89d8ade MK |
75 | |
76 | /** | |
77 | * Whenever a system call is about to return to userspace, or a hardware | |
78 | * interrupt handler exits, any 'software interrupts' which are marked | |
79 | * pending (usually by hardware interrupts) are run Much of the real | |
80 | * interrupt handling work is done here. The soft IRQ is also known as a | |
81 | * deferred IRQ in windows. An event identifying as this needs to occur as | |
82 | * the system is returning from the interrupt. | |
83 | * | |
84 | * @return the event name | |
85 | */ | |
7411cd67 | 86 | String eventSoftIrqExit(); |
b89d8ade MK |
87 | |
88 | /** | |
89 | * Whenever a system call is about to return to userspace, or a hardware | |
90 | * interrupt handler exits, any 'software interrupts' which are marked | |
91 | * pending (usually by hardware interrupts) are run Much of the real | |
92 | * interrupt handling work is done here. The soft IRQ is also known as a | |
93 | * deferred IRQ in windows. An event identifying as this needs to occur as | |
94 | * the system is signaling the need to enter the interrupt. | |
95 | * | |
96 | * @return the event name | |
97 | */ | |
7411cd67 | 98 | String eventSoftIrqRaise(); |
b89d8ade MK |
99 | |
100 | /** | |
101 | * The scheduler will call a scheduler switch event when it is removing a | |
102 | * task from a cpu and placing another one in its place. Which task and when | |
103 | * depend on the scheduling strategy and the task priorities. This is a | |
104 | * context switch. | |
105 | * | |
106 | * @return the event name | |
107 | */ | |
7411cd67 | 108 | String eventSchedSwitch(); |
dbc7991d | 109 | |
b89d8ade MK |
110 | /** |
111 | * sched_PI_setprio is a tracepoint called often when the schedulder | |
112 | * priorities for a given task changes. | |
113 | * | |
114 | * @return the event name | |
115 | * @since 1.0 | |
116 | */ | |
3bf563da | 117 | String eventSchedPiSetprio(); |
dbc7991d | 118 | |
b89d8ade MK |
119 | /** |
120 | * Scheduler is waking up a task. this happens before it is executed, and | |
121 | * the data is loaded in memory if needed. | |
122 | * | |
123 | * @return the event names, as there are often several different ways to | |
124 | * wake up | |
125 | */ | |
7411cd67 | 126 | Collection<String> eventsSchedWakeup(); |
b89d8ade MK |
127 | |
128 | /** | |
129 | * Scheduler just forked a process, that means it has duplicated the program | |
130 | * and assigned it a different process ID. This event is often followed by | |
131 | * an {@link #eventSchedProcessExec()}. In windows, this is part of the | |
132 | * "spawn" process. | |
133 | * | |
134 | * @return the event name | |
135 | */ | |
7411cd67 | 136 | String eventSchedProcessFork(); |
b89d8ade MK |
137 | |
138 | /** | |
139 | * The process has finished running and the scheduler takes its TID back. | |
140 | * | |
141 | * @return the event name | |
142 | */ | |
7411cd67 | 143 | String eventSchedProcessExit(); |
b89d8ade MK |
144 | |
145 | /** | |
146 | * The process free tracepoint is called when a process has finished running | |
147 | * and the scheduler retrieves it's process ID. | |
148 | * | |
149 | * @return the event name | |
150 | */ | |
7411cd67 | 151 | String eventSchedProcessFree(); |
b89d8ade MK |
152 | |
153 | /** | |
154 | * Optional event used by some tracers to deliver an initial state. | |
155 | * | |
156 | * @return the event name | |
157 | */ | |
bd0e2f70 | 158 | @Nullable String eventStatedumpProcessState(); |
b89d8ade MK |
159 | |
160 | /** | |
161 | * System call entry prefix, something like "sys_open" or just "sys". | |
162 | * | |
163 | * @return the event name | |
164 | */ | |
7411cd67 | 165 | String eventSyscallEntryPrefix(); |
b89d8ade MK |
166 | |
167 | /** | |
168 | * System call compatibility layer entry prefix, something like | |
169 | * "compat_sys". | |
170 | * | |
171 | * @return the event name | |
172 | */ | |
7411cd67 | 173 | String eventCompatSyscallEntryPrefix(); |
b89d8ade MK |
174 | |
175 | /** | |
176 | * System call exit prefix, something like "sys_exit". | |
177 | * | |
178 | * @return the event name | |
179 | */ | |
acba092b | 180 | String eventSyscallExitPrefix(); |
7411cd67 | 181 | |
01f2a507 AM |
182 | /** |
183 | * System call compatibility layer exit prefix, something like | |
184 | * "compat_syscall_exit". | |
185 | * | |
186 | * @return the event name | |
187 | * @since 2.0 | |
188 | */ | |
189 | String eventCompatSyscallExitPrefix(); | |
190 | ||
b89d8ade MK |
191 | /** |
192 | * The scheduler replaced the current process image with a new one. The | |
193 | * process should also be renamed at this point. In windows, this is part of | |
194 | * the spawn process as well as fork. | |
195 | * | |
196 | * @return the event name | |
197 | * | |
198 | * @since 2.0 | |
199 | */ | |
fb3a499b FG |
200 | String eventSchedProcessExec(); |
201 | ||
b89d8ade MK |
202 | /** |
203 | * The scheduler calls wakeup on a sleeping process. The process will | |
204 | * probably soon be scheduled in. | |
205 | * | |
206 | * @return the event name | |
207 | * | |
208 | * @since 2.0 | |
209 | */ | |
fb3a499b FG |
210 | String eventSchedProcessWakeup(); |
211 | ||
b89d8ade MK |
212 | /** |
213 | * The scheduler calls wakeup on a sleeping process. The process will | |
214 | * probably soon be scheduled in. The new wakeup knows who triggered the | |
215 | * wakeup. | |
216 | * | |
217 | * @return the event name | |
218 | * | |
219 | * @since 2.0 | |
220 | */ | |
fb3a499b FG |
221 | String eventSchedProcessWakeupNew(); |
222 | ||
6ef6533e AM |
223 | /** |
224 | * Event called when waking a task; this event is guaranteed to be called | |
225 | * from the waking context. | |
226 | * | |
227 | * @return The name of the event | |
5e479c4f | 228 | * @since 2.2 |
6ef6533e AM |
229 | */ |
230 | default String eventSchedProcessWaking() { | |
231 | return "sched_waking"; //$NON-NLS-1$ | |
232 | } | |
233 | ||
a8b8de05 BH |
234 | /** |
235 | * Starting the high resolution timer | |
236 | * <p> | |
237 | * In Linux, High resolution timers are used in the following: | |
238 | * <ul> | |
239 | * <li>nanosleep</li> | |
240 | * <li>itimers</li> | |
241 | * <li>posix timers</li> | |
242 | * </ul> | |
243 | * | |
244 | * @return the event name | |
245 | * | |
246 | * @since 2.0 | |
247 | */ | |
248 | String eventHRTimerStart(); | |
249 | ||
250 | /** | |
251 | * Canceling the high resolution timer | |
252 | * <p> | |
253 | * In Linux, High resolution timers are used in the following: | |
254 | * <ul> | |
255 | * <li>nanosleep</li> | |
256 | * <li>itimers</li> | |
257 | * <li>posix timers</li> | |
258 | * </ul> | |
259 | * | |
260 | * @return the event name | |
261 | * | |
262 | * @since 2.0 | |
263 | */ | |
264 | String eventHRTimerCancel(); | |
265 | ||
b89d8ade MK |
266 | /** |
267 | * Entering the high resolution timer expired handler. | |
268 | * <p> | |
269 | * In Linux, High resolution timers are used in the following: | |
270 | * <ul> | |
271 | * <li>nanosleep</li> | |
272 | * <li>itimers</li> | |
273 | * <li>posix timers</li> | |
274 | * </ul> | |
275 | * | |
276 | * @return the event name | |
277 | * | |
278 | * @since 2.0 | |
279 | */ | |
fb3a499b FG |
280 | String eventHRTimerExpireEntry(); |
281 | ||
b89d8ade MK |
282 | /** |
283 | * Exiting the high resolution timer expired handler. | |
284 | * <p> | |
285 | * In Linux, High resolution timers are used in the following: | |
286 | * <ul> | |
287 | * <li>nanosleep</li> | |
288 | * <li>itimers</li> | |
289 | * <li>posix timers</li> | |
290 | * </ul> | |
291 | * | |
292 | * @return the event name | |
293 | * | |
294 | * @since 2.0 | |
295 | */ | |
fb3a499b | 296 | String eventHRTimerExpireExit(); |
b89d8ade | 297 | |
aa19e48b NA |
298 | /** |
299 | * The kernel just allocated a page of memory. | |
300 | * <p> | |
051db42f MK |
301 | * In Linux, this typically means a user space application just got a page |
302 | * of ram. | |
aa19e48b NA |
303 | * |
304 | * @return the event name | |
305 | * @since 2.0 | |
306 | */ | |
307 | String eventKmemPageAlloc(); | |
308 | ||
309 | /** | |
310 | * The kernel just deallocated a page of memory. | |
311 | * <p> | |
312 | * In Linux, this typically means a page of ram was just freed | |
313 | * | |
314 | * @return the event name | |
315 | * @since 2.0 | |
316 | */ | |
317 | String eventKmemPageFree(); | |
318 | ||
051db42f MK |
319 | /** |
320 | * <em>Interprocessor interrupts</em> (IPIs) are special types of interrupts by which | |
321 | * one processor will interrupt another in a multi-core and multi-cpu system. They are | |
322 | * typically used for | |
323 | * <ol> | |
324 | * <li>cache flushes</li> | |
325 | * <li>shutdowns</li> | |
326 | * <ol> | |
327 | * They are not logged with standard events, but rather events looking like | |
328 | * "x86_irq_vectors_thermal_apic_exit". | |
329 | * <p> | |
330 | * This event describes the entries into IPIs. | |
331 | * | |
332 | * @return the IPI list | |
333 | * @since 2.1 | |
334 | */ | |
335 | default Collection<String> getIPIIrqVectorsEntries() { | |
336 | return Collections.emptyList(); | |
337 | } | |
338 | ||
339 | /** | |
340 | * <em>Interprocessor interrupts</em> (IPIs) are special types of interrupts by which | |
341 | * one processor will interrupt another in a multi-core and multi-cpu system. They are | |
342 | * typically used for | |
343 | * <ol> | |
344 | * <li>cache flushes</li> | |
345 | * <li>shutdowns</li> | |
346 | * <ol> | |
347 | * They are not logged with standard events, but rather events looking like | |
348 | * "x86_irq_vectors_thermal_apic_exit". | |
349 | * <p> | |
350 | * This event describes the exits into IPIs. | |
351 | * | |
352 | * @return the IPI list | |
353 | * @since 2.1 | |
354 | */ | |
355 | default Collection<String> getIPIIrqVectorsExits() { | |
356 | return Collections.emptyList(); | |
357 | } | |
358 | ||
7411cd67 AM |
359 | // ------------------------------------------------------------------------ |
360 | // Event field names | |
361 | // ------------------------------------------------------------------------ | |
362 | ||
b89d8ade MK |
363 | /** |
364 | * The field with the IRQ number. This is used in irq_handlers (entry and | |
365 | * exit). For soft IRQs see {@link #fieldVec}. | |
366 | * | |
367 | * @return the name of the field with the IRQ number | |
368 | */ | |
7411cd67 | 369 | String fieldIrq(); |
b89d8ade MK |
370 | |
371 | /** | |
372 | * The field with the vector. This is the soft IRQ vector field used in soft | |
373 | * IRQ raise, entry and exit. For hardware IRQs see {@link #fieldIrq}. | |
374 | * | |
375 | * @return the name of the field with the soft IRQ vector name | |
376 | */ | |
7411cd67 | 377 | String fieldVec(); |
b89d8ade MK |
378 | |
379 | /** | |
380 | * The field with the thread ID. This is often used in scheduler calls to | |
381 | * know which thread is being affected. (normally not in switch, but in | |
382 | * priority and wakeup calls). | |
383 | * | |
384 | * @return the name of the field with the thread ID | |
385 | */ | |
7411cd67 | 386 | String fieldTid(); |
b89d8ade MK |
387 | |
388 | /** | |
389 | * The field with the previous thread id. This is used in switching | |
390 | * operations of a scheduler, when a thread is scheduled out for another, | |
391 | * this field shows the thread id being scheduled out. | |
392 | * | |
393 | * @return The name of the field with the ID of the previous thread | |
394 | */ | |
7411cd67 | 395 | String fieldPrevTid(); |
b89d8ade MK |
396 | |
397 | /** | |
398 | * The field with the state of the previous thread. This is used in | |
399 | * switching operations of a scheduler, when a thread is scheduled out for | |
400 | * another, this field shows the state of the thread being scheduled out. | |
401 | * | |
402 | * @return the name of the field of the previous thread's state | |
403 | */ | |
7411cd67 | 404 | String fieldPrevState(); |
b89d8ade MK |
405 | |
406 | /** | |
407 | * The field with the next command to be run. This is used in switching | |
408 | * operations of a scheduler, when a thread is scheduled out for another, | |
409 | * this field shows the command being scheduled in. A command's value is | |
410 | * often a String like "ls" or "hl3.exe". | |
411 | * | |
412 | * @return the name of the field with the next command to be run | |
413 | */ | |
7411cd67 | 414 | String fieldNextComm(); |
b89d8ade MK |
415 | |
416 | /** | |
417 | * The field with the next thread ID. This is used in switching operations | |
418 | * of a scheduler, when a thread is scheduled out for another, this field | |
419 | * shows the thread being scheduled in. | |
420 | * | |
421 | * @return the name of the field with the next thread ID | |
422 | */ | |
7411cd67 | 423 | String fieldNextTid(); |
b89d8ade MK |
424 | |
425 | /** | |
426 | * The field with the child command. This field is used in clone and spawn | |
427 | * activities, to know which executable the clone is running. | |
428 | * | |
429 | * @return the name of the field with the child command | |
430 | */ | |
7411cd67 | 431 | String fieldChildComm(); |
b89d8ade MK |
432 | |
433 | /** | |
434 | * The field with the parent thread ID. This field is used in clone and | |
435 | * spawn activities, to know which thread triggered the clone. | |
436 | * | |
437 | * @return the name of the field with the parent thread ID | |
438 | */ | |
7411cd67 | 439 | String fieldParentTid(); |
b89d8ade MK |
440 | |
441 | /** | |
442 | * The field with the child thread ID. This field is used in clone and spawn | |
443 | * activities, to know which thread is the clone. | |
444 | * | |
445 | * @return the name of the field with the child thread ID | |
446 | */ | |
7411cd67 | 447 | String fieldChildTid(); |
dbc7991d | 448 | |
b89d8ade MK |
449 | /** |
450 | * The field with the command. This is used in scheduling tracepoints that | |
451 | * are not switches, and show the current process name. It is often a string | |
452 | * like "zsh" or "cmd.exe". | |
453 | * | |
454 | * @return the name of the command field | |
455 | * @since 2.0 | |
456 | */ | |
fb3a499b FG |
457 | String fieldComm(); |
458 | ||
b89d8ade MK |
459 | /** |
460 | * The field with the name. The name field is used in several disjoint | |
461 | * events. | |
462 | * <p> | |
463 | * Examples include: | |
464 | * <ul> | |
465 | * <li>writeback_* - the name of the io device, often "(unknown)"</li> | |
466 | * <li>module_* - the name of the module such as "binfmt_misc"</li> | |
467 | * <li>irq_handler_entry - the field describes the name of the handler such | |
468 | * as "i915"</li> | |
469 | * <ul> | |
470 | * | |
471 | * @return the name of the field with a name | |
472 | * @since 2.0 | |
473 | */ | |
fb3a499b FG |
474 | String fieldName(); |
475 | ||
b89d8ade MK |
476 | /** |
477 | * The field with the status. Often functions like a return value before we | |
478 | * hit an exit. | |
479 | * <p> | |
480 | * Examples include: | |
481 | * <ul> | |
482 | * <li>ext4* - status</li> | |
483 | * <li>asoc_snd_soc_cache_sync</li> | |
484 | * <li>rpc_*</li> | |
485 | * <li>state dumps</li> | |
486 | * </ul> | |
487 | * | |
488 | * @return The name of the field with a status | |
489 | * @since 2.0 | |
490 | */ | |
fb3a499b FG |
491 | String fieldStatus(); |
492 | ||
b89d8ade MK |
493 | /** |
494 | * The field with the last command to be run. This is often a string | |
495 | * representing the command of the thread being scheduled out from a | |
496 | * scheduler switch operation. | |
497 | * | |
498 | * @return the name of the field with the last command to be run | |
499 | * @since 2.0 | |
500 | */ | |
fb3a499b FG |
501 | String fieldPrevComm(); |
502 | ||
b89d8ade MK |
503 | /** |
504 | * The field with the file name field. This is a string used mostly with | |
505 | * file operations. These operations are often wrapped in system calls and | |
506 | * can be: | |
507 | * <ul> | |
508 | * <li>open</li> | |
509 | * <li>change mode</li> | |
510 | * <li>change directory</li> | |
511 | * <li>stat</li> | |
512 | * </ul> | |
513 | * It can also be used in exec commands to see what the command name should | |
514 | * be. | |
515 | * <p> | |
516 | * Please note that file read and write often do not use the file name, they | |
517 | * just use the file handle. | |
518 | * | |
519 | * @return the name of the field with the file name | |
520 | * @since 2.0 | |
521 | */ | |
fb3a499b FG |
522 | String fieldFilename(); |
523 | ||
b89d8ade MK |
524 | /** |
525 | * The field with the priority. The priority of a given process is used by | |
526 | * most scheduler events. The major exception is the switching operation as | |
527 | * it has two processes so it has a previous and next priority. | |
528 | * | |
529 | * @return the name of the field with the thread or process' priority | |
530 | * @since 1.0 | |
531 | */ | |
3bf563da | 532 | String fieldPrio(); |
dbc7991d | 533 | |
b89d8ade MK |
534 | /** |
535 | * The field with the new priority. This is used in the scheduler's | |
536 | * pi_setprio event event to show the new priority of the thread or process. | |
537 | * | |
538 | * @return the name of the field with the thread or process' new priority | |
539 | * @since 1.0 | |
540 | */ | |
3bf563da | 541 | String fieldNewPrio(); |
dbc7991d | 542 | |
94c57af7 RB |
543 | /** |
544 | * The field with the prev priority. This is used in the scheduler's switch | |
545 | * event to show the priority of the thread being scheduled out. | |
546 | * | |
547 | * @return the name of the field with the priority of the previous thread | |
548 | * @since 2.0 | |
549 | */ | |
550 | String fieldPrevPrio(); | |
551 | ||
b89d8ade MK |
552 | /** |
553 | * The field with the next priority. This is used in the scheduler's switch | |
554 | * event to show the priority of the next thread or process. | |
555 | * | |
556 | * @return the name of the field with the thread or process' next priority | |
557 | * @since 1.0 | |
558 | */ | |
3bf563da | 559 | String fieldNextPrio(); |
a8b8de05 BH |
560 | |
561 | /** | |
562 | * The field with the hrtimer. The hrtimer holds the timer instance. | |
563 | * | |
564 | * @return the name of the hrTimer field | |
565 | * @since 2.0 | |
566 | */ | |
567 | String fieldHRtimer(); | |
568 | ||
569 | /** | |
051db42f MK |
570 | * The field with the expires value. The expires field holds the expiry |
571 | * time. of the hrtimer. | |
a8b8de05 BH |
572 | * |
573 | * @return the name of the expires field | |
574 | * @since 2.0 | |
575 | */ | |
576 | String fieldHRtimerExpires(); | |
577 | ||
578 | /** | |
051db42f MK |
579 | * Gets the field name with the softexpires value. The softexpire value is |
580 | * the absolute earliest expiry time of the hrtimer. | |
a8b8de05 BH |
581 | * |
582 | * @return the name of the softexpires field | |
583 | * @since 2.0 | |
584 | */ | |
585 | String fieldHRtimerSoftexpires(); | |
586 | ||
587 | /** | |
588 | * The field of the function address value. The function field holds timer | |
589 | * expiry callback function. | |
590 | * | |
591 | * @return the name of the function field | |
592 | * @since 2.0 | |
593 | */ | |
594 | String fieldHRtimerFunction(); | |
595 | ||
596 | /** | |
597 | * The field of the now value. The now field holds the current time. | |
598 | * | |
599 | * @return the name of the now field (hrtimer) | |
600 | * @since 2.0 | |
601 | */ | |
602 | String fieldHRtimerNow(); | |
603 | ||
2bb1a7a1 GB |
604 | /** |
605 | * The field containing the return value of a system call exit. | |
606 | * | |
607 | * @return The name of return field | |
608 | * @since 2.0 | |
609 | */ | |
610 | default String fieldSyscallRet() { | |
611 | return "ret"; //$NON-NLS-1$ | |
612 | } | |
613 | ||
614 | // ------------------------------------------------------------------------ | |
615 | // I/O events and fields | |
616 | // ------------------------------------------------------------------------ | |
617 | ||
618 | /** | |
619 | * A request to a block IO has just been inserted in the waiting queue. | |
620 | * | |
621 | * @return The name of the event | |
622 | * @since 2.0 | |
623 | */ | |
624 | default String eventBlockRqInsert() { | |
625 | return "block_rq_insert"; //$NON-NLS-1$ | |
626 | } | |
627 | ||
628 | /** | |
629 | * A request to a block IO has just been issued and passed from the waiting | |
630 | * queue to the driver queue. It is being served. | |
631 | * | |
632 | * @return The name of the event | |
633 | * @since 2.0 | |
634 | */ | |
635 | default String eventBlockRqIssue() { | |
636 | return "block_rq_issue"; //$NON-NLS-1$ | |
637 | } | |
638 | ||
639 | /** | |
640 | * A request to a block IO has just been completed. | |
641 | * | |
642 | * @return The name of the event | |
643 | * @since 2.0 | |
644 | */ | |
645 | default String eventBlockRqComplete() { | |
646 | return "block_rq_complete"; //$NON-NLS-1$ | |
647 | } | |
648 | ||
649 | /** | |
650 | * A BIO operation is being merged at the front of a waiting request | |
651 | * | |
652 | * @return The name of the event | |
653 | * @since 2.0 | |
654 | */ | |
655 | default String eventBlockBioFrontmerge() { | |
656 | return "block_bio_frontmerge"; //$NON-NLS-1$ | |
657 | } | |
658 | ||
659 | /** | |
660 | * A BIO operation is being merged at the back of a waiting request | |
661 | * | |
662 | * @return The name of the event | |
663 | * @since 2.0 | |
664 | */ | |
665 | default String eventBlockBioBackmerge() { | |
666 | return "block_bio_backmerge"; //$NON-NLS-1$ | |
667 | } | |
668 | ||
669 | /** | |
670 | * 2 requests previously inserted in the waiting queue are being merged | |
671 | * | |
672 | * @return The name of the event | |
673 | * @since 2.0 | |
674 | */ | |
675 | default String eventBlockRqMerge() { | |
676 | return "block_rq_merge"; //$NON-NLS-1$ | |
677 | } | |
678 | ||
679 | /** | |
680 | * Optional event used by some tracers to associate the name of the block | |
681 | * device to a device ID | |
682 | * | |
683 | * @return The name of the event | |
684 | * @since 2.0 | |
685 | */ | |
686 | default @Nullable String eventStatedumpBlockDevice() { | |
687 | return null; | |
688 | } | |
689 | ||
690 | /** | |
691 | * The field containing the device ID | |
692 | * | |
693 | * @return The name of the field | |
694 | * @since 2.0 | |
695 | */ | |
696 | default String fieldBlockDeviceId() { | |
697 | return "dev"; //$NON-NLS-1$ | |
698 | } | |
699 | ||
700 | /** | |
701 | * The field with the first sector of a block operation | |
702 | * | |
703 | * @return The name of the field | |
704 | * @since 2.0 | |
705 | */ | |
706 | default String fieldBlockSector() { | |
707 | return "sector"; //$NON-NLS-1$ | |
708 | } | |
709 | ||
710 | /** | |
711 | * The field with the number of sectors involved in a block operation | |
712 | * | |
713 | * @return The name of the field | |
714 | * @since 2.0 | |
715 | */ | |
716 | default String fieldBlockNrSector() { | |
717 | return "nr_sector"; //$NON-NLS-1$ | |
718 | } | |
719 | ||
720 | /** | |
721 | * The field containing the read/write flag of a block operation | |
722 | * | |
723 | * @return The name of the field | |
724 | * @since 2.0 | |
725 | */ | |
726 | default String fieldBlockRwbs() { | |
727 | return "rwbs"; //$NON-NLS-1$ | |
728 | } | |
729 | ||
730 | /** | |
731 | * The field with the first sector of a request in which another block | |
732 | * operation is being merged | |
733 | * | |
734 | * @return The name of the field | |
735 | * @since 2.0 | |
736 | */ | |
737 | default String fieldBlockRqSector() { | |
738 | return "rq_sector"; //$NON-NLS-1$ | |
739 | } | |
740 | ||
741 | /** | |
742 | * The field with the sector of the request being merged in another one | |
743 | * | |
744 | * @return The name of the field | |
745 | * @since 2.0 | |
746 | */ | |
747 | default String fieldBlockNextRqSector() { | |
748 | return "nextrq_sector"; //$NON-NLS-1$ | |
749 | } | |
750 | ||
751 | /** | |
752 | * The field containing the name of the disk | |
753 | * | |
754 | * @return The name of the field | |
755 | * @since 2.0 | |
756 | */ | |
757 | default String fieldDiskname() { | |
758 | return "diskname"; //$NON-NLS-1$ | |
759 | } | |
760 | ||
051db42f MK |
761 | /** |
762 | * The field with the IRQ number. This is used in IPI handlers (entry and | |
763 | * exit). | |
764 | * | |
765 | * @return the name of the field with the IRQ number | |
766 | * @since 2.1 | |
767 | */ | |
768 | default String fieldIPIVector() { | |
769 | return "vector"; //$NON-NLS-1$ | |
770 | } | |
771 | ||
35944fc5 GB |
772 | // ------------------------------------------------------------------------ |
773 | // Network events and fields | |
774 | // ------------------------------------------------------------------------ | |
775 | ||
776 | /** | |
48b36dce | 777 | * Get the list of events indicating that a packet is sent on the network |
35944fc5 GB |
778 | * |
779 | * @return The name of the packet send event | |
780 | * @since 2.1 | |
781 | */ | |
48b36dce GB |
782 | default Collection<String> eventsNetworkSend() { |
783 | return Collections.EMPTY_SET; | |
35944fc5 GB |
784 | } |
785 | ||
786 | /** | |
787 | * Get the list of events indicating that a packet is received from the | |
788 | * network | |
789 | * | |
790 | * @return The collection of names of the packet receive event | |
791 | * @since 2.1 | |
792 | */ | |
48b36dce GB |
793 | default Collection<String> eventsNetworkReceive() { |
794 | return Collections.EMPTY_SET; | |
35944fc5 GB |
795 | } |
796 | ||
797 | /** | |
798 | * The path of the field corresponding to the sequence number field of a TCP | |
799 | * header | |
800 | * | |
801 | * @return The path of the sequence number field in the TCP header of a | |
802 | * network packet | |
803 | * @since 2.1 | |
804 | */ | |
805 | default String[] fieldPathTcpSeq() { | |
806 | return new String[] { "seq" }; //$NON-NLS-1$ | |
807 | } | |
808 | ||
809 | /** | |
810 | * The path of the field corresponding to the acknowledgment number field of | |
811 | * a TCP header | |
812 | * | |
813 | * @return The name of the acknowledgment number field in the TCP header of | |
814 | * a network packet | |
815 | * @since 2.1 | |
816 | */ | |
817 | default String[] fieldPathTcpAckSeq() { | |
818 | return new String[] { "ack_seq" }; //$NON-NLS-1$ | |
819 | } | |
820 | ||
821 | /** | |
822 | * The path of the field corresponding to the flags field of a TCP header | |
823 | * | |
824 | * @return The path of the flags field in the TCP header of a network packet | |
825 | * @since 2.1 | |
826 | */ | |
827 | default String[] fieldPathTcpFlags() { | |
828 | return new String[] { "flags" }; //$NON-NLS-1$ | |
829 | } | |
6060ab29 AB |
830 | |
831 | // ------------------------------------------------------------------------ | |
832 | // VirtualMachine events : kvm entry/exit events | |
833 | // ------------------------------------------------------------------------ | |
834 | ||
835 | /** | |
836 | * KVM kernel event indicating that virtual machine code is being run | |
837 | * | |
838 | * @return The name of the kvm entry event | |
839 | * @since 2.1 | |
840 | */ | |
841 | default Collection<String> eventsKVMEntry() { | |
842 | return Collections.EMPTY_SET; | |
843 | } | |
844 | ||
845 | /** | |
846 | * KVM kernel event indicating that virtual machine code is not run anymore, | |
847 | * but rather hypervisor-specific code | |
848 | * | |
849 | * @return The name of the kvm exit event | |
850 | * @since 2.1 | |
851 | */ | |
852 | default Collection<String> eventsKVMExit() { | |
853 | return Collections.EMPTY_SET; | |
854 | } | |
855 | ||
7411cd67 | 856 | } |