/*******************************************************************************
- * Copyright (c) 2012, 2014 Ericsson
+ * Copyright (c) 2012, 2015 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
package org.eclipse.tracecompass.internal.lttng2.kernel.core.trace.layout;
+import static org.eclipse.tracecompass.common.core.NonNullUtils.checkNotNull;
+
import java.util.Collection;
import org.eclipse.jdt.annotation.NonNull;
+import org.eclipse.tracecompass.analysis.os.linux.core.trace.IKernelAnalysisEventLayout;
import com.google.common.collect.ImmutableList;
/**
- * This file defines all the known event and field names for LTTng 2.0 kernel
- * traces.
+ * This file defines all the known event and field names for LTTng kernel
+ * traces, for versions of lttng-modules up to 2.5.
*
* These should not be externalized, since they need to match exactly what the
* tracer outputs. If you want to localize them in a view, you should do a
public class LttngEventLayout implements IKernelAnalysisEventLayout {
/* Event names */
- private static final String EXIT_SYSCALL = "exit_syscall";
private static final String IRQ_HANDLER_ENTRY = "irq_handler_entry";
private static final String IRQ_HANDLER_EXIT = "irq_handler_exit";
private static final String SOFTIRQ_ENTRY = "softirq_entry";
private static final String SOFTIRQ_EXIT = "softirq_exit";
private static final String SOFTIRQ_RAISE = "softirq_raise";
private static final String SCHED_SWITCH = "sched_switch";
+ private static final String SCHED_PI_SETPRIO = "sched_pi_setprio";
- @SuppressWarnings("null")
- private static final @NonNull Collection<String> SCHED_WAKEUP_EVENTS = ImmutableList.of("sched_wakeup", "sched_wakeup_new");
+ private static final Collection<String> SCHED_WAKEUP_EVENTS =
+ checkNotNull(ImmutableList.of("sched_wakeup", "sched_wakeup_new"));
private static final String SCHED_PROCESS_FORK = "sched_process_fork";
private static final String SCHED_PROCESS_EXIT = "sched_process_exit";
private static final String SCHED_PROCESS_FREE = "sched_process_free";
private static final String STATEDUMP_PROCESS_STATE = "lttng_statedump_process_state";
- private static final String SYSCALL_PREFIX = "sys_";
- private static final String COMPAT_SYSCALL_PREFIX = "compat_sys_";
+ private static final String SYSCALL_ENTRY_PREFIX = "sys_";
+ private static final String COMPAT_SYSCALL_ENTRY_PREFIX = "compat_sys_";
+ private static final String SYSCALL_EXIT_PREFIX = "exit_syscall";
/* Field names */
private static final String IRQ = "irq";
private static final String PARENT_TID = "parent_tid";
private static final String CHILD_COMM = "child_comm";
private static final String CHILD_TID = "child_tid";
+ private static final String PRIO = "prio";
+ private static final String NEXT_PRIO = "next_prio";
+ private static final String NEW_PRIO = "newprio";
/** All instances are the same. Only provide a static instance getter */
- private LttngEventLayout() {
+ protected LttngEventLayout() {
}
private static final IKernelAnalysisEventLayout INSTANCE = new LttngEventLayout();
return SCHED_SWITCH;
}
+ @Override
+ public String eventSchedPiSetprio() {
+ return SCHED_PI_SETPRIO;
+ }
+
@Override
public Collection<String> eventsSchedWakeup() {
return SCHED_WAKEUP_EVENTS;
}
@Override
- public String eventStatedumpProcessState() {
+ public @NonNull String eventStatedumpProcessState() {
return STATEDUMP_PROCESS_STATE;
}
- @Override
- public String eventSyscallExit() {
- return EXIT_SYSCALL;
- }
@Override
public String eventSyscallEntryPrefix() {
- return SYSCALL_PREFIX;
+ return SYSCALL_ENTRY_PREFIX;
}
@Override
public String eventCompatSyscallEntryPrefix() {
- return COMPAT_SYSCALL_PREFIX;
+ return COMPAT_SYSCALL_ENTRY_PREFIX;
+ }
+
+ @Override
+ public String eventSyscallExitPrefix() {
+ return SYSCALL_EXIT_PREFIX;
}
// ------------------------------------------------------------------------
return CHILD_TID;
}
+ @Override
+ public String fieldPrio() {
+ return PRIO;
+ }
+
+ @Override
+ public String fieldNewPrio() {
+ return NEW_PRIO;
+ }
+
+ @Override
+ public String fieldNextPrio() {
+ return NEXT_PRIO;
+ }
+
}