All new events added to the layout should return a Collection instead of a
single string. This patch updates the network event's signature
Change-Id: I978f760d6f72714467511f3c58c7a9f3a134830d
Signed-off-by: Geneviève Bastien <gbastien+lttng@versatic.net>
Reviewed-on: https://git.eclipse.org/r/78070
Reviewed-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
Reviewed-by: Hudson CI
Reviewed-by: Alexandre Montplaisir <alexmonthy@efficios.com>
// ------------------------------------------------------------------------
/**
// ------------------------------------------------------------------------
/**
- * An event indicating that a packet is sent on the network
+ * 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
*/
*
* @return The name of the packet send event
* @since 2.1
*/
- default String eventNetworkSend() {
- return "net_dev_queue"; //$NON-NLS-1$
+ default Collection<String> eventsNetworkSend() {
+ return Collections.EMPTY_SET;
* @return The collection of names of the packet receive event
* @since 2.1
*/
* @return The collection of names of the packet receive event
* @since 2.1
*/
- default Collection<String> eventNetworkReceive() {
- return Collections.singleton("netif_receive_skb"); //$NON-NLS-1$
+ default Collection<String> eventsNetworkReceive() {
+ return Collections.EMPTY_SET;
package org.eclipse.tracecompass.internal.lttng2.kernel.core.trace.layout;
import java.util.Collection;
package org.eclipse.tracecompass.internal.lttng2.kernel.core.trace.layout;
import java.util.Collection;
+import java.util.Collections;
import org.eclipse.jdt.annotation.NonNull;
import org.eclipse.jdt.annotation.NonNull;
-import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;
/**
import com.google.common.collect.ImmutableSet;
/**
private static final String X86_IRQ_VECTORS_DEFERRED_ERROR_APIC_EXIT = "x86_irq_vectors_deferred_error_apic_exit"; //$NON-NLS-1$
private static final String X86_IRQ_VECTORS_THERMAL_APIC_ENTRY = "x86_irq_vectors_thermal_apic_entry"; //$NON-NLS-1$
private static final String X86_IRQ_VECTORS_THERMAL_APIC_EXIT = "x86_irq_vectors_thermal_apic_exit"; //$NON-NLS-1$
private static final String X86_IRQ_VECTORS_DEFERRED_ERROR_APIC_EXIT = "x86_irq_vectors_deferred_error_apic_exit"; //$NON-NLS-1$
private static final String X86_IRQ_VECTORS_THERMAL_APIC_ENTRY = "x86_irq_vectors_thermal_apic_entry"; //$NON-NLS-1$
private static final String X86_IRQ_VECTORS_THERMAL_APIC_EXIT = "x86_irq_vectors_thermal_apic_exit"; //$NON-NLS-1$
+ /* Network event */
+ private static final Collection<String> EVENTS_NETWORK_RECEIVE = Collections.singleton("net_if_receive_skb"); //$NON-NLS-1$
- private static final String KVM_X86_ENTRY = "kvm_x86_entry"; //$NON-NLS-1$
- private static final String KVM_X86_EXIT = "kvm_x86_exit"; //$NON-NLS-1$
- private static final Collection<String> KVM_ENTRY_EVENTS = ImmutableSet.of(KVM_X86_ENTRY);
- private static final Collection<String> KVM_EXIT_EVENTS = ImmutableSet.of(KVM_X86_EXIT);
+ private static final Collection<String> KVM_ENTRY_EVENTS = Collections.singleton("kvm_x86_entry"); //$NON-NLS-1$
+ private static final Collection<String> KVM_EXIT_EVENTS = Collections.singleton("kvm_x86_exit"); //$NON-NLS-1$
private static final Collection<String> IPI_ENTRY_SET = ImmutableSet.of(
X86_IRQ_VECTORS_LOCAL_TIMER_ENTRY,
private static final Collection<String> IPI_ENTRY_SET = ImmutableSet.of(
X86_IRQ_VECTORS_LOCAL_TIMER_ENTRY,
- public @NonNull Collection<@NonNull String> eventNetworkReceive() {
- return ImmutableList.of("netif_receive_skb", "net_if_receive_skb"); //$NON-NLS-1$ //$NON-NLS-2$
+ public Collection<String> eventsNetworkReceive() {
+ return EVENTS_NETWORK_RECEIVE;
import org.eclipse.tracecompass.analysis.os.linux.core.trace.IKernelAnalysisEventLayout;
import com.google.common.collect.ImmutableList;
import org.eclipse.tracecompass.analysis.os.linux.core.trace.IKernelAnalysisEventLayout;
import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableSet;
/**
* This file defines all the known event and field names for LTTng kernel
/**
* This file defines all the known event and field names for LTTng kernel
private static final String NEXTRQ_SECTOR= "nextrq_sector";
/* Network events and field names */
private static final String NEXTRQ_SECTOR= "nextrq_sector";
/* Network events and field names */
- private static final String EVENT_NETWORK_SEND = "net_dev_queue";
- private static final String EVENT_NETWORK_RECEIVE = "netif_receive_skb";
+ private static final Collection<String> EVENTS_NETWORK_SEND = Collections.singleton("net_dev_queue");
+ private static final Collection<String> EVENTS_NETWORK_RECEIVE = Collections.singleton("netif_receive_skb");
private static final String[] TCP_SEQ_FIELD = { "transport_fields", "thtype_tcp", "seq" };
private static final String[] TCP_ACK_FIELD = { "transport_fields", "thtype_tcp", "ack_seq" };
private static final String[] TCP_FLAGS_FIELD = { "transport_fields", "thtype_tcp", "flags" };
/* KVM events */
private static final String[] TCP_SEQ_FIELD = { "transport_fields", "thtype_tcp", "seq" };
private static final String[] TCP_ACK_FIELD = { "transport_fields", "thtype_tcp", "ack_seq" };
private static final String[] TCP_FLAGS_FIELD = { "transport_fields", "thtype_tcp", "flags" };
/* KVM events */
- private static final String KVM_ENTRY = "kvm_entry"; //$NON-NLS-1$
- private static final String KVM_EXIT = "kvm_exit"; //$NON-NLS-1$
- private static final Collection<String> KVM_ENTRY_EVENTS = ImmutableSet.of(KVM_ENTRY);
- private static final Collection<String> KVM_EXIT_EVENTS = ImmutableSet.of(KVM_EXIT);
+ private static final Collection<String> KVM_ENTRY_EVENTS = Collections.singleton("kvm_entry");
+ private static final Collection<String> KVM_EXIT_EVENTS = Collections.singleton("kvm_exit");
/** All instances are the same. Only provide a static instance getter */
protected LttngEventLayout() {
/** All instances are the same. Only provide a static instance getter */
protected LttngEventLayout() {
- public @NonNull String eventNetworkSend() {
- return EVENT_NETWORK_SEND;
+ public Collection<String> eventsNetworkSend() {
+ return EVENTS_NETWORK_SEND;
- public @NonNull Collection<@NonNull String> eventNetworkReceive() {
- return Collections.singleton(EVENT_NETWORK_RECEIVE);
+ public Collection<String> eventsNetworkReceive() {
+ return EVENTS_NETWORK_RECEIVE;