package org.eclipse.tracecompass.analysis.os.linux.core.trace;
import java.util.Collection;
+import java.util.Collections;
import org.eclipse.jdt.annotation.Nullable;
// Common definitions
// ------------------------------------------------------------------------
- /**
- * The standard layout, very useful for test vectors that are not kernel
- * based.
- */
- IKernelAnalysisEventLayout DEFAULT_LAYOUT = DefaultEventLayout.getInstance();
-
/**
* Whenever a process appears for the first time in a trace, we assume it
* starts inside this system call. (The syscall prefix is defined by the
*/
String eventSchedProcessWakeupNew();
+ /**
+ * Migration event, moving a non-running thread from one CPU's run queue to
+ * another.
+ *
+ * @return The event name
+ * @since 2.2
+ */
+ default String eventSchedMigrateTask() {
+ return "sched_migrate_task"; //$NON-NLS-1$
+ }
/**
* Starting the high resolution timer
/**
* The kernel just allocated a page of memory.
* <p>
- * In Linux, this typically means a user space application just got a page of
- * ram.
+ * In Linux, this typically means a user space application just got a page
+ * of ram.
*
* @return the event name
* @since 2.0
*/
String eventKmemPageFree();
+ /**
+ * <em>Interprocessor interrupts</em> (IPIs) are special types of interrupts by which
+ * one processor will interrupt another in a multi-core and multi-cpu system. They are
+ * typically used for
+ * <ol>
+ * <li>cache flushes</li>
+ * <li>shutdowns</li>
+ * <ol>
+ * They are not logged with standard events, but rather events looking like
+ * "x86_irq_vectors_thermal_apic_exit".
+ * <p>
+ * This event describes the entries into IPIs.
+ *
+ * @return the IPI list
+ * @since 2.1
+ */
+ default Collection<String> getIPIIrqVectorsEntries() {
+ return Collections.emptyList();
+ }
+
+ /**
+ * <em>Interprocessor interrupts</em> (IPIs) are special types of interrupts by which
+ * one processor will interrupt another in a multi-core and multi-cpu system. They are
+ * typically used for
+ * <ol>
+ * <li>cache flushes</li>
+ * <li>shutdowns</li>
+ * <ol>
+ * They are not logged with standard events, but rather events looking like
+ * "x86_irq_vectors_thermal_apic_exit".
+ * <p>
+ * This event describes the exits into IPIs.
+ *
+ * @return the IPI list
+ * @since 2.1
+ */
+ default Collection<String> getIPIIrqVectorsExits() {
+ return Collections.emptyList();
+ }
+
// ------------------------------------------------------------------------
// Event field names
// ------------------------------------------------------------------------
*/
String fieldNewPrio();
+ /**
+ * The field with the prev priority. This is used in the scheduler's switch
+ * event to show the priority of the thread being scheduled out.
+ *
+ * @return the name of the field with the priority of the previous thread
+ * @since 2.0
+ */
+ String fieldPrevPrio();
+
/**
* The field with the next priority. This is used in the scheduler's switch
* event to show the priority of the next thread or process.
String fieldHRtimer();
/**
- * The field with the expires value. The expires field holds the expiry time.
- * of the hrtimer.
+ * The field with the expires value. The expires field holds the expiry
+ * time. of the hrtimer.
*
* @return the name of the expires field
* @since 2.0
String fieldHRtimerExpires();
/**
- * Gets the field name with the softexpires value. The softexpire value is the
- * absolute earliest expiry time of the hrtimer.
+ * Gets the field name with the softexpires value. The softexpire value is
+ * the absolute earliest expiry time of the hrtimer.
*
* @return the name of the softexpires field
* @since 2.0
return "ret"; //$NON-NLS-1$
}
+ /**
+ * Field indicating the upcoming CPU of sched_wakeup and sched_waking
+ * events.
+ *
+ * @return The field name
+ * @since 2.2
+ */
+ default String fieldTargetCpu() {
+ return "target_cpu"; //$NON-NLS-1$
+ }
+
+ /**
+ * Field of scheduler migration events, indicating the destination CPU of a
+ * thread being migrated.
+ *
+ * @return The field name
+ * @since 2.2
+ */
+ default String fieldDestCpu() {
+ return "dest_cpu"; //$NON-NLS-1$
+ }
+
// ------------------------------------------------------------------------
// I/O events and fields
// ------------------------------------------------------------------------
return "diskname"; //$NON-NLS-1$
}
+ /**
+ * The field with the IRQ number. This is used in IPI handlers (entry and
+ * exit).
+ *
+ * @return the name of the field with the IRQ number
+ * @since 2.1
+ */
+ default String fieldIPIVector() {
+ return "vector"; //$NON-NLS-1$
+ }
+
+ // ------------------------------------------------------------------------
+ // Network events and fields
+ // ------------------------------------------------------------------------
+
+ /**
+ * Get the list of events indicating that a packet is sent on the network
+ *
+ * @return The name of the packet send event
+ * @since 2.1
+ */
+ default Collection<String> eventsNetworkSend() {
+ return Collections.EMPTY_SET;
+ }
+
+ /**
+ * Get the list of events indicating that a packet is received from the
+ * network
+ *
+ * @return The collection of names of the packet receive event
+ * @since 2.1
+ */
+ default Collection<String> eventsNetworkReceive() {
+ return Collections.EMPTY_SET;
+ }
+
+ /**
+ * The path of the field corresponding to the sequence number field of a TCP
+ * header
+ *
+ * @return The path of the sequence number field in the TCP header of a
+ * network packet
+ * @since 2.1
+ */
+ default String[] fieldPathTcpSeq() {
+ return new String[] { "seq" }; //$NON-NLS-1$
+ }
+
+ /**
+ * The path of the field corresponding to the acknowledgment number field of
+ * a TCP header
+ *
+ * @return The name of the acknowledgment number field in the TCP header of
+ * a network packet
+ * @since 2.1
+ */
+ default String[] fieldPathTcpAckSeq() {
+ return new String[] { "ack_seq" }; //$NON-NLS-1$
+ }
+
+ /**
+ * The path of the field corresponding to the flags field of a TCP header
+ *
+ * @return The path of the flags field in the TCP header of a network packet
+ * @since 2.1
+ */
+ default String[] fieldPathTcpFlags() {
+ return new String[] { "flags" }; //$NON-NLS-1$
+ }
+
+ // ------------------------------------------------------------------------
+ // VirtualMachine events : kvm entry/exit events
+ // ------------------------------------------------------------------------
+
+ /**
+ * KVM kernel event indicating that virtual machine code is being run
+ *
+ * @return The name of the kvm entry event
+ * @since 2.1
+ */
+ default Collection<String> eventsKVMEntry() {
+ return Collections.EMPTY_SET;
+ }
+
+ /**
+ * KVM kernel event indicating that virtual machine code is not run anymore,
+ * but rather hypervisor-specific code
+ *
+ * @return The name of the kvm exit event
+ * @since 2.1
+ */
+ default Collection<String> eventsKVMExit() {
+ return Collections.EMPTY_SET;
+ }
+
}